ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tom <>
Subject Re: Configurations and Ivy file confusion
Date Thu, 23 Apr 2009 06:41:01 GMT

> A module defines one or more configurations, which will be used to 
> meet different needs. For example, the logging framework slf4j defines 
> a "core" configuration, which includes only the API jar. It then has a 
> configs for each implementation choice a user might want, "log4j", 
> "jul", "jcl", etc.

That actually makes sense. :-) So it is a qualifier, though up by the 
developer. Is there some central place where one can find these 
qualifiers? Like the pom.xml in the Maven repositories?

> If you wanted to use slf4j and log4j in your runtime deployment, you'd 
> map your runtime configuration to slf4j's core and log4j configurations:
> <dependency name="slf4j" conf="runtime->core,log4j"/>

My runtime requires slf4j's core and log4j. Understood. However, what 
happens when slf4j then cascades onto log4j itself which theoretically 
may have a different set of configurations? Let's assume log4j uses 
"main" instead of "core"? Hmmmm... Slf4j-core does have it own 
dependency information which knows about what configurations it 
dependency supports. Ok. It really makes sense.

So what would be the appropriate way to split-up the set. As said: I 
want to split between between what is required at compiletime, test and 
runtime. The leading example would be that junit should not be present 
in lib but lib-test.

> Curious. Have you tried identifying the set of jars which differs 
> between your two ivy.xml files, and looking in your resolution output 
> to see which dependencies they derive from?

Appearantly I did something wrong. Running "ivy:retrieve" now downloads 
94 jars. Ok. However, if I I now want to split up like this:

        <ivy:retrieve conf="runtime" 
        <ivy:retrieve conf="test" 
        <ivy:retrieve conf="build" 

Then I get an error

C:\Documents and Settings\User\My 
Documents\kpprofiler2\components\service\build.xml:39: impossible to ivy 
retrieve: java.lang.RuntimeException: problem during
retrieve of nl.knowledgeplaza#kpprofiler-service: 
java.lang.RuntimeException: Multiple artifacts of the module 
org.codehaus.enunciate#enunciate-rt;1.10 are ret
ieved to the same file! Update the retrieve pattern  to fix this error.

For easy reproducing I have attached my ivy.xml and ivysettings.xml


View raw message