maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexis Midon (JIRA)" <>
Subject [jira] Created: (MASSEMBLY-133) Assembly including binaries: Bug on a n depth hierarchy
Date Fri, 04 Aug 2006 09:31:01 GMT
Assembly including binaries: Bug on a n depth hierarchy

                 Key: MASSEMBLY-133
             Project: Maven 2.x Assembly Plugin
          Issue Type: Bug
    Affects Versions: 2.1
         Environment: Maven 2.0.4
            Reporter: Alexis Midon
            Priority: Critical

Considering the following complex but common pom hierarchy (sample) :
The syntax is packaging:pom:level.#

           /  \
          /    \
         /      \
        /        \
    jar:pom1.0   pom:pom1.1
                       /  \
                      /    \
                     /      \
                    /        \
             jar:pom2.0      jar:pom2.1

I'd like to use the assembly plugin to gather all the output jars in a single directory.
(So every child/target/artifact.jar must copy to root/target/assembly/...)

To do so I execute the assemby:assembly goal with the following descriptor :


Unfortunately this always fails into an exception: "pom:pom1.1 does not have an artifact with
a file. Please ensure the package phase (...)"

This use case highlights 2 problems I think:

   1. the assembly plugin does not support n depth hierarchy
      Actually pom:pom1.1 should be included in the module list but jar:pom2.0 and jar:pom2.1
should be too!
   2. the <binaries/> tag must not throw an exception if there is no file, distonction
on packaging type sounds necessary

To understand what's going on with bug #1, I decided to debug the plugin.
The problem occurs in AbstractAssemblyMojo.processModules (...) line 471
The getModulesFromReactor() method is invoked but with recurse set to false!

As a result when jar:pom2.0 is tested, the isProjectModule() method returns false, which is
not correct (in our case).
May be 'recurse' could be a plugin parameter?

The patch is delimited by // PATCH BEGIN/END, modif on lines 470 and 514.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:


View raw message