Eclipse Maven Integration
Honestly, I was pretty unsure regarding Maven at all. “Why should I port my projects from Ant, where everything is plain, simple and predictable? Single point integration jars are connected to their dependent projects, shared ones are extracted to a Libraries project. Deployment is as easy as checkout and build…” - I convinced myself.
But soon I’ve realized that if our team’s Product is no more than a chain in the string of Products and Components which are unified into the Solution, than why the hell should our code base not to be like that? It’s so nice that lots of Environments has their packaging systems which make installation simple and aesthetic… So if you work in Java and harmony and beauty are not just senseless terms for you, believe me, you should use Maven.
The main Maven’s advantage over Ant is that each dependency, called artifact can be (and commonly is) an independent project with its own history of versions and dependencies. So, if you want your project to be dependent of any library, you can just find it in one of major Maven repositories, add its id to your pom and - voila! it works.
Then, when time comes to deploy your stuff, you pack it and do the same - upload your stuff to another maven repository. Here the cycle closes and the universal happiness has been achieved.
Now, regarding the subject. There are 2 Maven Eclipse plug-ins in the market - m2eclipse and q4eclipse. Both of them recently were accepted as Eclipse native incubation projects as M2E and IAM. I tried them both starting from the second, but as it always happens, the first was the better one. M2E is very stable, comfortable and easy to understand w/o any documentation, while IAM is pretty buggy and unclear.
So I chose M2E to work with and it took just about 3 hours to convert all my projects to poms, configuring all their dependencies and then converting the projects into Maven managed ones. With the last action, all the Eclipse dependencies convert into Maven dependencies, the build is replaced with Maven build and it guarantees that there will be no surprises in production builds. And then you can proceed with LB/Continuum/CC with no time spent to understand why nothing doesn’t get built correctly.
Now what’s remaining is to reintegrate the changes from the sandbox branch and help the team to not be too scared of the changes ![]()
Posted February 20th, 2009 by Seva Lapsha in category: development, eclipse, integration, java, software, unit testing
You can leave a response, or trackback from your own site.
2 Responses to “Eclipse Maven Integration”
Leave a Reply
You must be logged in using your Eclipse Bugzilla account to post a comment.


Eugene Kuleshov Says:
February 20th, 2009 at 06:33:34
You know that you don’t need mvnrepository.org to search for your libraries? This functionality is already in m2eclipse and well integrated into the POM editor.
Seva: Yeah, I saw it, but for some reason it just doesn’t work. It only shows me the artifacts which are already configured in my projects. Anyway, I’m using Nexus to proxy all the artifacts, so the direct integration is less important.
Abel Says:
February 20th, 2009 at 02:14:01
Good to see that the number of Maven users is increasing in the Eclipse community :-).
I’m sorry you evaluated q4e… the last release is a bit rusty since we have not been able to solve all the IP issues involved in the move to the Eclipse Foundation. Many improvements have been committed to the Eclipse SVN already.
On the other hand, we would like to know which where your pain points with q4e (I could not find any issues on bugzilla. We area friendly bunch
, come and tell us what you’d like to be improved on the newsgroup or devlist.
Seva: I promise to reevaluate it again one day