You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Carsten Karkola <ck...@mms-dresden.de> on 2006/05/19 10:45:39 UTC

assemply and packaging

Hello,

the usage of the assembly plugin is only possible via
  mvn assembly:assembly

Is there a possibility to define something like
 <packaging>assembly</packaging>

So I could do a
  mvn package
in my multi-project directory and would get the needed assemblies without 
special calls of some subprojects, where the assemblies are defined.

regards, carsten


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


Re: Assembly and DependencySets (Re: assemply and packaging)

Posted by Carsten Karkola <ck...@mms-dresden.de>.
Sorry, I will try to split my questions between dev concerns and user related 
questions. Thank you for your hint with the correct include-format. Beside 
that I solved my problems with the dependency-maven-plugin as suggested 
on this list.
regards, carsten

On 23 May 2006 at 11:01, John Casey wrote:

> This is definitely a thread for the users' list, not the dev list.
> 
> Having said that, the assembly plugin doesn't currently support wildcards in
> the dependencySet includes/excludes, for one thing. For another, those
> includes and excludes (in the dependencySet) are meant to refer to the
> artifacts by groupId and artifactId using the format 'groupId:artifactId'.
> 
> -john
> 
> On 5/23/06, Tim Kettler <ti...@udo.edu> wrote:
> >
> > I have not used the assembly plugin further than creating a
> > 'jar-with-dependencies'. You
> > should move this thread to the users list. The audience that can help is
> > probably greater
> > there than on the dev list.
> >
> > -Tim
> >
> > Carsten Karkola schrieb:
> > > What I tried to do is, to filter dependencies and unpack some of them,
> > simply copy others to
> > > some dirs, like:
> > > 1. two dependencies with type zip
> > >     <dependencySet>
> > >        <outputDirectory>/lib</outputDirectory>
> > >        <unpack>true</unpack>
> > >        <scope>runtime</scope>
> > >        <includes>
> > >           <include>*.zip</include>
> > >        </includes>
> > >      </dependencySet>
> > > 2. a jar
> > >     <dependencySet>
> > >        <outputDirectory>/</outputDirectory>
> > >        <unpack>false</unpack>
> > >        <scope>runtime</scope>
> > >        <includes>
> > >           <include>mymodule*.jar</include>
> > >        </includes>
> > >      </dependencySet>
> > > 3. another jar
> > >     <dependencySet>
> > >        <outputDirectory>/</outputDirectory>
> > >        <unpack>true</unpack>
> > >        <scope>runtime</scope>
> > >        <includes>
> > >           <include>server*.jar</include>
> > >        </includes>
> > >      </dependencySet>
> > >
> > > If I change something in the dependencySets-Element, all dependencies
> > will be ignored.
> > > What am I missing here?
> > >
> > > regards, carsten
> > >
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> > For additional commands, e-mail: dev-help@maven.apache.org
> >
> >
> 



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


Re: Assembly and DependencySets (Re: assemply and packaging)

Posted by John Casey <ca...@gmail.com>.
This is definitely a thread for the users' list, not the dev list.

Having said that, the assembly plugin doesn't currently support wildcards in
the dependencySet includes/excludes, for one thing. For another, those
includes and excludes (in the dependencySet) are meant to refer to the
artifacts by groupId and artifactId using the format 'groupId:artifactId'.

-john

On 5/23/06, Tim Kettler <ti...@udo.edu> wrote:
>
> I have not used the assembly plugin further than creating a
> 'jar-with-dependencies'. You
> should move this thread to the users list. The audience that can help is
> probably greater
> there than on the dev list.
>
> -Tim
>
> Carsten Karkola schrieb:
> > What I tried to do is, to filter dependencies and unpack some of them,
> simply copy others to
> > some dirs, like:
> > 1. two dependencies with type zip
> >     <dependencySet>
> >        <outputDirectory>/lib</outputDirectory>
> >        <unpack>true</unpack>
> >        <scope>runtime</scope>
> >        <includes>
> >           <include>*.zip</include>
> >        </includes>
> >      </dependencySet>
> > 2. a jar
> >     <dependencySet>
> >        <outputDirectory>/</outputDirectory>
> >        <unpack>false</unpack>
> >        <scope>runtime</scope>
> >        <includes>
> >           <include>mymodule*.jar</include>
> >        </includes>
> >      </dependencySet>
> > 3. another jar
> >     <dependencySet>
> >        <outputDirectory>/</outputDirectory>
> >        <unpack>true</unpack>
> >        <scope>runtime</scope>
> >        <includes>
> >           <include>server*.jar</include>
> >        </includes>
> >      </dependencySet>
> >
> > If I change something in the dependencySets-Element, all dependencies
> will be ignored.
> > What am I missing here?
> >
> > regards, carsten
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>

Re: Assembly and DependencySets (Re: assemply and packaging)

Posted by Tim Kettler <ti...@udo.edu>.
I have not used the assembly plugin further than creating a 'jar-with-dependencies'. You 
should move this thread to the users list. The audience that can help is probably greater 
there than on the dev list.

-Tim

Carsten Karkola schrieb:
> What I tried to do is, to filter dependencies and unpack some of them, simply copy others to 
> some dirs, like:
> 1. two dependencies with type zip
>     <dependencySet>
>        <outputDirectory>/lib</outputDirectory>
>        <unpack>true</unpack>
>        <scope>runtime</scope>
>        <includes>
>           <include>*.zip</include>
>        </includes>
>      </dependencySet>
> 2. a jar
>     <dependencySet>
>        <outputDirectory>/</outputDirectory>
>        <unpack>false</unpack>
>        <scope>runtime</scope>
>        <includes>
>           <include>mymodule*.jar</include>
>        </includes>
>      </dependencySet>
> 3. another jar
>     <dependencySet>
>        <outputDirectory>/</outputDirectory>
>        <unpack>true</unpack>
>        <scope>runtime</scope>
>        <includes>
>           <include>server*.jar</include>
>        </includes>
>      </dependencySet>
> 
> If I change something in the dependencySets-Element, all dependencies will be ignored.
> What am I missing here?
> 
> regards, carsten
> 
> 


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


Assembly and DependencySets (Re: assemply and packaging)

Posted by Carsten Karkola <ck...@mms-dresden.de>.
What I tried to do is, to filter dependencies and unpack some of them, simply copy others to 
some dirs, like:
1. two dependencies with type zip
    <dependencySet>
       <outputDirectory>/lib</outputDirectory>
       <unpack>true</unpack>
       <scope>runtime</scope>
       <includes>
          <include>*.zip</include>
       </includes>
     </dependencySet>
2. a jar
    <dependencySet>
       <outputDirectory>/</outputDirectory>
       <unpack>false</unpack>
       <scope>runtime</scope>
       <includes>
          <include>mymodule*.jar</include>
       </includes>
     </dependencySet>
3. another jar
    <dependencySet>
       <outputDirectory>/</outputDirectory>
       <unpack>true</unpack>
       <scope>runtime</scope>
       <includes>
          <include>server*.jar</include>
       </includes>
     </dependencySet>

If I change something in the dependencySets-Element, all dependencies will be ignored.
What am I missing here?

regards, carsten


Re: assemply and packaging

Posted by Carsten Karkola <ck...@mms-dresden.de>.
Thank you John and Tim, now "mvn package" creates the assembly.
But there seems to be a problem with the dependencies, if I use
  -DdescriptorId=jar-with-dependencies
I get all the dependend jars but my own assembly descriptor simply ignores the entry

  <dependencySets>
    <dependencySet>
      <outputDirectory>/</outputDirectory>
      <unpack>true</unpack>
      <scope>runtime</scope>
    </dependencySet>
  </dependencySets>

regards carsten,

 On 22 May 2006 at 11:08, John Casey wrote:

> Using the newest release of the assembly plugin, you can bind the 'attached'
> goal directly to the package phase of your lifecycle, and avoid building
> twice...so:
> 
> [...]
> <goals>
>   <goal>attached</goal>
> </goals>
> [...]
> 
> HTH,
> 
> john
> 
> On 5/19/06, Tim Kettler <ti...@udo.edu> wrote:
> >
> > Can't you just bind the plugin to a lifecycle phase in your pom?:
> >
> > <plugin>
> >    <groupId>org.apache.maven.plugins</groupId>
> >    <artifactId>maven-assembly-plugin</artifactId>
> >    <executions>
> >      <execution>
> >        <phase>package</phase>
> >        <configuration>
> >          <descriptorId>jar-with-dependencies</descriptorId>
> >        </configuration>
> >        <goals>
> >          <goal>assembly</goal>
> >        </goals>
> >      </execution>
> >    </executions>
> > </plugin>
> >
> > Hope this helps
> > -Tim
> >
> > Carsten Karkola schrieb:
> > > Hello,
> > >
> > > the usage of the assembly plugin is only possible via
> > >   mvn assembly:assembly
> > >
> > > Is there a possibility to define something like
> > >  <packaging>assembly</packaging>
> > >
> > > So I could do a
> > >   mvn package
> > > in my multi-project directory and would get the needed assemblies
> > without
> > > special calls of some subprojects, where the assemblies are defined.
> > >
> > > regards, carsten
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: dev-help@maven.apache.org
> > >
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> > For additional commands, e-mail: dev-help@maven.apache.org
> >
> >
> 



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


Re: assemply and packaging

Posted by John Casey <ca...@gmail.com>.
Using the newest release of the assembly plugin, you can bind the 'attached'
goal directly to the package phase of your lifecycle, and avoid building
twice...so:

[...]
<goals>
  <goal>attached</goal>
</goals>
[...]

HTH,

john

On 5/19/06, Tim Kettler <ti...@udo.edu> wrote:
>
> Can't you just bind the plugin to a lifecycle phase in your pom?:
>
> <plugin>
>    <groupId>org.apache.maven.plugins</groupId>
>    <artifactId>maven-assembly-plugin</artifactId>
>    <executions>
>      <execution>
>        <phase>package</phase>
>        <configuration>
>          <descriptorId>jar-with-dependencies</descriptorId>
>        </configuration>
>        <goals>
>          <goal>assembly</goal>
>        </goals>
>      </execution>
>    </executions>
> </plugin>
>
> Hope this helps
> -Tim
>
> Carsten Karkola schrieb:
> > Hello,
> >
> > the usage of the assembly plugin is only possible via
> >   mvn assembly:assembly
> >
> > Is there a possibility to define something like
> >  <packaging>assembly</packaging>
> >
> > So I could do a
> >   mvn package
> > in my multi-project directory and would get the needed assemblies
> without
> > special calls of some subprojects, where the assemblies are defined.
> >
> > regards, carsten
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> > For additional commands, e-mail: dev-help@maven.apache.org
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>

Re: assemply and packaging

Posted by Tim Kettler <ti...@udo.edu>.
Can't you just bind the plugin to a lifecycle phase in your pom?:

<plugin>
   <groupId>org.apache.maven.plugins</groupId>
   <artifactId>maven-assembly-plugin</artifactId>
   <executions>
     <execution>
       <phase>package</phase>
       <configuration>
         <descriptorId>jar-with-dependencies</descriptorId>
       </configuration>
       <goals>
         <goal>assembly</goal>
       </goals>
     </execution>
   </executions>
</plugin> 		

Hope this helps
-Tim	

Carsten Karkola schrieb:
> Hello,
> 
> the usage of the assembly plugin is only possible via
>   mvn assembly:assembly
> 
> Is there a possibility to define something like
>  <packaging>assembly</packaging>
> 
> So I could do a
>   mvn package
> in my multi-project directory and would get the needed assemblies without 
> special calls of some subprojects, where the assemblies are defined.
> 
> regards, carsten
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
> 
> 


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