You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Dennis Lundberg (JIRA)" <ji...@codehaus.org> on 2012/11/02 10:45:13 UTC

[jira] (MASSEMBLY-45) Support for mappers in assembly desriptors

     [ https://jira.codehaus.org/browse/MASSEMBLY-45?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dennis Lundberg updated MASSEMBLY-45:
-------------------------------------

    Description: 
I would like to forward a wish to have the assembly plugin support the notion of file mappers similar to the ones in Ant[1]. To illustrate, assuming a multi-module project with the following layout:

{noformat}
     Root
       |-Module1
       |-Module2
       |-Container
       |  |-Module3
       |  |-Module4
       |-Module5
       |- pom.xml
{noformat}

and an assembly desriptor entry for the contained modules like this

{code:xml}
  <fileSets>
     <fileSets>
        <directory>Container</directory>
        <outputDirectory></outputDirectory>
        <includes>
          <include>**/target/*.jar</include>
        </includes>
     </fileSets>
  </fileSets>
{code}

The assembly plugin will be able to get all jar files produced by Module3 and Module4 but the "Container/<ModuleName>/target" structure will still be included. One workaround is to enumerate each <ModuleName> artifact but problematic if the number of contained sub-modules is numerous. Support for filemappers which  look like this:

{code:xml}
  <fileSets>
     <fileSets>
        <directory>Container</directory>
        <outputDirectory></outputDirectory>
        <includes>
          <include>**/target/*.jar</include>
        </includes>
	<mapper type="flatten">
     </fileSets>
  </fileSets>
{code}

will cause all contained jar files to be copied without their original structure. This feature would be useful for globbing artifact names as well as for physically organizing project structures according to type.

[1] http://ant.apache.org/manual/CoreTypes/mapper.html

  was:
I would like to forward a wish to have the assembly plugin support the notion of file mappers similar to the ones in Ant[1]. To illustrate, assuming a multi-module project with the following layout:

     Root
       |-Module1
       |-Module2
       |-Container
       |  |-Module3
       |  |-Module4
       |-Module5
       |- pom.xml

and an assembly desriptor entry for the contained modules like this

  <fileSets>
     <fileSets>
        <directory>Container</directory>
        <outputDirectory></outputDirectory>
        <includes>
          <include>**/target/*.jar</include>
        </includes>
     </fileSets>
  </fileSets>

The assembly plugin will be able to get all jar files produced by Module3 and Module4 but the "Container/<ModuleName>/target" structure will still be included. One workaround is to enumerate each <ModuleName> artifact but problematic if the number of contained sub-modules is numerous. Support for filemappers which  look like this:

  <fileSets>
     <fileSets>
        <directory>Container</directory>
        <outputDirectory></outputDirectory>
        <includes>
          <include>**/target/*.jar</include>
        </includes>
	<mapper type="flatten">
     </fileSets>
  </fileSets>

will cause all contained jar files to be copied without their original structure. This feature would be useful for globbing artifact names as well as for physically organizing project structures according to type.

[1] http://ant.apache.org/manual/CoreTypes/mapper.html

    
> Support for mappers in assembly desriptors
> ------------------------------------------
>
>                 Key: MASSEMBLY-45
>                 URL: https://jira.codehaus.org/browse/MASSEMBLY-45
>             Project: Maven 2.x Assembly Plugin
>          Issue Type: Bug
>            Reporter: Anuerin Diaz
>         Attachments: maven-assembly-plugin.patch
>
>
> I would like to forward a wish to have the assembly plugin support the notion of file mappers similar to the ones in Ant[1]. To illustrate, assuming a multi-module project with the following layout:
> {noformat}
>      Root
>        |-Module1
>        |-Module2
>        |-Container
>        |  |-Module3
>        |  |-Module4
>        |-Module5
>        |- pom.xml
> {noformat}
> and an assembly desriptor entry for the contained modules like this
> {code:xml}
>   <fileSets>
>      <fileSets>
>         <directory>Container</directory>
>         <outputDirectory></outputDirectory>
>         <includes>
>           <include>**/target/*.jar</include>
>         </includes>
>      </fileSets>
>   </fileSets>
> {code}
> The assembly plugin will be able to get all jar files produced by Module3 and Module4 but the "Container/<ModuleName>/target" structure will still be included. One workaround is to enumerate each <ModuleName> artifact but problematic if the number of contained sub-modules is numerous. Support for filemappers which  look like this:
> {code:xml}
>   <fileSets>
>      <fileSets>
>         <directory>Container</directory>
>         <outputDirectory></outputDirectory>
>         <includes>
>           <include>**/target/*.jar</include>
>         </includes>
> 	<mapper type="flatten">
>      </fileSets>
>   </fileSets>
> {code}
> will cause all contained jar files to be copied without their original structure. This feature would be useful for globbing artifact names as well as for physically organizing project structures according to type.
> [1] http://ant.apache.org/manual/CoreTypes/mapper.html

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira