We converted Mifos so it is built by Maven instead of Ant. This is because we wanted to:

The idea of this plan is to make incremental changes to our project, each one being small so it isn't risky and won't have a large impact on our development velocity. At the end of the series of steps, we will be 100% maven.

Here are the steps we followed:

  1. Introduce Maven to build acceptanceTests and set off the ant build.
  2. Make Maven and Eclipse work together by deleting mifos/build/ dir, introducing mifos/target dir.
  3. Create mifos/src/main/java and move the contents of src/ there
  4. Create mifos/src/test/java and move the contents of test/ there.
  5. Create WEB-INF directory hierarchy and check it in, rather than having ant create it.
  6. Create a separate Birt directory under WEB-INF for the Birt files, and move them there.
  7. Move Birt-Mifos integration munging of web.xml into Maven.
  8. Rename the mifos/ directory to application/
  9. Make Maven manage dependencies for ant. _ It is recommended to remove one dependency at a time from the lib dir into the pom.xml. See r14536 for some lessons learned trying to move some Apache Commons libraries. Please also update .classpath since most Mifos developers use Eclipse. _ all cheetah jars have been migrated to the pom.xml now.
  10. Port build_db and build_test_db tasks to maven; call them from ant
  11. Create mifos/pom.xml, make it do the build and test; remove build.xml - build is now entirely done via Maven.

Cleanup:

  1. Remove repositories from POMs
  2. Create mifos/src/main/sql and move the contents of mifos/src/main/java/org/mifos/framework/persistence/sql there; cause the maven build to put these files in mifos/target/mifos/WEB-INF/classes/org/mifos/framework/persistence/sql as usual
  3. Create mifos/test/main/sql and move the contents of mifos/src/test/java/org/mifos/framework/persistence/sql there; cause the maven build to put these files in mifos/target/test-classes/classes/org/mifos/framework/persistence/sql as usual

Still left to do:

  1. Remove mifos/ module order dependencies
  2. Convert mifos/ unit and integration tests to maven-surefire-plugin.
  3. Make a separate war module.
  4. Make a separate Birt module.