Controlling Maven Final JAR Artifact Name
Question:
Modify a super POM's property to apply the final name of the generated artifact to all child projects. However, the project/build/finalName property doesn't seem to work.
Answer:
For Maven >= 3:
<packaging>jar</packaging> <build> <finalName>WhatEverYouLikey</finalName> </build>
See bug report/documentation for further details.
For Older Maven Versions:
Configure the finalName property within the plugin configuration section:
<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> <version>2.3.2</version> <configuration> <finalName>myJar</finalName> </configuration> </plugin>
The above is the detailed content of How to Control the Final JAR Artifact Name in Maven?. For more information, please follow other related articles on the PHP Chinese website!