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 2.x Assembly Plugin
          Issue Type: Bug
    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:
 $ 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

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:
$ 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

Expected behavour would be for all files to be copied to their target locations 
with correct file-permissions. 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to