You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Ståle Undheim <st...@coretrek.com> on 2006/09/21 15:07:02 UTC

Assemblies created from a pom project

I have a pom type project, with 5 sub-projects. I want to create the
assembly (tar.gz and such) in the pom project, including dependencies
and artifacts from child modules.

I get the following when I run mvn assembly:assembly (shortened to 2
important lines):
[INFO] Building jar: <path>/server/ccsapi/target/ccsapi-1.0-SNAPSHOT.jar
[INFO] Included module: com.corelets:ccsapi:jar:1.0-SNAPSHOT does not
have an artifact with a file. Please ensure the package phase is run
before the assembly is generated.

In my assembly file I now have just:
<assembly>
  <id>bin</id>
  <formats>
    <format>tar.gz</format>
  </formats>

  <moduleSets>
    <moduleSet>
      <binaries>
        <outputDirectory>modules/${artifactId}</outputDirectory>
        <includeDependencies>true</includeDependencies>
        <unpack>false</unpack>
      </binaries>
    </moduleSet>
  </moduleSets>
</assembly>

This is more or less cut and paste from the assembly examples. I have
just removed more and more to stay with the defaults. How do I include
files from sub-projects? Do I need to reference them directly?
-- 
Ståle Undheim
Systemutvikler

CoreTrek
Tlf.:   +47 51 97 85 97
E-post: staaleu@coretrek.no
WEB:    www.coretrek.no

"Simple is beautiful"


Re: Assemblies created from a pom project

Posted by Barrie Treloar <ba...@gmail.com>.
On 9/22/06, Ståle Undheim <st...@coretrek.com> wrote:
> Is there any way I can make the parent project inherit all the child
> projects dependencies and use dependencySet to group together dependencies?

Search the archives for my posts.
I go into detail about setting up assemblies.
Those posts should help.

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


Re: Assemblies created from a pom project

Posted by Ståle Undheim <st...@coretrek.com>.
Busch, Hendrik (LNG-MUE) wrote:
> Hi!
> 
>> I get the following when I run mvn assembly:assembly (shortened to 2
>> important lines):
>> [INFO] Building jar: <path>/server/ccsapi/target/ccsapi-1.0-SNAPSHOT.jar
>> [INFO] Included module: com.corelets:ccsapi:jar:1.0-SNAPSHOT does not
>> have an artifact with a file. Please ensure the package phase is run
>> before the assembly is generated.
> 
> I remember that there is a bug in maven preventing the reactor project
> list from being filled when using the assembly plugin. It might be
> scheduled for the next release but up until then you can work around
> this problem by calling
> 
> mvn package assembly:assembly
> 
> This should work.

Thanks, it did. Now I have a new problem.

I have 4 submodules in my project, and I want the resulting tar.gz file
to be:

lib/all-dependencies
module1-4.jar

But there doesnt seem to be any seperation off dependencies and
artifacts from sub-projects. If I use:

<moduleSet>
  <binaries>
    <includeDependencies>false</includeDependencies>
  </binaries>
</moduleSet>

Only the artifacts are included. If I set includeDependencies to true,
all the artifacts and dependencies are included. Is it possible to
seperate child artifacts from child dependencies? I tried using exclude
with both groupId:artifactId, filename matching, and exact filenames so
I could seperate out the files, but none of them worked.

Is there any way I can make the parent project inherit all the child
projects dependencies and use dependencySet to group together dependencies?

-- 
Ståle Undheim
Systemutvikler

CoreTrek
Tlf.:   +47 51 97 85 97
E-post: staaleu@coretrek.no
WEB:    www.coretrek.no

"Simple is beautiful"


Re: Assemblies created from a pom project

Posted by "Busch, Hendrik (LNG-MUE)" <he...@lexisnexis.de>.
Hi!

> I get the following when I run mvn assembly:assembly (shortened to 2
> important lines):
> [INFO] Building jar: <path>/server/ccsapi/target/ccsapi-1.0-SNAPSHOT.jar
> [INFO] Included module: com.corelets:ccsapi:jar:1.0-SNAPSHOT does not
> have an artifact with a file. Please ensure the package phase is run
> before the assembly is generated.

I remember that there is a bug in maven preventing the reactor project 
list from being filled when using the assembly plugin. It might be 
scheduled for the next release but up until then you can work around 
this problem by calling

mvn package assembly:assembly

This should work.


-- 
Mit freundlichen Grüßen / Kind regards

Hendrik Busch - Stellv. Leiter der Softwareentwicklung

LexisNexis Deutschland GmbH
http://www.lexisnexis.de
Feldstiege 100
D-48161 Münster
phone +49 (0) 2533-9300-455
fax +49 (0) 02533-9300-50
hendrik.busch@lexisnexis.de

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