Uploaded image for project: 'Maven Assembly Plugin'
  1. Maven Assembly Plugin
  2. MASSEMBLY-148

<files> cannot handle files with same name in different directories. First file copied to all destinations.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.1
    • 2.2-beta-1
    • None
    • None
    • Window XP, j2sdk1.4.2_09

    Description

      Using an assembly descriptor with the following <files> element:
      <files>
      <file>
      <source>configuration\pentaho.war\WEB-INF\jboss-web.xml</source>
      <outputDirectory>jboss\server\default\deploy\pentaho.war\WEB-INF</outputDirectory>
      <filtered>true</filtered>
      </file>
      <file>
      <source>configuration\jboss-portal.sar\portal-server.war\WEB-INF\jboss-web.xml</source>
      <outputDirectory>jboss\server\default\deploy\jboss-portal.sar\portal-server.war\WEB-INF</outputDirectory>
      <destName>jboss-web.xml</destName>
      <filtered>true</filtered>
      </file>
      </files>

      ... the resulting assembly contains two identical copies of jboss-web.xml in both target locations and both are identical to the first one specified. It is as if the same file (the first one) is copied to both locations. If I rename one of the files, then, of course, everything works fine.

      The pom.xml I used looks like:
      <project>
      <modelVersion>4.0.0</modelVersion>
      <groupId>pentaho</groupId>
      <artifactId>afscnPentahoApp</artifactId>
      <name>AFSCN Multiproject POM</name>
      <version>1.0</version>
      <packaging>pom</packaging>

      <modules>
      <module>components</module>
      <module>portlets-jar</module>
      <module>portlets-war</module>
      </modules>

      <build>
      <filters>
      <filter>c:/PentahoSource/filters/config.properties</filter>
      </filters>
      <plugins>
      <plugin>
      <artifactId>maven-assembly-plugin</artifactId>
      <configuration>
      <descriptor>solution.xml</descriptor>
      </configuration>
      </plugin>
      </plugins>
      </build>
      </project>

      ... and the directory structure looks like:

      Top-Level
      – configuration
      ---- configuration\jboss-portal.sar\portal-server.war\WEB-INF\jboss-web.xml

      Attachments

        1. massembly-148.zip
          4 kB
          Richard van der Hoff

        Activity

          People

            jdcasey John Dennis Casey
            waltbarrow Walt Barrow
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: