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