Define finalName for each assembly
----------------------------------

                 Key: MASSEMBLY-531
                 URL: http://jira.codehaus.org/browse/MASSEMBLY-531
             Project: Maven 2.x Assembly Plugin
          Issue Type: Improvement
    Affects Versions: 2.2
            Reporter: Thomas Champagne


In my project, I would like to create some archives. 
For example, I must generate an archive for SQL Script (bases.xml) and an 
archive for static web file (images, css, js...) (static.xml). 

In the pom, I declare the assembly plugin with two assemblies descriptor :
{code}
<plugins>
  <plugin>
    <artifactId>maven-assembly-plugin</artifactId>
    <version>2.2</version>
    <executions>
      <execution>
        <id>package-hawai</id>
        <phase>package</phase>
        <goals>
          <goal>single</goal>
        </goals>
      </execution>
    </executions>
    <configuration>
      <appendAssemblyId>true</appendAssemblyId>
      <descriptors>
        <descriptor>src/main/assemblies/static.xml</descriptor>
        <descriptor>src/main/assemblies/bases.xml</descriptor>
      </descriptors>
    </configuration>
  </plugin>
</plugins>
{code}

So, assembly plugin generate two archives : 
[INFO] Building tar : [...]\target\myproject-1.0-SNAPSHOT-static.tar.gz
[INFO] Building tar : [...]\target\myproject-1.0-SNAPSHOT-bases.tar.gz

But, It would be nice if the assembly plugin generates archivers named as the 
assembly ID.
[INFO] Building tar : [...]\target\static.tar.gz
[INFO] Building tar : [...]\target\bases.tar.gz


A solution could be to define the finalName property like this : 
<finalName>${assembly.id}</finalName>

Thomas

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to