On Fri, October 12, 2007 3:31 am, Wayne Fay wrote:
> If you are truly "converting" from Ant to Maven, the correct approach
> would be to "convert" the application structure into the suggested
> Maven layout.
>
> You should be able to do this in a branch in your SCM so as to not
> disturb the rest of your team until you are ready to finalize your
> changes.
Having done this conversion on a large project in the past year, in
practise the full conversion to maven took a very long time, so this
strategy may not work.
If you are not experienced in maven already, the best thing to do is to
take baby steps.
Get the most simplest part of your project (the jars) building cleanly
with maven, and use this as a testing ground to get you familiar with the
maven build process. Do this on the existing sources if you can, by
dropping in pom.xml into the root of each jar as necessary. It will
probably become apparent as you go on that some of your code needs to be
restructured. Do this as necessary, updating your ant build as you go
along to keep everything working.
Sometimes, you may find that an ant build produces more than one artifact,
such as an EJB, and then an EAR file. What we did was to create new
projects alongside the EJB project, which only built the EAR file (This
project contained a pom.xml file and nothing else).
Eventually we were ready to wean people off the ant build and get things
going with maven only, and the conversion has worked very well.
The prize at the end of all this work is worth it: All our code is built
and tested using continuous integration, with no platform or machine
specific build setups (we had hard coded paths *everywhere*).
A release is tested, tagged, and built from the pristine tag (no more
releases from working copies) start to finish within 30 minutes ("Help! We
need to get this bugfix into UAT as soon as possible!", "No problem".),
and we now have the *exact* source code used to create a production
release ("Help! We need to replicate this production problem in a
development environment!", "No problem").
The docs are all auto-built and auto-deployed ("Help! We need to cook up a
plan to make javadocs available, which will be very difficult!", "Already
done, here is the URL").
Regards,
Graham
--
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]