If this is answered somewhere else, kindly smack me and point me in the right direction.
I'm brand new to Maven and trying to wrap my head around how to use it with my projects. I've got two top level projects, one a Swing app, the other is a set of Web Services. They both depend on the same in-house jar. What are good ways to set up the poms for this?
If the jar was only used by one of the projects, then it looks like I'd move it down inside and make it a module. But I don't want two (and later more) copies of that jar's source code.
One way it looks like I could do this is to have a master pom for the Swing app that has the Swing app and the library jar as a modules. Then have another master pom for the Web app set up the same way. Would that make sense? Are there better ways?
The directory structure is currently very straightforward:
Development/
----SwingApp/
----WebServices/
----CoreLibrary/
Way too much info and side questions follow:
I've inherited a "build system" (using the term loosely) which is 100% Netbeans autogenerated ant scripts. I started trying to put it into Continuous Integration, TeamCity, which I really like. I've run into serious problems trying to build the WebServices project with it. There are things in the generated ant (build-impl.xml) that cannot be overridden in the CI environment as far as I can tell. Combine this with some serious classpath hell in day to day development and you're starting to see why I want to go to maven.
One of the issues wrapped up in this question is a habit developers on my team all seem to have. Right now the various projects in Netbeans have project references to the "CoreLibrary" project. What this means is that when source is changed in "CoreLibrary" and the developer does a build on a top level app, it will also build the CoreLibrary as necessary. Can that be simulated in Maven? It would go a ways to ease the transition. So far I'm seeing that Netbeans (6.7) doesn't do that with maven builds, and I don't think I can sell (yet) doing the day-to-day build work outside of Netbeans.