Moving from Ant to Maven: Best Practices with Maven Plugins
Join the DZone community and get the full member experience.
Join For FreeI would like to share my experience of moving from "our reinventing wheel" of Ant build scripts to Maven standard. I reworked some apps which have following characteristics:
Java Version:
Basic technologies:
Packaging:
Test:
Optimization:
Quality check:
Deployment:
Development support:
Yes, our Ant scripts can do the (almost) whole things above. You can imagine how complex they are? Yes, everything are in the Ant scripts and you need to turn on/off the features you need. Remember how SAP works? Yes, we call this customizing! This is where I see the power of Maven. The plugin concept is just a better concept. Instead of having everything, we only have a small "core" and we add plugins on the top to fullfil our need. In case of the Ant scripts, you have everything (although you don't need all of them) and then you use switcher to turn them on and off.
So how did I solve the requirements above with Maven? Here they are, the plugins we need! In this article I just want to show you the plugins I used:
...
Continue read this article at: http://lofidewanto.blogspot.com/2011/06/moving-from-ant-to-maven-best-practices.html
...
As a conclusion I just can say, Maven and its plugin ecosystem are great. No matter how complex your project you can still handle it easily with Maven plugins. My lessons learned is that DO NOT REINVENTING WHEEL! There are a lot of good Maven plugins out there! In case you cannot find one, just use maven-antrun-plugin. You can almost do everything with it. Just don't forget that you don't want that chaos back to Ant, so use it with precautions.
... and to all other developers who still doing their own build processes... try Maven, you won't regret!
Discussion: so what are your experiences with Maven plugins? What are your favorites Maven plugins?
From http://lofidewanto.blogspot.com/2011/06/moving-from-ant-to-maven-best-practices.html
Opinions expressed by DZone contributors are their own.
Comments