0

Eclipse Indigo で IvyDE を使用しています。次のような ivy.xml ファイルがあります。

<?xml version="1.0" encoding="UTF-8"?>
<ivy-module version="2.0" xmlns:e="http://ant.apache.org/ivy/extra">
    <info organisation="com.restphone" module="javasignatureparser_2.10" revision="0.3-SNAPSHOT" status="integration" publication="20121208180225">
        <description>
        JavaSignatureParser
        </description>
    </info>
    <configurations>
        <conf name="compile" visibility="public" description=""/>
        <conf name="runtime" visibility="public" description="" extends="compile"/>
        <conf name="test" visibility="public" description="" extends="runtime"/>
        <conf name="provided" visibility="public" description=""/>
        <conf name="optional" visibility="public" description=""/>
        <conf name="sources" visibility="public" description=""/>
        <conf name="docs" visibility="public" description=""/>
        <conf name="pom" visibility="public" description=""/>
    </configurations>
    <dependencies defaultconfmapping="*->default,sources" >
        <dependency org="org.scalaz" name="scalaz-core_2.10.0-RC3" rev="7.0.0-M5" conf="compile->default(compile);sources->default(compile)"/>
    </dependencies>
</ivy-module>

IvyIDE コンテナーには、scala-library のソース アタッチメント (ivy.xml コードにリストされていない推移的な依存関係) がありますが、scalaz-core のソース アタッチメントはありません。

ローカルのアイビー キャッシュ (コンテナーにファイルがある場所) を見ると、次のように表示されます。

C:\Users\james\.ivy2\cache\org.scalaz\scalaz-core_2.10.0-RC3
  bundles
    scalaz-core_2.10.0-RC3-7.0.0-M5.jar
  sources
    scalaz-core_2.10.0-RC3-7.0.0-M5-sources.jar

なぜ IvyIDE が scalaz-core_2.10.0-RC3-7.0.0-M5-sources.jar の使い方を理解できないのか、何か考えはありますか?

アーティファクトのタイプが「バンドル」 - それは関連していますか?

<?xml version="1.0" encoding="UTF-8"?>
<ivy-module version="2.0" xmlns:m="http://ant.apache.org/ivy/maven">
        <info organisation="org.scalaz"
                module="scalaz-core_2.10.0-RC3"
                revision="7.0.0-M5"
                status="release"
                publication="20121123051347"
        >
                <license name="BSD-style" url="http://www.opensource.org/licenses/bsd-license.php" />
                <description homepage="http://scalaz.org">
                scalaz-core
                </description>
        </info>
        <configurations>
                <conf name="default" visibility="public" description="runtime dependencies and master artifact can be used with this conf" extends="runtime,master"/>
                <conf name="master" visibility="public" description="contains only the artifact published by this module itself, with no transitive dependencies"/>
                <conf name="compile" visibility="public" description="this is the default scope, used if none is specified. Compile dependencies are available in all classpaths."/>
                <conf name="provided" visibility="public" description="this is much like compile, but indicates you expect the JDK or a container to provide it. It is only available on the compilation classpath, and is not transitive."/>
                <conf name="runtime" visibility="public" description="this scope indicates that the dependency is not required for compilation, but is for execution. It is in the runtime and test classpaths, but not the compile classpath." extends="compile"/>
                <conf name="test" visibility="private" description="this scope indicates that the dependency is not required for normal use of the application, and is only available for the test compilation and execution phases." extends="runtime"/>
                <conf name="system" visibility="public" description="this scope is similar to provided except that you have to provide the JAR which contains it explicitly. The artifact is always available and is not looked up in a repository."/>
                <conf name="sources" visibility="public" description="this configuration contains the source artifact of this module, if any."/>
                <conf name="javadoc" visibility="public" description="this configuration contains the javadoc artifact of this module, if any."/>
                <conf name="optional" visibility="public" description="contains all optional dependencies"/>
        </configurations>
        <publications>
                <artifact name="scalaz-core_2.10.0-RC3" type="bundle" ext="jar" conf="master"/>
        </publications>
        <dependencies>
                <dependency org="org.scala-lang" name="scala-library" rev="2.10.0-RC3" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
        </dependencies>
</ivy-module>

更新: 事態は少し奇妙になりました。その scalaz-core_2.10.0-RC3/ivy-7.0.0-M5.xml ファイルを削除してから、ivy.xml の行を変更すると、そのファイルが再度ダウンロードされますが、同じではありません。ファイルにさらに多くの行が含まれることがあります。このような:

<publications>
        <artifact name="scalaz-core_2.10.0-RC3" type="bundle" ext="jar" conf="master"/>
        <artifact name="scalaz-core_2.10.0-RC3" type="source" ext="jar" conf="sources" m:classifier="sources"/>
        <artifact name="scalaz-core_2.10.0-RC3" type="javadoc" ext="jar" conf="javadoc" m:classifier="javadoc"/>
</publications>
4

1 に答える 1

1

Type is related, the IvyDE determines if the sources exist using the 'sources type'.

In the 'sources types', in the tab Source/Javadoc in the IvyDE managed library. The default ones are 'source'.

What you show in the ivy.xml of the resolved artifacts, it shows that the type is bundle which will not be considered a source artifacts.

However, I tried to resolve myself with a very default configuration (I just installed Eclipse and IvyDE to an empty project), and the resolved ivy file for scalaz-core:

<?xml version="1.0" encoding="UTF-8"?>
<ivy-module version="2.0" xmlns:m="http://ant.apache.org/ivy/maven">
<info organisation="org.scalaz"
    module="scalaz-core_2.10.0-RC3"
    revision="7.0.0-M5"
    status="release"
    publication="20121123141347"
>
    <license name="BSD-style" url="http://www.opensource.org/licenses/bsd-license.php" />
    <description homepage="http://scalaz.org">
    scalaz-core
    </description>
</info>
<publications>
    <artifact name="scalaz-core_2.10.0-RC3" type="bundle" ext="jar" conf="master"/>
    <artifact name="scalaz-core_2.10.0-RC3" type="source" ext="jar" conf="sources" m:classifier="sources"/>
    <artifact name="scalaz-core_2.10.0-RC3" type="javadoc" ext="jar" conf="javadoc" m:classifier="javadoc"/>
</publications>
<dependencies>
    <dependency org="org.scala-lang" name="scala-library" rev="2.10.0-RC3" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
</dependencies>

I removed the configuration section for clarity.

Are you sure you are downloading from the maven2 repository:

http://repo1.maven.org/maven2/

Maybe they changed it in the last 10 hours.

I would try adding bundle to the 'source types' if I were you. Not sure about the ramification though.

于 2012-12-09T14:14:53.637 に答える