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

William Puhl edited comment on MASSEMBLY-828 at 9/9/16 7:16 PM:
----------------------------------------------------------------

The assembly that we are using moves two file sets to the output directory in 
the assembly descriptor.  These files sets have duplicate files in them, so the 
purpose of copying both files sets to the output directory was so that the 
second fileset would overwrite the duplicate files from the  first fileset.  In 
version 2.1 of the assembly plugin it did this.  In versions above that, the 
affect of copying the second fileset does not overwrite the existing files from 
the first fileset. My original description of the bug was misleading.  I don't 
think the issue has anything to do with the fact that the resources in the 
assembly are xml files, as i had originally thought.  It just looks like the 
newer versions don't allow filesets to overwrite existing files in an assembly.




was (Author: wpuhl10775):
The assembly that we are using moves two file sets to the output directory in 
the assembly descriptor.  These files sets have duplicate files in them, so the 
purpose of copying both files sets to the output directory was so that the 
second fileset would overwrite the duplicate files from the  first fileset.  In 
version 2.1 of the assembly plugin it did this.  In versions above that, the 
affect of copying the second fileset does not overwrite the existing files from 
the first fileset. 



> Assembly dropping attributes in xml assembly files in versions after 2.1
> ------------------------------------------------------------------------
>
>                 Key: MASSEMBLY-828
>                 URL: https://issues.apache.org/jira/browse/MASSEMBLY-828
>             Project: Maven Assembly Plugin
>          Issue Type: Bug
>    Affects Versions: 2.2
>            Reporter: William Puhl
>             Fix For: 2.1
>
>         Attachments: etlStoreJournalExport.xml, pom.xml
>
>
> Part of the assembly is to copy xml files from the project to the output 
> directory.  In versions after 2.1, maven-assmbly-plugin is dropping some 
> attributes that are defined in the xml as it copies it to the output 
> directory. This started occurring after version 2.1. 
> Example: 
> assembly includes test.xml to be copied to output directory.  test.xml looks 
> like this:
> <?xml version="1.0" encoding="UTF-8"?>
> <Transformations xmlns="etl.vertexinc.com" 
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
>   <Transformation name="xxxx" destSchemaReleaseId="xxxx">
>     <TransformationRule srcDataSet="xxxx"  srcfield="*" 
>                                                                               
> destDataSet="xxxx"
>                                                                               
> type="ASSIGN"/>
>   </Transformation>
>   <Transformation name="xxxx" destSchemaReleaseId="xxxx" 
> customTask="some.package.name">
>       <TransformationRule srcDataSet="xxxx"
>                                                                               
>         srcField="*"
>                                                                               
>         destDataSet="xxxx"
>                                                                               
>         type="ASSIGN" />
>   </Transformation>
> </Transformations>
> After maven-assembly-plugin completes the assembly, the packaged jar contains 
> test.xml like this:
> <?xml version="1.0" encoding="UTF-8"?>
> <Transformations xmlns="etl.vertexinc.com" 
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
>   <Transformation name="xxxx" destSchemaReleaseId="xxxx">
>     <TransformationRule srcDataSet="xxxx"  srcfield="*" 
>                                                                               
> destDataSet="xxxx"
>                                                                               
> type="ASSIGN"/>
>   </Transformation>
>   <Transformation name="xxxx" destSchemaReleaseId="xxxx">
>       <TransformationRule srcDataSet="xxxx"
>                                                                               
>         srcField="*"
>                                                                               
>         destDataSet="xxxx"
>                                                                               
>         type="ASSIGN" />
>   </Transformation>
> </Transformations>
> The attribute for the 2nd <Transformation> element 
> (customTask="some.package.name") is missing.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to