0

I have a maven project with multiple executable classes (with public static main). I must configure this project, so that I can build this project in a various ways. For example, I want to create an executable jar file with one of the classes as entry point, which packages all of it's dependencies in a single jar file. Another build routine copies all dependencies in a lib directory.

Is there a way that I can separate build systems? maybe by creating some child poms that build the parent with different build configs ? Or having multiple pom files in a single project, without having to worry about syncing them ?

I have no idea about the techniques that I can use. Please help !!

fahim ayat
  • 312
  • 5
  • 10
  • 1
    possible duplicate of [Create multiple runnable Jars (with depencies included) from a single Maven project](http://stackoverflow.com/questions/8726884/create-multiple-runnable-jars-with-depencies-included-from-a-single-maven-proj) – Joe May 22 '14 at 11:59
  • 1
    @Joe, That problem is about having multiple executions. My problem is a little more generic. I need to have multiple different build systems. for example, two different mains, jar and war, Jar with/without dependencies, etc. I'm looking for a solution that makes me able to have multiple POM files, One main and multiple POM files that describe build process. – fahim ayat May 22 '14 at 13:39
  • Take a look at maven-assembly-plugin. With that you can create a lot of different artifacts in a single pom. – Gábor Lipták Dec 05 '14 at 22:02

0 Answers0