


We strongly recommend that you not configure a Maven project to create two separate JARs from a single project. I want to be very clear about this answer.

Using two separate profiles to build two classified JAR artifacts, and configuring two extra executions of the JAR plugin. However, since the subset of files is so small (less than 10), it seems like it might be overkill to have an entirely new project for that. Then the first project could depend on this one. I could split the subset of files into a second project and it will have its own pom. In ant, it's easy to have multiple build targets to handle this, but I'm trying to determine the best way to handle this in maven. the ant build has 2 build targets - one that builds the entire app, and one that builds a jar from some of those files (only a few). Someone asked a question about creating two build targets from a single project. This is a repost of an answer on Stackoverflow.
