« Return to Thread: Artifact not included from dependency's dependency when conf="*->@"

Artifact not included from dependency's dependency when conf="*->@"

by oman002 :: Rate this Message:

| View in Thread

Hi there,

My project casperdatasets-io has a dependency on com.google.code.gson. Ivy correctly resolves casperdatasets-io and the gson-2.1.jar artifact of com.google.code.gson.
 
My project JAMSIM depends on casperdatasets-io. But when Ivy resolves the default conf of JAMSIM and I inspect the Ivy report for  JAMSIM, it does not include the com.google.code.gson artifact:

gson by com.google.code.gson
Revision: 2.1
Home Page http://code.google.com/p/google-gson/ 
Status release
Publication 20111231202009
Resolver public
Configurations default, compile, master(*), runtime, compile(*), javadoc, runtime(*), master, sources
Artifacts size 0 kB (0 kB downloaded, 0 kB in cache)
Licenses The Apache Software License, Version 2.0

Required by
Organisation Name Revision In Configurations Asked Revision
net.casper casperdatasets-io 2.1.1 default, master(*), compile(*), javadoc, runtime(*), sources latest.integration

Dependencies
No dependency  

Artifacts
No artifact  


Gson ivy.xml has this:

        <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="gson" type="jar" ext="jar" conf="master"/>
                <artifact name="gson" type="source" ext="jar" conf="sources" m:classifier="sources"/>
                <artifact name="gson" type="javadoc" ext="jar" conf="javadoc" m:classifier="javadoc"/>
        </publications>

I'm resolving the default conf of JAMSIM ivy.xml... In JAMSIM ivy.xml I have:

<dependency org="net.casper" name="casperdatasets-io" rev="latest.integration" conf="*->@"/>

In casperdatasets-io ivy.xml I have:

<dependency org="com.google.code.gson" name="gson" rev="latest.integration" conf="*->@"/>

When I change casperdatasets-io ivy.xml to

<dependency org="com.google.code.gson" name="gson" rev="latest.integration" conf="default"/>

It works.. but I don't understand why it shouldn't work with conf="*->@"

What do I need to do to get this to work with conf="*->@" ?

I'm using Ivy 2.2.0.

Many thanks,

Oliver

Here are my files in full:

Casperdatasets-io ivy.xml
--------------------------------

<?xml version="1.0" encoding="UTF-8"?>
<ivy-module version="2.0">

        <info organisation="net.casper" module="${name}" revision="${version}" status="release">
                <license name="LGPL" url="http://www.gnu.org/licenses/lgpl.html" />
                <description homepage="http://code.google.com/p/casperdatasets/">
                        Casper datasets I/O modules for loading datasets to/from files
                        and Java POJO beans.
                </description>
        </info>

        <configurations>
                <conf name="default" visibility="public" description="binary artifacts of this module and its dependencies"/>
                <conf name="sources" visibility="public" description="source artifacts of this module and its dependencies"/>
                <conf name="javadoc" visibility="public" description="javadoc artifacts of this module and its dependencies"/>
        </configurations>

        <publications>
                <artifact conf="default" />
                <artifact name="${name}-sources" type="source" conf="sources" ext="jar" />
                <artifact name="${name}-javadoc" type="javadoc" conf="javadoc" ext="jar" />
                <artifact type="pom" ext="pom" conf="default"/>
        </publications>

        <dependencies>
                <dependency org="net.casper" name="casperdatasets" rev="latest.integration" conf="*->@"/>
                <dependency org="org.omancode" name="omcutil" rev="latest.integration" conf="*->@"/>
                <dependency org="org.omancode" name="readmytables" rev="latest.integration" conf="*->@"/>
                <dependency org="org.omancode" name="readmytablesfromfiles" rev="latest.integration" conf="*->@"/>
        <dependency org="commons-lang" name="commons-lang" rev="latest.integration" conf="*->@"/>
        <dependency org="commons-beanutils" name="commons-beanutils" rev="latest.integration" conf="*->@">
        <exclude name="commons-collections"/>
        </dependency>
        <dependency org="net.sourceforge.supercsv" name="supercsv" rev="latest.integration" />
        <dependency org="com.google.code.gson" name="gson" rev="latest.integration" conf="*->@"/>
       
        <!-- exclude dependencies artifacts based on configuration -->
                <exclude type="source" ext="*" conf="master,javadoc"/>
                <exclude type="javadoc" ext="*" conf="master,sources"/>
                <exclude type="jar" ext="*" conf="sources,javadoc"/>
       
    </dependencies>
</ivy-module>

Casperdatasets-io ivysettings.xml
-----------------------------------------

<ivysettings>
        <include url="${ivy.default.settings.dir}/ivysettings.xml" />
       
        <!-- default, i.e use local, shared and public resolvers -->
        <settings defaultResolver="default" />
       
        <!-- make build.properites available for ivy.xml -->
        <properties file="${ivy.basedir}/build.properties" />
       
        <resolvers>

                <ibiblio name="omcutil-repo" root="http://omcutil.googlecode.com/git/repo/" m2compatible="true" />
               
                <ibiblio name="readmytables-repo" root="http://readmytables.googlecode.com/git/repo/" m2compatible="true" />

                <ibiblio name="casper-repo" root="http://casperdatasets.googlecode.com/svn/trunk/repo/" m2compatible="true" />

                <!-- the ivyroundup packager repo -->
                <packager name="ivyroundup" buildRoot="${user.home}/.ivy2/packager/build"
                        resourceCache="${user.home}/.ivy2/packager/cache"
                        preserveBuildDirectories="true">
                        <ivy
                                pattern="http://ivyroundup.googlecode.com/svn/trunk/repo/modules/[organisation]/[module]/[revision]/ivy.xml" />
                        <artifact
                                pattern="http://ivyroundup.googlecode.com/svn/trunk/repo/modules/[organisation]/[module]/[revision]/packager.xml" />
                </packager>

                <!-- for publishing to -->
                <filesystem name="local-maven-repo" m2compatible="true">
                        <artifact pattern="${ivy.basedir}/../repo/[organisation]/[module]/[revision]/[artifact]-[revision](-[classifier]).[ext]"/>
                </filesystem>

        </resolvers>
        <modules>
                <!--  define resolvers for specific modules -->
                <module organisation="net.sourceforge.supercsv" resolver="ivyroundup" />
                <module organisation="net.casper" resolver="casper-repo" />
                <module organisation="org.omancode" name="omcutil" resolver="omcutil-repo" />
                <module organisation="org.omancode" name="readmytables" resolver="readmytables-repo" />
                <module organisation="org.omancode" name="readmytablesfromfiles" resolver="readmytables-repo" />
        </modules>
</ivysettings>

JAMSIM ivy.xml
--------------------

<?xml version="1.0" encoding="UTF-8"?>
<ivy-module version="2.0">

        <info organisation="org.jamsim" module="jamsim" revision="${version}" status="release">
                <license name="LGPL" url="http://www.gnu.org/licenses/lgpl.html" />
                <description homepage="http://code.google.com/p/jamsim/">
                </description>
        </info>

        <configurations>
                <conf name="default" visibility="public" description="binary artifacts of this module and its dependencies"/>
                <conf name="sources" visibility="public" description="source artifacts of this module and its dependencies"/>
                <conf name="javadoc" visibility="public" description="javadoc artifacts of this module and its dependencies"/>
        </configurations>

        <publications>
                <artifact conf="default"/>
                <artifact name="${name}-sources" type="source" conf="sources" ext="jar" />
                <artifact name="${name}-javadoc" type="javadoc" conf="javadoc" ext="jar" />
                <artifact type="pom" ext="pom" conf="default"/>
        </publications>

        <dependencies>
                <dependency org="org.ascape" name="ascape" rev="5.6.1"/>

                <dependency org="net.casper" name="casperdatasets-ext" rev="latest.integration" conf="*->@"/>
                <dependency org="net.casper" name="casperdatasets-io" rev="latest.integration" conf="*->@"/>

                <dependency org="org.omancode" name="romanface" rev="latest.integration" conf="*->@"/>
                <dependency org="org.omancode" name="omcutil" rev="[1.2.4,)" conf="*->@"/>
        <dependency org="org.rosuda" name="javaGD" rev="latest.integration"/>
       
        <dependency org="org.javabuilders" name="javabuilder-swing" rev="1.1-RC4"/>
        <!-- slf4j needed for javabuilders -->
        <dependency org="org.slf4j" name="slf4j-log4j12" rev="latest.integration"/>
       
        <dependency org="colt" name="colt" rev="latest.integration">
                <exclude name="concurrent" />
        </dependency>
       
        <dependency org="org.jedit" name="jedit-textArea" rev="latest.integration"/>
       
        <!-- exclude dependencies artifacts based on configuration -->
                <exclude type="source" ext="*" conf="default,javadoc"/>
                <exclude type="javadoc" ext="*" conf="default,sources"/>
                <exclude type="jar" ext="*" conf="sources,javadoc"/>
       
    </dependencies>
</ivy-module>

JAMSIM ivysettings.xml
-----------------------------

<ivysettings>
        <include url="${ivy.default.settings.dir}/ivysettings.xml" />
        <!-- default, i.e use local, shared and public resolvers -->
        <settings defaultResolver="default" />
       
        <!-- make build.properties available for ivy.xml -->
        <properties file="${ivy.basedir}/build.properties" />
       
        <resolvers>

                <ibiblio name="romanface-repo" root="http://romanface.googlecode.com/git/repo/" m2compatible="true" />
               
                <ibiblio name="omcutil-repo" root="http://omcutil.googlecode.com/git/repo/" m2compatible="true" />
               
                <ibiblio name="readmytables-repo" root="http://readmytables.googlecode.com/git/repo/" m2compatible="true" />

                <ibiblio name="jamsim-repo" root="http://jamsim.googlecode.com/git/repo/" m2compatible="true" />
               
                <ibiblio name="casper-repo" root="http://casperdatasets.googlecode.com/svn/trunk/repo/" m2compatible="true" />

                <!-- the javabuilders maven repo -->
                <ibiblio name="javabuilders" root="http://javabuilders.googlecode.com/svn/repo/"
                        m2compatible="true" />

                <!-- the ivyroundup packager repo -->
                <packager name="ivyroundup" buildRoot="${user.home}/.ivy2/packager/build"
                        resourceCache="${user.home}/.ivy2/packager/cache"
                        preserveBuildDirectories="true">
                        <ivy
                                pattern="http://ivyroundup.googlecode.com/svn/trunk/repo/modules/[organisation]/[module]/[revision]/ivy.xml" />
                        <artifact
                                pattern="http://ivyroundup.googlecode.com/svn/trunk/repo/modules/[organisation]/[module]/[revision]/packager.xml" />
                </packager>

                <!-- for publishing to -->
                <filesystem name="local-maven-repo" m2compatible="true">
                        <artifact pattern="${ivy.basedir}/../repo/[organisation]/[module]/[revision]/[artifact]-[revision](-[classifier]).[ext]"/>
                </filesystem>
               
        </resolvers>
        <modules>
                <!--  define resolvers for specific modules -->
                <module organisation="net.casper" resolver="local" />
                <module organisation="org.beanshell" resolver="romanface-repo" />
                <module organisation="org.rosuda" resolver="romanface-repo" />
                <module organisation="org.omancode" name="omcutil" resolver="omcutil-repo" />
                <module organisation="org.omancode" name="readmytables" resolver="readmytables-repo" />
                <module organisation="org.omancode" name="readmytablesfromfiles" resolver="readmytables-repo" />
                <module organisation="org.javabuilders" resolver="javabuilders" />
                <module organisation="net.sourceforge.supercsv" resolver="ivyroundup" />
                <module organisation="org.ascape" resolver="ivyroundup" />
                <module organisation="org.omancode" name="romanface" resolver="romanface-repo" />
                <module organisation="org.jedit" resolver="jamsim-repo" />
               
        </modules>
</ivysettings>

Gson ivy.xml
----------------

<?xml version="1.0" encoding="UTF-8"?>
<ivy-module version="2.0" xmlns:m="http://ant.apache.org/ivy/maven">
        <info organisation="com.google.code.gson"
                module="gson"
                revision="2.1"
                status="release"
                publication="20111231202009"
        >
                <license name="The Apache Software License, Version 2.0" url="http://www.apache.org/licenses/LICENSE-2.0.txt" />
                <description homepage="http://code.google.com/p/google-gson/">
                Google Gson library
                </description>
                <m:properties__project.build.sourceEncoding>UTF-8</m:properties__project.build.sourceEncoding>
                <m:properties__sonatypeOssDistMgmtSnapshotsUrl>https://oss.sonatype.org/content/repositories/snapshots/</m:properties__sonatypeOssDistMgmtSnapshotsUrl>
                <m:maven.plugins>org.apache.maven.plugins__maven-enforcer-plugin__1.0-beta-1|org.apache.maven.plugins__maven-enforcer-plugin__1.0-beta-1|org.apache.maven.plugins__maven-compiler-plugin__2.3.2|org.apache.maven.plugins__maven-jar-plugin__2.3.2|org.apache.maven.plugins__maven-source-plugin__2.1.2|org.apache.maven.plugins__maven-javadoc-plugin__2.8|org.apache.maven.plugins__maven-eclipse-plugin__2.8|org.apache.maven.plugins__maven-jxr-plugin__2.2|org.apache.maven.plugins__maven-pmd-plugin__2.5|org.apache.maven.plugins__maven-checkstyle-plugin__2.6|org.codehaus.mojo__taglist-maven-plugin__2.4|org.codehaus.mojo__cobertura-maven-plugin__2.4|org.apache.maven.plugins__maven-release-plugin__null|null__maven-assembly-plugin__2.2.2</m:maven.plugins>
        </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="gson" type="jar" ext="jar" conf="master"/>
                <artifact name="gson" type="source" ext="jar" conf="sources" m:classifier="sources"/>
                <artifact name="gson" type="javadoc" ext="jar" conf="javadoc" m:classifier="javadoc"/>
        </publications>
        <dependencies>
                <dependency org="junit" name="junit" rev="3.8.2" force="true" conf="test->runtime(*),master(*)"/>
        </dependencies>
</ivy-module>

 « Return to Thread: Artifact not included from dependency's dependency when conf="*->@"