The maven assembly plugin is not using the finalName for installing with attach=true?
Posted
by Roland Wiesemann
on Stack Overflow
See other posts from Stack Overflow
or by Roland Wiesemann
Published on 2010-05-02T13:07:32Z
Indexed on
2010/05/02
13:17 UTC
Read the original article
Hit count: 359
maven-assembly-plugin
|maven-2
I have configured following assembly:
<build>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.2-beta-5</version>
<executions>
<execution>
<id>${project.name}-test-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<appendAssemblyId>false</appendAssemblyId>
<finalName>${project.name}-test</finalName>
<filters>
<filter>src/assemble/test/distribution.properties</filter>
</filters>
<descriptors>
<descriptor>src/assemble/distribution.xml</descriptor>
</descriptors>
<attach>true</attach>
</configuration>
</execution>
<execution>
<id>${project.name}-prod-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<appendAssemblyId>false</appendAssemblyId>
<finalName>${project.name}-prod</finalName>
<filters>
<filter>src/assemble/prod/distribution.properties</filter>
</filters>
<descriptors>
<descriptor>src/assemble/distribution.xml</descriptor>
</descriptors>
<attach>true</attach>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
This produced two zip-files:
- distribution-prod.zip
- distribution-test.zip
My expectation for the property attach=true is, that the two zip-files are installed with the name as given in property finalName. But the result is, only one file is installed (attached) to the artifact. The maven protocol is:
- distrib-0.1-SNAPSHOT.zip
- distrib-0.1-SNAPSHOT.zip
The plugin is using the artifact-id instead of property finalName! Is this a bug?
The last installation is overwriting the first one. What can i do to install this two files with different names?
Thanks for your investigation. Roland
© Stack Overflow or respective owner