We converted Mifos so it is built by Maven instead of Ant. This is because we wanted to:
- make Mifos more like other open source java webapp projects
- make Mifos easier to break into components
- allow us to use our Selenium-based acceptance test framework
- reduce our overhead in managing dependencies (jars)
- make incremental moves towards cutting-edge Java development tools, including using
- Spring Framework
- OSGI modules
- and more
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:
- Introduce Maven to build acceptanceTests and set off the ant build.
- Make Maven and Eclipse work together by deleting mifos/build/ dir, introducing mifos/target dir.
- Create mifos/src/main/java and move the contents of src/ there
- Create mifos/src/test/java and move the contents of test/ there.
- Create WEB-INF directory hierarchy and check it in, rather than having ant create it.
- Create a separate Birt directory under WEB-INF for the Birt files, and move them there.
- Move Birt-Mifos integration munging of web.xml into Maven.
- Rename the mifos/ directory to application/
- 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.
- Port build_db and build_test_db tasks to maven; call them from ant
- Create mifos/pom.xml, make it do the build and test; remove build.xml - build is now entirely done via Maven.
- Remove repositories from POMs
- 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
- 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:
- Remove mifos/ module order dependencies
- Convert mifos/ unit and integration tests to maven-surefire-plugin.
- Make a separate war module.
- Make a separate Birt module.