How to Use M:classifier in Apache Ivy for Dependency Management
Recently I've been working on a web service client project that uses apache axis2. And we use ivy for dependency management. Axis2 depen...
https://www.czetsuyatech.com/2011/09/maven-m-classifier-on-apache-ivy.html
Recently I've been working on a web service client project that uses apache axis2. And we use ivy for dependency management. Axis2 depends on several jars and one of them is mex, which could be located here:
http://mvnrepository.com/artifact/org.apache.axis2/mex/1.6.0
If you will look at the ivy tab, the dependency should be written in ivy.xml like:
<dependency org="org.apache.axis2" name="mex" rev="1.6.0"/>It get a URL like this: http://repo1.maven.org/maven2/org/apache/axis2/mex/1.6.0/mex-1.6.0.jar But looking at the actual download URL: http://repo1.maven.org/maven2/org/apache/axis2/mex/1.6.0/mex-1.6.0-impl.jar So obviously ivy will fail. "impl" is called classifier and should be implemented like this:
<dependency org="org.apache.axis2" name="mex" rev="1.6.0"> <artifact name="mex" type="jar" ext="jar" m:classifier="impl" />But ivy seems to ignore this tag, playing around with the tags I found out that it will work if classifier is brought up to the parent tag, which is dependency. So the working dependency should be written as:
<dependency org="org.apache.axis2" name="mex" rev="1.6.0" m:classifier="impl" />
Post a Comment