Please help solve a Maven mess when migrating an old project from ant / jar builds

I know this is a frequent one but I tried all previous solutions and got lost on the way.

Here we go:

I have the following structure: An old system called OB with four modules: Core, IO, Matching and GUI. IO and Matching reference Core, GUI references all the rest. Development is done in Eclipse with project references and an ANT script compiles the whole thing to 4 jars and a lib folder.

A newer system called ORE references these 4 jars. and has a bigger lib folder of which the OB lib folder is a subset.

I've been trying for a week to get this thing into a maven structure. I'll spare you the humongous mess I did and lets just say I'm open for concrete suggestions.

Thanks in advance,



Given that you also use eclipse, and need a good way of integrating it, I would suggest you set it up as a multi module build, layed out from (minimum) 6 directories from root:

- build
- core
- io
- matching
- ob
- ore

Build is the master project to build it all. Add reference to all the modules from here

<project xmlns="" xmlns:xsi=""
  <!-- The Basics -->
  <!-- Change Project version here. Do not use a property for this, Maven will complain -->


Core and the others could refer back to this build pom as parent, but it is not necessary unless you have global settings in the build pom (such as compiler versions et al).

Instead, each project could be rather individual (but keep the version number the same). Given core is standalone, I could show you io instead:

  <!-- The Basics -->


  <!--Parent is optional but useful if you need global settings in the build pom -->

 <!-- Refer back to other projects easily -->


With this setup it is easy to import in eclipse (Import as Maven project). I usually find that the slight strict nature of maven leads to aligning projects a little bit better, so eventually I end up moving sources and resources around to better fit the maven model (convention does make pom files smaller).

Occasionally you may end up with defining a few more modules along the way, but that would be no problem.

You can controll all modules from the build directory, such as

mvn clean install
mvn versions:set -DnewVersion=2.1.16.GA -DgenerateBackupPoms=false
mvn sonar:sonar

or whatever you fancy.

You can modify the source directories used by maven, configuring it by exception.

The Maven site has a brief tutorial on it here.

I have not migrated from Ant to Maven before, but I have given a suggestion from many other devs that this is the normal case when doing it.

All you need to do is to put all the references in your respective pom.xml. -IO's and matching's pom will have dependency of Core. like


Same thing goes for other modules. You can define modules inside your pom.xml. It should work for you if I understood your problem correctly.

Need Your Help

Appcelerator Titanium Mobile showTimePickerDialog not showing

android appcelerator

I posted this on the Appcelerator Q&amp;A but I've got a feeling that place is kinda dead. So...