ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marc Logemann>
Subject including conf while definining "default"
Date Tue, 28 Jul 2009 11:57:24 GMT

i need your help guys. I am just dont get the conf thingy correctly.  
Suppose the following (shortened) generated ivy file which was  
generated from a maven POM.

<ivy-module version="1.0" xmlns:m="">
	<info organisation="jasperreports"
		<conf name="default" visibility="public" description="runtime  
dependencies and master artifact can be used with this conf"  
		<conf name="master" visibility="public" description="contains only  
the artifact published by this module itself, with no transitive  
		<conf name="optional" visibility="public" description="contains all  
optional dependencies"/>
		<dependency org="commons-beanutils" name="commons-beanutils"  
rev="1.7.0" force="true" conf="compile->compile(*),master(*);runtime- 
		<dependency org="commons-collections" name="commons-collections"  
rev="2.1" force="true" conf="compile->compile(*),master(*);runtime- 
		<dependency org="commons-digester" name="commons-digester" rev="1.7"  
force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
		<dependency org="commons-logging" name="commons-logging" rev="1.0.2"  
force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
		<dependency org="org.apache.xmlgraphics" name="batik-bridge"  
rev="1.7" force="true" conf="optional->compile(*),master(*)"/>
		<dependency org="org.apache.xmlgraphics" name="batik-gvt" rev="1.7"  
force="true" conf="optional->compile(*),master(*)"/>
		<dependency org="org.springframework" name="spring-core" rev="2.5"  
force="true" conf="optional->compile(*),master(*)"/>
		<dependency org="org.springframework" name="spring-beans" rev="2.5"  
force="true" conf="optional->compile(*),master(*)"/>
		<dependency org="org.codehaus.groovy" name="groovy-all" rev="1.5.5"  
force="true" conf="optional->compile(*),master(*)"/>

And my ivy dependency inside my app looks like this:

         <!-- JASPER REPORTS -->
         <dependency name="jasperreports" rev="3.5.1"  
org="jasperreports" conf="default">
             <artifact name="groovy-all" type="jar" conf="default"

             <include name="*"/>

You alread see an ugly workaround because of not knowing the question  
i wanna ask. How can i retrieve SOME optional configs? As you can see,  
because i dont know a good solution yet, i just used artifact tag to  
include something but this is so bad because of no transitive deps and  
hardcoded urls and stuff.

Besides of the groovy-lib, i also want to include the batik libs  
mentioned above but i definitely dont want ALL optionals, because  
there are a lot of them.

I tried something like that w/o luck:  <dependency  
name="jasperreports" rev="3.5.1" org="jasperreports"  

So the basic question is: How can i include SOME optional libraries  
which are in the "optional" configuration while for the rest of the  
pack relying on "default" ?

Thanks a lot for help.

Marc Logemann

View raw message