You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Thomas Champagne (JIRA)" <ji...@codehaus.org> on 2010/11/23 14:55:03 UTC

[jira] Created: (MASSEMBLY-531) Define finalName for each assembly

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

        

[jira] Commented: (MASSEMBLY-531) Define finalName for each assembly

Posted by "Thomas Champagne (JIRA)" <ji...@codehaus.org>.
    [ 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

        

[jira] Closed: (MASSEMBLY-531) Define finalName for each assembly

Posted by "John Casey (JIRA)" <ji...@codehaus.org>.
     [ https://jira.codehaus.org/browse/MASSEMBLY-531?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

John Casey closed MASSEMBLY-531.
--------------------------------

    Resolution: Won't Fix
      Assignee: John Casey

You can set this per-execution in the plugin definition, and assign each assembly descriptor to a separate execution section to separate the finalNames.

You don't need the ability to configure it in the assembly descriptor.

> 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