Is it possible to override the default name of the jar file created running the assembly:single
goal? I want to add a jar with dependencies that has a non-standard name. I am using version 2.6 of the plugin.
Defines the rules for matching and working with files in a given base directory. Element.
This descriptor specifies the type of assembly archive to create, the contents of the assembly, and the ways in which dependencies or its modules are bundled with an assembly. <assembly xmlns="http://maven.apache.org/ASSEMBLY/2.1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
The Assembly Plugin for Maven enables developers to combine project output into a single distributable archive that also contains dependencies, modules, site documentation, and other files. Your project can easily build distribution "assemblies" using one of the prefabricated assembly descriptors.
This goal is suitable either for binding to the lifecycle or calling directly from the command line (provided all required files are available before the build starts, or are produced by another goal specified before this one on the command line).
Yes, you need to use the finalName
configuration attribute. Note that you probaby also want to remove the assembly id that is appended by default to the final name, with the help of the appendAssemblyId
attribute.
Sample configuration:
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.6</version>
<configuration>
...
<finalName>myFinalName</finalName>
<appendAssemblyId>false</appendAssemblyId>
</configuration>
</plugin>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With