It's working for me with this testproject:
.
|-- pom.xml
`-- src
`-- main
|-- assembly
| |-- A.xml
| |-- B.xml
| `-- C.xml
`-- java
`-- TestClass.java
pom.xml:
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>my-test-group</groupId>
<artifactId>my-test-artifact</artifactId>
<version>1.0-SNAPSHOT</version>
<build>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.2-beta-1</version>
<executions>
<execution>
<id>execution-one</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<finalName>CUSTOM</finalName>
<appendAssemblyId>false</appendAssemblyId>
<descriptors>
<descriptor>src/main/assembly/A.xml</descriptor>
</descriptors>
</configuration>
</execution>
<execution>
<id>execution-two</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<descriptors>
<descriptor>src/main/assembly/B.xml</descriptor>
<descriptor>src/main/assembly/C.xml</descriptor>
</descriptors>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
The only difference is that I used the 'single' goal instead of the
'attached' one and I changed the lone <descriptor/> tag to be in a
<descriptors/> list as well (I just noticed that the lone descriptor tag
will be depricated).
If you can't get it working just post the relevant ouptut of 'mvn -X
...' and hopefully we can figure it out together.
-Tim
Ritz, Martin schrieb:
thx for the quick response but i get an error if i split like you told me.
Error:
the system couln't find the assembly descriptor file...
But i have declared the right path and filename and the files are existing.
Any hint what i'am doing wrong?
Martin
Hi,
split the plugin configuration in distinct executions:
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<id>execution-one</id>
<goals>
<goal>attached</goal>
</goals>
<configuration>
<finalName>customName</finalName>
<appendAssemblyId>false</appendAssemblyId>
<descriptor>src\main\assembly\a.xml</descriptor>
</configuration>
</execution>
<execution>
<id>execution-two</id>
<goals>
<goal>attached</goal>
</goals>
<configuration>
<descriptors>
<descriptor>src\main\assembly\b.xml</descriptor>
<descriptor>src\main\assembly\c.xml</descriptor>
</descriptors>
</configuration>
</execution>
</executions>
</plugin>
-Tim
Ritz, Martin schrieb:
Hi,
i want to specify the name of one of three triggered
assembly descriptors.
I have three different assemblies to build and the name of
one should
be
templates.zip instead of test-0.8.7-SNAPSHOT-templates.zip
If i declare the name with the <finalName> i define the
element of all assemblies.
Is there a way to declare the finalName in the assembly-descriptor?
I dont want to use an extra profile.
assembly-plugin in my pom
...
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>attached</goal>
</goals>
</execution>
</executions>
<configuration>
<descriptors>
<descriptor>src\main\assembly\a.xml</descriptor>
<descriptor>src\main\assembly\b.xml</descriptor>
<descriptor>src\main\assembly\c.xml</descriptor>
</descriptors>
</configuration>
</plugin>
...
__
regards
Martin Ritz
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]