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 following in the configuration of the
maven-assembly-plugin
:Full details in the official documentation of the
assembly:single
mojo.In the case of packaging a JAR with dependencies, the won't work. You will fix it by using the dependency plugin:
You can achieve this by specifying the
finalName
property in your pom, e.g.