Advice sought on how to best structure a maven project in java.net?
My project Swing Style (http://java.net/projects/swing-style) consists of two 'projects'. The first is the actual library for Swing Style, the second is a demo app (webstart enabled) that uses the main Swing Style library to build a GUI and show case what the framework can do.
I'm curious if anyone has any thoughts on how best to structure this from a Maven perspective. Currently I have followed the 'one pom per artifact' approach and created these as two separate modules, each with their own pom. To make it easy for me to build everything in one go, I have made a parent pom that these both share. This parent pom lives under 'trunk' and the other two projects under that. So my directory structure is:
~svn/trunk/pom.xml <-- parent pom, artifactId=swing-style-parent
~svn/trunk/swing-style/pom.xml <-- main project pom, artifactId=swing-style (inherits from swing-style-parent)
~svn/trunk/swing-style-demo/pom.xml <-- demo project pom, artifactId=swing-style-demo (inherits from swing-style-parent)
This works but when I now deploy to the public maven repo, I have to also deploy swing-style-parent because it is referenced by swing-style, and as a result, swing-style-demo also gets deployed.
Obviously there is no need for swing-style-demo to be in the main repo as it will never be used as a library that way. On the other hand, it doesn't really cause any problems being there.
My alternatives would be to drop the parent pom and just have the two projects be built independently of each other, or try and find some way to include them in the same project and only have one pom in total (producing two artifacts, which seems to go against the maven principles).
Does anyone have thoughts on this, has anyone done anything similar and come up with an approach they are happy with?