I have a project here which, currently, uses one pom.xml (link) to generate one \"artifact\".
What I\'d like to do is split the project, let\'s call it p, into:
I had a similar case and I agree with Michal's suggestion. However, I would like to extend the proposed solution further:
I'm assuming p has a single source and both p-core and p-format are generated from it. So you should create a parent POM for p with children modules (with their respective POMs) -- one for 'core' and one for 'format' but have these both source from the parent's /src/.
So essentially we segregating the build processes for 'core' and 'format' to generate specific artifacts but not replicating the original sources for p.
Maven supports but does not recommended this approach but I don't see why they shouldn't. In my opinion, its structured, clean and concern-seperating without any long-term implications and there is no better alternative.
http://maven.apache.org/guides/mini/guide-using-one-source-directory.html