You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Julien HENRY <he...@yahoo.fr> on 2006/11/28 15:31:38 UTC

Assembly and multi-module project

Hi,

I have a multi-module project:

pom.xml
\_moduleA
\_moduleB
\_moduleC

I want to create a release package with the following content:

------------------------------
moduleA.jar
moduleC.jar
lib/moduleAdependency1.jar
...
lib/moduleAdependencyN.jar
lib/moduleCdependency1.jar
...
lib/moduleCdependencyN.jar
src/moduleA-sources.jar
src/moduleC-sources.jar
javadoc/moduleA-javadoc.jar
javadoc/moduleC-javadoc.jar
------------------------------

I think my xml file is well configured, but when I run mvn assembly:assembly, the plugin complains:
[INFO] Failed to create assembly: Artifact: [moduleC] (included by module) does not have an artifact with a file. Please ensure the package phase is run before the assembly is generated.

The documentation on the site claims that package phase is automatically run by assembly goal, so it should work. Any Idea ?

Thanks

Julien

--------------------------------------------------------------------------

Real message:

[INFO] [jar:jar]
[INFO] Building jar: D:\jhenry\jwebunit-1.x\jwebunit-htmlunit-plugin\target\jwebunit-htmlunit-plugin-1.4-SNAPSHOT.jar
[INFO] [assembly:assembly {execution: release}]
[INFO] Reading assembly descriptor: D:\jhenry\jwebunit-1.x\src\assemble\release.xml
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to create assembly: Artifact: net.sourceforge.jwebunit:jwebunit-htmlunit-plugin:jar:1.4-SNAPSHOT (included by module) does not have an a
rtifact with a file. Please ensure the package phase is run before the assembly is generated.

---------------------------------------------------------------------------

release.xml:
<assembly>
  <id>release</id>
  <formats>
    <format>zip</format>
  </formats>
  <includeBaseDirectory>false</includeBaseDirectory>
  <fileSets>
        <fileSet>
          <includes>
            <include>README*</include>
            <include>LICENSE*</include>
          </includes>
        </fileSet>
        <fileSet>
          <directory>jwebunit-core/target/</directory>
          <outputDirectory>javadoc</outputDirectory>
          <includes>
            <include>*-javadoc.jar</include>
          </includes>
        </fileSet>
        <fileSet>
          <directory>jwebunit-htmlunit-plugin/target/</directory>
          <outputDirectory>javadoc</outputDirectory>
          <includes>
            <include>*-javadoc.jar</include>
          </includes>
        </fileSet>
        <fileSet>
          <directory>jwebunit-core/target/</directory>
          <outputDirectory>src</outputDirectory>
          <includes>
            <include>*-sources.jar</include>
          </includes>
        </fileSet>
        <fileSet>
          <directory>jwebunit-htmlunit-plugin/target/</directory>
          <outputDirectory>src</outputDirectory>
          <includes>
            <include>*-sources.jar</include>
          </includes>
        </fileSet>
  </fileSets>
  <moduleSets>
    <moduleSet>
      <includes>
        <include>net.sourceforge.jwebunit:jwebunit-htmlunit-plugin</include>
        <include>net.sourceforge.jwebunit:jwebunit-core</include>
      </includes>
      <binaries>
        <includeDependencies>true</includeDependencies>
        <unpack>false</unpack>
        <dependencySets>
          <dependencySet>
            <scope>runtime</scope>
            <outputDirectory>lib</outputDirectory>
          </dependencySet>
        </dependencySets>
      </binaries>
    </moduleSet>
  </moduleSets>
</assembly>





	

	
		
___________________________________________________________________________ 
Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions ! 
Profitez des connaissances, des opinions et des expériences des internautes sur Yahoo! Questions/Réponses 
http://fr.answers.yahoo.com

Re: Assembly and multi-module project

Posted by Wendy Smoak <ws...@gmail.com>.
On 11/28/06, Julien HENRY <he...@yahoo.fr> wrote:
> I think my xml file is well configured, but when I run mvn assembly:assembly, the plugin complains:
> [INFO] Failed to create assembly: Artifact: [moduleC] (included by module) does not have an artifact with a file. Please ensure the package phase is run before the assembly is generated.
>
> The documentation on the site claims that package phase is automatically run by assembly goal, so it should work. Any Idea ?

On http://maven.apache.org/plugins/maven-assembly-plugin/assembly.html
under moduleSet, it says,

"NOTE: When using <moduleSets> from the command-line, it is required
to pass first the package phase by doing: "mvn package
assembly:assembly". This bug/issue is scheduled to be addressed by
Maven 2.1."

However, the docs were published on Nov 7th, so there may be some
documentation there on as-yet-unreleased features.

More examples of multi-module assemblies would be great.  I'm
currently having trouble getting assembly to do what I want. :(

-- 
Wendy

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org