Tech-Today
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 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" />
-
How To Send Http Request Using Apache Httpcomponents Library
There are many ways to send request to a server and one of them is by using http client library. But this library has 2 versions now. The old httpclient and this httpcomponents. We will provide a sample code to try the latter. But before that we need...
-
How To Setup Your Google Code Repository To Be Accessible In Maven
This tutorial will teach us how we can setup a google code project, so we can make the artifact accessible via maven. Requirements: 1.) You should have an account in google code. The trick is just simply forming the correct url to be access by maven....
-
Could Not Resolve Dependencies For Project Com.xxxjar:-snapshot: Failed To Collect Dependencies For
I just have this weird problem using maven + artifactory. I have a project which I first build using maven-compiler 2.3.2, and maven2. It build successfully and I was able to deploy in artifatory 2.5. Eventually I've added several modules and one...
-
How To Install Maven 3 In Ubuntu 11.10
To install maven 3 you need to remove first, if you have, the previous versions installed (maven2). And execute the ff command in the terminal: sudo apt-get remove maven2 sudo add-apt-repository ppa:natecarlson/maven3 sudo apt-get install maven3 You...
-
How To Add Pmd Reporting To Maven
Before proceeding to this exercise, you may want to try my tutorial on how to setup a maven project to eclipse: http://czetsuya-tech.blogspot.com/2012/04/how-to-create-modularized-maven-project.html. Assuming you have follow the tutorial above, you should...
Tech-Today