ant-ivy-user mailing list archives

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

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="http://ant.apache.org/ivy/maven">
	<info organisation="jasperreports"
		module="jasperreports"
		revision="3.5.1"
		status="release"
		publication="20090519233650"
	>
...
	</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="optional" visibility="public" description="contains all  
optional dependencies"/>
	</configurations>
	<publications>
..
	</publications>
	<dependencies>
		<dependency org="commons-beanutils" name="commons-beanutils"  
rev="1.7.0" force="true" conf="compile->compile(*),master(*);runtime- 
 >runtime(*)"/>
		<dependency org="commons-collections" name="commons-collections"  
rev="2.1" force="true" conf="compile->compile(*),master(*);runtime- 
 >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(*)"/>
	</dependencies>
</ivy-module>


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"
                       url="http://repository.codehaus.org/org/codehaus/groovy/groovy-all/1.5.5/groovy-all-1.5.5.jar

"/>
             <include name="*"/>
         </dependency>

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"  
conf="default;optional->[org=org.apache.xmlgraphics]default">

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.


---
regards
Marc Logemann
http://www.logemann.org
http://www.logentis.de





Mime
View raw message