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

Kristian Rosenvold commented on MASSEMBLY-583:
----------------------------------------------

this problem is actually the (broken) logic trying to stop the same source file 
from being added twice. The same directory with 2 different settings is being 
intrepreted as teh "same" file.

> DependencySet elements appear not to be able to target the same 
> outputDirectory
> -------------------------------------------------------------------------------
>
>                 Key: MASSEMBLY-583
>                 URL: https://jira.codehaus.org/browse/MASSEMBLY-583
>             Project: Maven Assembly Plugin
>          Issue Type: Bug
>          Components: dependencySet
>    Affects Versions: 2.2.1
>         Environment: Linux, Sun 64-bit JDK 1.6.0_24
>            Reporter: Michael
>         Attachments: map-jira-2.zip
>
>
> Where an assembly descriptor uses two dependencySet elements, both of which 
> have the same outputDirectory value, only the first is honoured and the 
> second is ignored. 
> In the attached ZIP are some test/POC files which demonstrate this issue. 
> Project1 contains a .property file in 
> src/main/resources
> and some start/stop scripts at 
> src/main/resources/bin 
> Project2 has a runtime dependency on Project1 and attempts to unpack both the 
> scripts and the properties files to the same output-directory, specifying 
> execute permissions for the start/stop scripts. However, only the first 
> dependencySet is unpacked; to verify this behaviour, follow these steps:
> 1) Unzip the map-jira-2.zip file to the filesystem.
> 2) From the maven-assembly-jira2 directory, execute the mvn package command.
> 3) Verify that in project2/target/project2-0.0.1-SNAPSHOT-deployable.zip the 
> contents omits the start/stop scripts:
> {noformat}
> $ unzip -l project2/target/project2-0.0.1-SNAPSHOT-deployable.zip
> Archive:  project2/target/project2-0.0.1-SNAPSHOT-deployable.zip
>   Length     Date   Time    Name
>         0  11-30-11 10:59   project2-0.0.1-SNAPSHOT/
>         0  11-30-11 10:59   project2-0.0.1-SNAPSHOT/empty.properties
>         0                   2 files
> {noformat}
> 4) Edit the descriptor project2/src/main/assembly/assembly.xml and move the 
> second dependencySet element above the first. 
> 5) Execute mvn package from the maven-assembly-jira2 directory.
> 6) Verify that the ZIP in project2 now omits the empty.properties file but 
> does now contain the start/stop scripts:
> {noformat}
> $ unzip -l project2/target/project2-0.0.1-SNAPSHOT-deployable.zip
> Archive:  project2/target/project2-0.0.1-SNAPSHOT-deployable.zip
>   Length     Date   Time    Name
>         0  11-30-11 11:02   project2-0.0.1-SNAPSHOT/
>         0  11-30-11 11:02   project2-0.0.1-SNAPSHOT/bin/
>         0  11-30-11 10:59   project2-0.0.1-SNAPSHOT/bin/start.sh
>         0  11-30-11 10:59   project2-0.0.1-SNAPSHOT/bin/stop.sh
>         0                   4 files
> {noformat}
> Expected behavour would be for all files to be copied to their target 
> locations with correct file-permissions. 



--
This message was sent by Atlassian JIRA
(v6.1.6#6162)

Reply via email to