maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Arnaud Bailly <abai...@oqube.com>
Subject Re: Merge assemblies across projects?
Date Mon, 21 May 2007 08:06:52 GMT
Mark Diggory <mdiggory@MIT.EDU> writes:

> Hello List,
>

Hello Mark,

> I have a couple projects (each with their own assemblies) as modules
> of a current project.  Is there a way I can have their generated
> assemblies merged when I call assembly:assembly?
>

I don't think it is possible to do assembly merging simply. What I
usually do, for example to generate a source or binary distribution of
some project, is generate assembly in the toplevel project only, or in
a project that depends on all others. Here is an example for project
patchwork to assemble sources:

<?xml version="1.0" ?>
<assembly>
  <id>src</id>
  <formats>
    <format>zip</format>
    <format>tar.gz</format>
  </formats>
  <includeBaseDirectory>false</includeBaseDirectory>
  <moduleSets>
    <moduleSet>
      <includes>
        <include>oqube.patchwork:patchwork-bytes</include>
        <include>oqube.patchwork:patchwork-control</include>
        <include>oqube.patchwork:patchwork-ui</include>
        <include>oqube.patchwork:patchwork-main</include>
        <include>oqube.patchwork:patchwork-maven-plugin</include>
        <include>oqube.patchwork:patchwork-it</include>
      </includes>
      <sources>
        <outputDirectory>patchwork/${artifactId}</outputDirectory>
      </sources>
    </moduleSet>
  </moduleSets>
  <fileSets>
   <fileSet>
     <includes>
      <include>
      pom.xml
      </include>
      </includes>
  <outputDirectory>patchwork/</outputDirectory>
  </fileSet>
   <fileSet>
     <directory>src</directory>
  <outputDirectory>patchwork/src</outputDirectory>
  </fileSet>
  </fileSets>
</assembly>

Here is another example that  assembles all dependent jars into a
single dir:

<?xml version="1.0" encoding="windows-1250"?>
<!-- 
    This descriptor is used to regroup all jars (and dependencies) produced by
     project in a single directory, for testing purpose. 
-->
<assembly>
  <id>test-bin</id>
  <formats>
    <format>dir</format>
  </formats>
  <fileSets>
     <fileSet>
      <directory>target</directory>
      <outputDirectory></outputDirectory>
      <includes>
        <include>*.jar</include>
      </includes>
    </fileSet> 
 </fileSets>
 
 <dependencySets>
  <dependencySet>
   <outputDirectory></outputDirectory>
  </dependencySet>
 </dependencySets>
</assembly>

HTH
-- 
OQube < software engineering \ génie logiciel >
Arnaud Bailly, Dr.
\web> http://www.oqube.com


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


Mime
View raw message