Ivy Retrieve with Classifiers -
i have following ivy.xml
:
<ivy-module version="1.0" xmlns:maven="http://maven.apache.org"> <configurations> ... </configurations> <dependencies> <dependency org="com.foo" name="fubur" rev="1.3" conf="runtime->default"/> <dependency org="com.snafu" name="barfu" rev="1.4" conf="runtime->default"> <artifact name="barfu" maven:classifier="id_10t" type="jar" ext="jar"/> </dependency> </dependencies> </ivy-module>
in build.xml
, want retrieve of jars war i'm building:
<ivy:retrieve pattern="${lib.dir}/[artifact]-[classifier]-[revision].[ext]" conf="runtime"/>
no, won't work... there's no classifier in fubar-1.3.jar
. download fubar--1.3.jar
<ivy:retrieve pattern="${lib.dir}/[artifact]-[revision].[ext]" conf="runtime"/>
that's no either. barfu-id_10t-1.4.jar
download barfu-1.4.jar
.
i jars in war included barfu-id_10t-1.4.jar
, fubar-1.3-jar`. there easy way of doing that? know create 2 different configurations, overkill. i'd rather have jars miss-named since doesn't affect war itself.
use parentheses specify optional components of attribute pattern:
<ivy:retrieve pattern="${lib.dir}/[artifact](-[classifier])-[revision].[ext]" conf="runtime"/>
Comments
Post a Comment