How can I change the name from 1.0.snapshot-jar-with-dependencies
to something else, below are contents of my POM:
<build> <plugins> <plugin> <artifactId>maven-assembly-plugin</artifactId> <version>2.2-beta-5</version> <configuration> <archive> <manifest> <mainClass>com.package.example.MainClass</mainClass> </manifest> </archive> <descriptorRefs> <descriptorRef>jar-with-dependencies</descriptorRef> </descriptorRefs> </configuration> </plugin> </plugins> </build>
use the finalName tag to define/change the name of the war file in the web module that produces the war.
You can rename the WAR file if you are using a WAR file for deployment, and you want to use "Workplace XT" or a custom name for the context root of the application.
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.
Use the following in the configuration of the maven-assembly-plugin
:
<configuration> <finalName>custom-name</finalName> <appendAssemblyId>false</appendAssemblyId> </configuration>
Full details in the official documentation of the assembly:single
mojo.
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