Creating Two Executable Jars Using maven-assembly-plugin

So as soon as I posted this, I found this thread: Create multiple runnable Jars (with depencies included) from a single Maven project This uses a different approach in that it doesn’t use two profiles, it uses two executions, as such: <plugin> <artifactId>maven-assembly-plugin</artifactId> <version>2.4</version> <executions> <execution> <id>build-publisher</id> <configuration> <appendAssemblyId>false</appendAssemblyId> <archive> <manifest> <mainClass>fully.qualified.path.Publisher</mainClass> </manifest> </archive> <descriptorRefs> … Read more

Error reading assemblies: No assembly descriptors found

I have been using version 2.3 of maven-assembly-plugin, but I believe the problem is the same: if the assembly configuration is declared inside an execution, it works from mvn package, but does not work from mvn assembly:assembly. The solution I have found is to declare the configuration in the top-level configuration of the plugin, and … Read more

ERROR OS=Windows and the assembly descriptor contains a *nix-specific root-relative-reference (starting with slash) / [duplicate]

simplest solution to prevent that warning is: <fileSets> <fileSet> <directory>src/main/resources</directory> <outputDirectory/> </fileSet> </fileSets> or an other solution is: <fileSets> <fileSet> <directory>src/main/resources</directory> <outputDirectory>./</outputDirectory> </fileSet> </fileSets> and it shows that something should be fixed.

Create multiple runnable Jars (with dependencies included) from a single Maven project [duplicate]

You can do it. You’ll need a separate execution for each artifact that you’re building (i.e., give each its own id but you can leave the phase as default), and you’ll need to specify the finalName and archive/manifest/mainClass for each. <build> <plugins> <plugin> <artifactId>maven-assembly-plugin</artifactId> <executions> <execution> <id>build-a</id> <configuration> <archive> <manifest> <mainClass>foobar.Aclass</mainClass> </manifest> </archive> <descriptorRefs> <descriptorRef>jar-with-dependencies</descriptorRef> … Read more

Maven: Packaging dependencies alongside project JAR?

I’ve like Maven to package a project with run-time dependencies. This part is unclear (it’s not exactly what you describe just after). My answer covers what you described. I expect it to create a JAR file with the following manifest (…) Configure the Maven Jar Plugin to do so (or more precisely, the Maven Archiver): … Read more