[ http://jira.codehaus.org/browse/MASSEMBLY-109?page=comments#action_66757 
] 

Andrew Moore commented on MASSEMBLY-109:
----------------------------------------

I am also seeing this behaviour when attempting to assemble a _pom_ type 
project.

Attached is a test case exhibiting this behaviour (scratch-assembly.tar.bz2).

When the assembly plugin is bound to the package phase [#1] and the package 
command run, the failure occurs [#2].

When the assembly plugin is configured [#3], not bound to a phase, and the 
package AND assembly:assembly commands run, the assembly builds as expected 
[#4].

{anchor:1}
{code:title=pom.xml}
      <plugin>
        <artifactId>maven-assembly-plugin</artifactId>
        <executions>
          <execution>
            <id>package-all</id>
            <phase>package</phase>
            <goals>
              <goal>attached</goal>
            </goals>
            <inherited>false</inherited>
            <configuration>
              <appendAssemblyId>false</appendAssemblyId>
              <descriptors>
                <descriptor>src/main/assembly/package-all.xml</descriptor>
              </descriptors>
            </configuration>
          </execution>
        </executions>
      </plugin>
{code}

{anchor:2}
{code}
$ mvn package
[INFO] Scanning for projects...
[INFO] Reactor build order:
[INFO]   Scratch
[INFO]   Scratch Module A
[INFO]   Scratch Module B
[INFO]   Scratch Module C
[INFO]   Scratch Module D
[INFO] 
----------------------------------------------------------------------------
[INFO] Building Scratch
[INFO]    task-segment: [package]
[INFO] 
----------------------------------------------------------------------------
[INFO] [site:attach-descriptor]
[INFO] [assembly:attached {execution: package-all}]
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Included module: com.scratch:scratch-moduleA:jar:1.0-SNAPSHOT does not 
have an artifact with a file. Please ensure the package phase is run before the 
assembly is generated.
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5 seconds
[INFO] Finished at: Wed Jun 07 11:15:38 EST 2006
[INFO] Final Memory: 6M/12M
[INFO] ------------------------------------------------------------------------
{code}

{anchor:3}
{code}
      <plugin>
        <artifactId>maven-assembly-plugin</artifactId>
        <configuration>
          <appendAssemblyId>false</appendAssemblyId>
          <descriptors>
            <descriptor>src/main/assembly/package-all.xml</descriptor>
          </descriptors>
        </configuration>
      </plugin>
{code}

{anchor:4}
{code}
$ mvn clean package assembly:assembly
[INFO] Scanning for projects...
[INFO] Reactor build order:
[INFO]   Scratch
[INFO]   Scratch Module A
[INFO]   Scratch Module B
[INFO]   Scratch Module C
[INFO]   Scratch Module D
[INFO] Searching repository for plugin with prefix: 'assembly'.
[INFO] 
----------------------------------------------------------------------------
[INFO] Building Scratch
[INFO]    task-segment: [clean, package]
[INFO] 
----------------------------------------------------------------------------
[INFO] [clean:clean]
[INFO] Deleting directory /secure/home/amm/prj/bt3/distra/scratch/target
[INFO] Deleting directory /secure/home/amm/prj/bt3/distra/scratch/target/classes
[INFO] Deleting directory 
/secure/home/amm/prj/bt3/distra/scratch/target/test-classes
[INFO] [site:attach-descriptor]
[INFO] 
----------------------------------------------------------------------------
[INFO] Building Scratch Module A
[INFO]    task-segment: [clean, package]
[INFO] 
----------------------------------------------------------------------------

...

[INFO] [jar:jar]
[INFO] Building jar: 
/secure/home/amm/prj/bt3/distra/scratch/scratch-moduleD/target/scratch-moduleD-1.0-SNAPSHOT.jar
[INFO] [assembly:assembly]
[INFO] Building tar : 
/secure/home/amm/prj/bt3/distra/scratch/target/scratch-1.0-SNAPSHOT.tar.gz
[INFO]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] ------------------------------------------------------------------------
[INFO] Scratch ............................................... SUCCESS [4.162s]
[INFO] Scratch Module A ...................................... SUCCESS [4.403s]
[INFO] Scratch Module B ...................................... SUCCESS [1.876s]
[INFO] Scratch Module C ...................................... SUCCESS [1.792s]
[INFO] Scratch Module D ...................................... SUCCESS [1.668s]
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 18 seconds
[INFO] Finished at: Wed Jun 07 11:20:13 EST 2006
[INFO] Final Memory: 9M/17M
[INFO] ------------------------------------------------------------------------
$ tar -tvzf target/scratch-1.0-SNAPSHOT.tar.gz
-rw-r--r-- /              2907 2006-06-07 11:20:10 
lib/scratch-moduleA-1.0-SNAPSHOT.jar
-rw-r--r-- /            121070 2006-05-23 15:06:58 lib/junit-3.8.1.jar
-rw-r--r-- /              2908 2006-06-07 11:20:12 
lib/scratch-moduleD-1.0-SNAPSHOT.jar
-rw-r--r-- /              2908 2006-06-07 11:20:11 
lib/scratch-moduleC-1.0-SNAPSHOT.jar
-rw-r--r-- /              2908 2006-06-07 11:20:10 
lib/scratch-moduleB-1.0-SNAPSHOT.jar
{code}


>  Assembly task does not include deeper nested modules  
> -------------------------------------------------------
>
>          Key: MASSEMBLY-109
>          URL: http://jira.codehaus.org/browse/MASSEMBLY-109
>      Project: Maven 2.x Assembly Plugin
>         Type: Bug

>     Versions: 2.1
>  Environment: Linux, Sun jdk 5.0
>     Reporter: gunter zeilinger

>
>
> If one of the modules of the root pom is itself a "pom" packaging project,  
> specifying
>   <moduleSets>
>     <moduleSet>
>       <binaries>
>         <outputDirectory>lib</outputDirectory>
>         <includeDependencies>true</includeDependencies>
>         <unpack>false</unpack>
>       </binaries>
>     </moduleSet>
>   </moduleSets>
> in the descriptor fails with 
> [INFO] Included module: dcm4che:dcm4che-tool:pom:1 does not have an artifact 
> with a file. Please ensure the package phase is run before the assembly is 
> generated.
> Excluding it by (e.g.)
>    <moduleSets>
>     <moduleSet>
>       <excludes>
>         <exclude>dcm4che:dcm4che-tool</exclude>
>       </excludes>
> :      
> excludes also the artifacts from its sub-modules.
> Also listing such deeper nested modules by its groupId:artifactId as 
> <includes> (e.g:)
>    <moduleSets>
>     <moduleSet>
>       <includes>
>         <include>dcm4che:dcm4che-tool-dcm2txt</include>
>         <include>dcm4che:dcm4che-tool-dcm2xml</include>
>         <include>dcm4che:dcm4che-tool-pdf2dcm</include>
>         <include>dcm4che:dcm4che-tool-xml2dcm</include>
> :
> does not help.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to