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

assembly <files> uses maven parent relative path and not the modules relative path

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.1
    • 2.2-beta-1
    • None
    • None

    Description

      In mvn 2.0.4 if I have an assemly descriptor that has the following:

      <files>
      <file>
      <source>src/site/apt/index.apt</source>
      <outputDirectory></outputDirectory>
      <destName>README.txt</destName>
      </file>
      </files>

      and a maven project that looks like:

      Maven Assembly Bug

      • pom.xml
      • assembly-bug-module
      • pom.xml
      • src/site/apt/index.apt

      with the assembly:assembly bound to the package phase inside assembly-bug-module/pom.xml as
      <build>
      <plugins>
      <plugin>
      <artifactId>maven-assembly-plugin</artifactId>
      <executions>
      <execution>
      <id>package-assembly</id>
      <phase>package</phase>
      <goals>
      <goal>assembly</goal>
      </goals>
      <configuration>
      <descriptors>
      <descriptor>
      src/main/assembly/bin.xml
      </descriptor>
      </descriptors>
      </configuration>
      </execution>
      </executions>
      </plugin>

      then when I run mvn install inside assembly-bug-module:
      assembly-bug-module> mvn install
      the command works fine

      When I run mvn install inside the "Maven Assembly Bug" directory the command will fail
      Maven Assembly Bug> mvn install

      [INFO] [assembly:assembly

      {execution: package-assembly}

      ]
      [INFO] ------------------------------------------------------------------------
      [ERROR] BUILD ERROR
      [INFO] ------------------------------------------------------------------------
      [INFO] Error adding file to archive: <path>\Maven Assembly Bug\src\site\apt\index.apt isn't a file.

      Example project is attached as a zip file.

      Trying to change the descriptor to use ${project.build.sourceDirectory} does not work as this is not resoolved.

      [INFO] Error adding file to archive: <path>\Maven Assembly Bug\assembly-bug-module\${project.build.sourceDirectory}
      \site\apt\index.apt isn't a file.

      Attachments

        1. MASSEMBLY-118-patch.txt
          10 kB
          Barrie Treloar
        2. MASSEMBLY-118-patch.txt
          11 kB
          Barrie Treloar
        3. MASSEMBLY-118-patch.txt
          11 kB
          Barrie Treloar
        4. MASSEMBLY-118-patch.txt
          68 kB
          Barrie Treloar
        5. Maven Assembly Bug.zip
          6 kB
          Barrie Treloar

        Activity

          People

            kenneyw kenneyw
            baerrach Barrie Treloar
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: