[ 
https://issues.apache.org/jira/browse/MASSEMBLY-928?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17092737#comment-17092737
 ] 

Robert Scholte commented on MASSEMBLY-928:
------------------------------------------

Aren't you looking for {{outputFileNameMapping}}? See 
https://maven.apache.org/plugins/maven-assembly-plugin/assembly.html#class_dependencySet
 

> Allow declaring <file> items within <dependencySets>.
> -----------------------------------------------------
>
>                 Key: MASSEMBLY-928
>                 URL: https://issues.apache.org/jira/browse/MASSEMBLY-928
>             Project: Maven Assembly Plugin
>          Issue Type: New Feature
>          Components: dependencySet
>            Reporter: DarĂ­o Cutillas
>            Priority: Major
>
> I'd like to be able to express copying of files within the 
> {{<dependencySets>}} of an assembly descriptor.
> Consider the following use-case:
> A maven module {{A}} of a multi-module project has dependencies {{B}}, {{C}}.
> A can use the maven-assembly-plugin to perform custom packaging of the 
> dependencies {{B}} and {{C}} by means of the {{dependencySets}} element. For 
> example, it could be creating a bundle with {{B}} and {{C}} unpacked in a 
> folder matching the dependency artifactId by using the 
> {{artifact.artifactId}} property (which is only available within the 
> {{dependencySet}}).
> But as part of the packaging, we want to be able to generate and filtered 
> file, whose content depends on the dependency artifactId, for each of the 
> included dependencies, with the filename matching the artifact name.
> Today I only see two possibilities:
> * The file needs to have been packed in the specific dependency. This is not 
> good because the file might not make sense outside {{A}} or {{B}} and {{C}} 
> could be dependencies that are not own by our multi-module.
> * -A separated assembly descriptor needs to be created and multiple 
> executions have to be specified. This requires creating per-dependency 
> {{<filter>}} files and does not scale well.- This is not a possibility 
> because it is not possible to have the {{<destName>}} based on a property.
> Instead I'd like to have the possibility of writing an assembly descriptor 
> such as:
> {code:xml}
> <dependencySets>
>   <dependencySet>
>   ..
>     <files>
>       <file>
>         <source>my-template</source>
>         <destName>${artifact.artifactId}</destName>
>         <filtering>true</filtering>
>       </file>
>     </files>
>   ..
>   </dependencySet>
> </dependencySets>
> {code}
> And that filtering would expand also the {{<dependencySet>>}} specific 
> properties such as {{${artifact.artifactId}}} in {{my-template}}.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to