Maven attach-artifact - keep original name
I am using build-helper-maven-plugin
to attach-artifact
add a custom jar file to the Nexus, next to the ear file. After the build finishes, the jar file exists, but instead of keeping its original name, it has been renamed to <project_name>-ear-<version>-<timestamp>.jar
. Is there anything I can do to keep its original name, i.e. Configure Maven to store the name?
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.9.1</version>
<executions>
<execution>
<id>attach-artifacts</id>
<phase>package</phase>
<goals>
<goal>attach-artifact</goal>
</goals>
<configuration>
<artifacts>
<artifact>
<file>../xxx/src/main/resources/lib/DbSynchronizer.jar</file>
<type>jar</type>
</artifact>
</artifacts>
</configuration>
</execution>
</executions>
</plugin>
+3
Lucas
source
to share
1 answer
No ... the Maven repository format uses coordinates to collect predicted filenames, ensuring they are downloaded reliably using the Maven repository format. If you need a different filename, rename the file after downloading it.
+3
Manfred moser
source
to share