[ 
https://jira.codehaus.org/browse/MASSEMBLY-531?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=277625#comment-277625
 ] 

Thomas Champagne commented on MASSEMBLY-531:
--------------------------------------------

Ok. Thanks for your answer.

So for previous example :
{code:xml}
<plugins>
  <plugin>
    <artifactId>maven-assembly-plugin</artifactId>
    <version>2.2</version>
    <executions>
      <execution>
        <id>package-base</id>
        <phase>package</phase>
        <goals>
          <goal>single</goal>
        </goals>
        <configuration>
          <finalName>base</finalName>
          <descriptors>
            <descriptor>src/main/assemblies/base.xml</descriptor>
          </descriptors>
        </configuration>
      </execution>
      <execution>
        <id>package-static</id>
        <phase>package</phase>
        <goals>
          <goal>single</goal>
        </goals>
        <configuration>
          <finalName>static</finalName>
          <descriptors>
            <descriptor>src/main/assemblies/static.xml</descriptor>
          </descriptors>
        </configuration>
      </execution>
    </executions>
    <configuration>
      <attach>false</attach>
      <appendAssemblyId>false</appendAssemblyId>
    </configuration>
  </plugin>
</plugins>
{code}

> Define finalName for each assembly
> ----------------------------------
>
>                 Key: MASSEMBLY-531
>                 URL: https://jira.codehaus.org/browse/MASSEMBLY-531
>             Project: Maven 2.x Assembly Plugin
>          Issue Type: Improvement
>    Affects Versions: 2.2
>            Reporter: Thomas Champagne
>            Assignee: John Casey
>
> 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.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to