You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Dmitry Skavish <sk...@gmail.com> on 2009/06/19 22:07:44 UTC

how to cope all jars from all modules to some top level project directory?

Hi,
I am stuck trying to figure out how to do that. I have root pom and several
modules under it. I need to build all the modules and then copy all the
modules jars with their dependencies to some top level directory. I tried to
use dependency plugin for this, but it copies jars and deps under each
module dir. I configured the plugin:

            <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-dependency-plugin</artifactId>
              <executions>
                <execution>
                  <id>copy-dependencies</id>
                  <phase>package</phase>
                  <goals>
                    <goal>copy-dependencies</goal>
                  </goals>
                  <configuration>

 <outputDirectory>${project.build.directory}/libs</outputDirectory>
                  </configuration>
                </execution>
              </executions>
            </plugin>

It creates libs under each of the modules and copies deps there, but I need
one dir for all the modules. The plugin is defined in the top level pom.

Any ideas what I am doing wrong? Thank you!

-- 
Dmitry Skavish

Re: how to cope all jars from all modules to some top level project directory?

Posted by Dmitry Skavish <sk...@gmail.com>.
thanks, it seems to work.

On Fri, Jun 19, 2009 at 5:02 PM, Johan Lindquist <jo...@kawoo.co.uk> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi,
>
> Agree with Stephen - this is then one (the latter) that worked for me.
>
> Cheers,
>
> Johan
>
> Stephen Connolly wrote:
> > you'll want to set inherited to false, or else create a special module
> > which has the config
> >
> > On Friday, June 19, 2009, Dmitry Skavish <sk...@gmail.com> wrote:
> >> Hi,
> >> I am stuck trying to figure out how to do that. I have root pom and
> several
> >> modules under it. I need to build all the modules and then copy all the
> >> modules jars with their dependencies to some top level directory. I
> tried to
> >> use dependency plugin for this, but it copies jars and deps under each
> >> module dir. I configured the plugin:
> >>
> >>             <plugin>
> >>               <groupId>org.apache.maven.plugins</groupId>
> >>               <artifactId>maven-dependency-plugin</artifactId>
> >>               <executions>
> >>                 <execution>
> >>                   <id>copy-dependencies</id>
> >>                   <phase>package</phase>
> >>                   <goals>
> >>                     <goal>copy-dependencies</goal>
> >>                   </goals>
> >>                   <configuration>
> >>
> >>  <outputDirectory>${project.build.directory}/libs</outputDirectory>
> >>                   </configuration>
> >>                 </execution>
> >>               </executions>
> >>             </plugin>
> >>
> >> It creates libs under each of the modules and copies deps there, but I
> need
> >> one dir for all the modules. The plugin is defined in the top level pom.
> >>
> >> Any ideas what I am doing wrong? Thank you!
> >>
> >> --
> >> Dmitry Skavish
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>
> - --
> you too?
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iEYEARECAAYFAko7/M4ACgkQpHYnED7eviox/gCgpL59N3GoTsSRyou9yvRnEpZw
> d+8AoIYWUp6FvCBQGRjYT6Molp8EJ9Qc
> =Qv9H
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


-- 
Dmitry Skavish

Re: how to cope all jars from all modules to some top level project directory?

Posted by Johan Lindquist <jo...@kawoo.co.uk>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

Agree with Stephen - this is then one (the latter) that worked for me.

Cheers,

Johan

Stephen Connolly wrote:
> you'll want to set inherited to false, or else create a special module
> which has the config
> 
> On Friday, June 19, 2009, Dmitry Skavish <sk...@gmail.com> wrote:
>> Hi,
>> I am stuck trying to figure out how to do that. I have root pom and several
>> modules under it. I need to build all the modules and then copy all the
>> modules jars with their dependencies to some top level directory. I tried to
>> use dependency plugin for this, but it copies jars and deps under each
>> module dir. I configured the plugin:
>>
>>             <plugin>
>>               <groupId>org.apache.maven.plugins</groupId>
>>               <artifactId>maven-dependency-plugin</artifactId>
>>               <executions>
>>                 <execution>
>>                   <id>copy-dependencies</id>
>>                   <phase>package</phase>
>>                   <goals>
>>                     <goal>copy-dependencies</goal>
>>                   </goals>
>>                   <configuration>
>>
>>  <outputDirectory>${project.build.directory}/libs</outputDirectory>
>>                   </configuration>
>>                 </execution>
>>               </executions>
>>             </plugin>
>>
>> It creates libs under each of the modules and copies deps there, but I need
>> one dir for all the modules. The plugin is defined in the top level pom.
>>
>> Any ideas what I am doing wrong? Thank you!
>>
>> --
>> Dmitry Skavish
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 

- --
you too?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAko7/M4ACgkQpHYnED7eviox/gCgpL59N3GoTsSRyou9yvRnEpZw
d+8AoIYWUp6FvCBQGRjYT6Molp8EJ9Qc
=Qv9H
-----END PGP SIGNATURE-----

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


Re: how to cope all jars from all modules to some top level project directory?

Posted by Stephen Connolly <st...@gmail.com>.
you'll want to set inherited to false, or else create a special module
which has the config

On Friday, June 19, 2009, Dmitry Skavish <sk...@gmail.com> wrote:
> Hi,
> I am stuck trying to figure out how to do that. I have root pom and several
> modules under it. I need to build all the modules and then copy all the
> modules jars with their dependencies to some top level directory. I tried to
> use dependency plugin for this, but it copies jars and deps under each
> module dir. I configured the plugin:
>
>             <plugin>
>               <groupId>org.apache.maven.plugins</groupId>
>               <artifactId>maven-dependency-plugin</artifactId>
>               <executions>
>                 <execution>
>                   <id>copy-dependencies</id>
>                   <phase>package</phase>
>                   <goals>
>                     <goal>copy-dependencies</goal>
>                   </goals>
>                   <configuration>
>
>  <outputDirectory>${project.build.directory}/libs</outputDirectory>
>                   </configuration>
>                 </execution>
>               </executions>
>             </plugin>
>
> It creates libs under each of the modules and copies deps there, but I need
> one dir for all the modules. The plugin is defined in the top level pom.
>
> Any ideas what I am doing wrong? Thank you!
>
> --
> Dmitry Skavish
>

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