Richard Hauswald wrote on 06/10/2009 08:16 AM:
Hello list,
I'm new to ivy and have my problems understanding all the required
concepts. The examples helped me a lot :-) What I try to do is to
configure ivy that it loads only the required dependencies and their
sources... I managed to get all dependencies (incl optionals) with
sources and only the required ones without sources :-)

 <dependency
        org="net.sourceforge.stripes"
        name="stripes"
        rev="1.5.1"
        transitive="true" conf="*->default"/>

I'm not an expert with the way Ivy maps Maven goals to ivy configurations (if you find documentation on this, let me know), but I'd try:

 conf="compile,sources->default"

or, if you just want the runtime dependencies:

 conf="runtime,sources->default"

That should prevent you from getting any optional configurations, and give you the dependent jars and any sources as well.

For the record, if I do an ivy:install of stripes from the maven repo, here are the configurations Ivy generates from the pom:

        <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>

Thanks,
---
Kirby Files
Software Architect
Masergy Communications
[email protected]

Reply via email to