This is plugin configuration I am using:
<plugin> <artifactId>maven-assembly-plugin</artifactId> <configuration> <archive> <manifest> <mainClass>com.mycompany.changepasswd</mainClass> </manifest> </archive> <finalName>changepasswd</finalName> <descriptorRefs> <descriptorRef>jar-with-dependencies</descriptorRef> </descriptorRefs> </configuration> </plugin>
When I run mvn clean install assembly:single
what I get is changepasswd-jar-with-dependencies.jar. How do I tell the assembly plugin to just name it changepasswd.jar
? Or is that something which is handled outside of the assembly plugin?
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.
tarLongFileMode: Sets the TarArchiver behavior on file paths with more than 100 characters length. Valid values are: "warn" (default), "fail", "truncate", "gnu", "posix", "posix_warn" or "omit".
Defines the rules for matching and working with files in a given base directory. Element.
In your configuration
element, try adding <appendAssemblyId>false</appendAssemblyId>
. I believe this did the trick for me.
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