You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Patrick Vanbrabant <pa...@gmail.com> on 2007/12/30 11:53:09 UTC

Problem with maven-dependency-plugin: copy-dependencies

Hi,

I have a multi-module project set up as follows.

Parent
    Module A
       depenencies: x, y,z
    Module B
               dependencies: A, y,d,
    Module C
               dependencies: A, B, t,u,y

Each module with its own dependencies.

Now I want to execute the goal copy-dependencies on module C, but through
the parent pom. So I execute mvn -U package on the parent project.

The plugin is configured as follows:
<plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>dependency-maven-plugin</artifactId>
    <executions>
        <execution>
            <id>copy-dependencies</id>
            <phase>test</phase>
            <goals>
                <goal>copy-dependencies</goal>
            </goals>
            <configuration>
                <outputDirectory>${project.build.directory}/${
pom.build.finalName}/download</outputDirectory>
                <stripVersion>true</stripVersion>
                <overWriteReleases>false</overWriteReleases>
                <overWriteSnapshots>false</overWriteSnapshots>
                    <overWriteIfNewer>true</overWriteIfNewer>
            </configuration>
        </execution>
    </executions>
</plugin>


According to the documentation, copy-dependencies should copy the project
dependencies, and its transitive dependencies.

After the execution of the package stage, I find in the download folder, all
the dependen jar files, except those for module A and B. The transitive
dependencies of those modules however are present in the download folder.

On more thing to mention is that module C is packages as a war file.

I have allready tried lots of things (including setting the phase to package
(in which case nothing was copied)). The only thing that works is if I use
an additional goal "copy" and specify the modules as artifacts for that
goal. In this case I have to "install" module A and B in my local
repository, sonething I think is not necessary nor wanted.

Anyone any ideas, on how I can achieve my goal, without reverting to the
"copy" workaround?

Many thanks,

Patrick Vanbrabant
HintTech Internetworking Technologies

Re: Problem with maven-dependency-plugin: copy-dependencies

Posted by amit kumar <am...@gmail.com>.
Thanks.

Amit Kumar

On Fri, Feb 22, 2008 at 2:30 PM, Graham Leggett <mi...@sharp.fm> wrote:

> amit kumar wrote:
>
> > Can I modify Manifest entries along with the copy-dependencies goal in
> > configuration? Or something like that. I want the Manifest.mf to have
> > entries for the copied dependencies(in the specific folder).
>
> Do it the other way around - don't try and change the path in the
> manifest, the plugin won't let you. Change the location of where the
> dependency plugin puts the jars.
>
> Regards,
> Graham
> --
>

Re: Problem with maven-dependency-plugin: copy-dependencies

Posted by Graham Leggett <mi...@sharp.fm>.
amit kumar wrote:

> Can I modify Manifest entries along with the copy-dependencies goal in
> configuration? Or something like that. I want the Manifest.mf to have
> entries for the copied dependencies(in the specific folder).

Do it the other way around - don't try and change the path in the 
manifest, the plugin won't let you. Change the location of where the 
dependency plugin puts the jars.

Regards,
Graham
--

Re: Problem with maven-dependency-plugin: copy-dependencies

Posted by amit kumar <am...@gmail.com>.
Hi,
Got it resolved. Actually I was using jboss-sar packaging for my project and
addition to that I was also using copy-dependencies, which was not required
since jboss-sar plugin also copies the dependencies to lib folder.

This was creating the problem.
I had removed copy-dependencies now and it seems to work fine.


Thanks and regards,
Amit

On Tue, Feb 26, 2008 at 1:59 PM, Stephen Connolly <
stephen.alan.connolly@gmail.com> wrote:

> Have you been doing a build clean?
>
> If you don't do a clean build then artifacts from the previous build can
> end
> up hanging around
>
> -Stephen
>
> On Tue, Feb 26, 2008 at 7:11 AM, amit kumar <am...@gmail.com>
> wrote:
>
> > Hi,
> > Now this is a new problem, I am seeing the dependency getting packaged
> as
> > dependency-1.0.0-SNAPSHOT.jar as well as dependency-1.0.0-TIMESTAMP.jar
> > I am using copy-dependency to copy the dependencies to a lib folder. How
> > to
> > overcome this?
> >
> > This is my configuration:
> >
> >  <configuration>
> >  <outputDirectory>${project.build.directory}/${project.artifactId}-${
> > project.version}/lib</outputDirectory>
> >                   <overWriteReleases>false</overWriteReleases>
> >                  <overWriteSnapshots>false</overWriteSnapshots>
> >                  <overWriteIfNewer>true</overWriteIfNewer>
> >                   <excludeTransitive>true</excludeTransitive>
> > <configuration>
> >
> > I tried  turning <overWriteSnapshots>true</overWriteSnapshots> also but
> > not
> > working. Any help?
> >
> > Regards,
> > Amit
> >
> >
> > On Tue, Feb 26, 2008 at 12:29 PM, amit kumar <am...@gmail.com>
> > wrote:
> >
> > > Oh Ok. Thanks.
> > >
> > >
> > > On Tue, Feb 26, 2008 at 4:33 AM, Brian E. Fox <
> brianf@reply.infinity.nu>
> > > wrote:
> > >
> > > > The dependency plugin only copies things. It's up to whatever is
> doing
> > > > the packaging to create the manifest.
> > > >
> > > > -----Original Message-----
> > > > From: amit kumar [mailto:amit.kumar97400@gmail.com]
> > > > Sent: Friday, February 22, 2008 1:37 AM
> > > > To: Maven Users List
> > > > Subject: Re: Problem with maven-dependency-plugin: copy-dependencies
> > > >
> > > > Can I modify Manifest entries along with the copy-dependencies goal
> in
> > > > configuration? Or something like that. I want the Manifest.mf to
> have
> > > > entries for the copied dependencies(in the specific folder).
> > > >
> > > >
> > > > Regards,
> > > > Amit Kumar
> > > >
> > > > On Wed, Jan 2, 2008 at 2:18 PM, PatrickV
> > > > <Pa...@hinttech.com>
> > > > wrote:
> > > >
> > > > >
> > > > > The attachments are there. My first posting did indeed not include
> > the
> > > > > attachements, I edited the posting and now the file (pp.zip) is
> > there.
> > > > >
> > > > >
> > > > >
> > > > > Brian E Fox wrote:
> > > > > >
> > > > > > The attachments didn't come through. Try writing a jira at
> > > > > > http://jira.codehaus.org/browse/MDEP and attach the files there.
> > > > > >
> > > > > > -----Original Message-----
> > > > > > From: PatrickV [mailto:Patrick.Vanbrabant@hinttech.com]
> > > > > > Sent: Tuesday, January 01, 2008 11:08 AM
> > > > > > To: users@maven.apache.org
> > > > > > Subject: RE: Problem with maven-dependency-plugin:
> > copy-dependencies
> > > > > >
> > > > > >
> > > > > > I hope I can make it clear by attaching the pom's to this
> message.
> > > > The
> > > > > > poms
> > > > > > are stripped versions of the real stuff.
> > > > > >
> > > > > > Module A = pp-common.xml
> > > > > > Module B = pp-client.xml
> > > > > > Module C = pp-server.xml
> > > > > >
> > > > > > The copy dependencies plugin is stated in pp-server.xml.
> > > > > > pp-server depends on pp-common and pp-client.
> > > > > >
> > > > > > I expect to see after running the copy-dependency goal to target
> > > > > > directory:
> > > > > >
> > > > > > pp-common.jar in target directory
> > > > > > pp-client.jar in target directory
> > > > > > all dependencies from pp-server
> > > > > > all dependencies from pp-common not yet included in target
> > directory
> > > > > > all dependencies from pp-client not yet included in target
> > directory
> > > > > >
> > > > > > What I do see in target directory
> > > > > > all dependencies from pp-server
> > > > > > all dependencies from pp-common
> > > > > > all dependencies from pp-client
> > > > > > BUT NOT... pp-common.jar and pp-client.jar, allthough they too
> ARE
> > > > > > listed in
> > > > > > the dependencies of the pp-server project.
> > > > > >
> > > > > > Packaging of pp-server (war or jar) has no influence on result.
> > > > > >
> > > > > > The process is triggered by executing mvn -U clean package on
> > > > parent.
> > > > > >
> > > > > > I hope the issue is clear now.
> > > > > >
> > > > > > KR
> > > > > >
> > > > > > PatrickV
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > Brian E Fox wrote:
> > > > > >>
> > > > > >>
> > > > > >>
> > > > > >> -----Original Mes http://www.nabble.com/file/p14567676/pp.zip
> > > > pp.zip
> > > > > >> sage-----
> > > > > >> From: PatrickV [mailto:Patrick.Vanbrabant@hinttech.com]
> > > > > >> Sent: Sunday, December 30, 2007 2:11 PM
> > > > > >> To: users@maven.apache.org
> > > > > >> Subject: RE: Problem with maven-dependency-plugin:
> > > > copy-dependencies
> > > > > >>
> > > > > >>
> > > > > >>>I changed the packaging of module C into jar, and no
> difference.
> > > > > >>>I think the copy-dependency plugin does not take into account
> > > > > >> dependencies
> > > > > >>>on artifacts on the reactor (in this case Module A and Module
> B),
> > > > but
> > > > > >> only
> > > > > >>>on "real" dependencies from the repositorie.
> > > > > >>
> > > > > >> Not sure what you mean here. If a dependency is listed in the
> > pom,
> > > > it
> > > > > > is
> > > > > >> included. There are no other ways for dependencies to be
> > included.
> > > > > >> Sharing a reactor has other subtle effects but doesn't change
> the
> > > > fact
> > > > > >> that a dependency needs to be listed. Perhaps I'm not getting
> > what
> > > > > >> you're saying.
> > > > > >>
> > > > > >> "...I don't want to pull in the dependencies of Module C (the
> > war),
> > > > > > but
> > > > > >> I want to copy all the dependencies
> > > > > >> of Module C (including Module A and Module B).."
> > > > > >>
> > > > > >> Huh? You do or don't want the dependencies of Module C?
> > > > > >>
> > > > > >> "to a specific directory, so that later on I can do some
> > additional
> > > > > >> processing on it. All dependencies
> > > > > >> are there, even the transitive dependencies of module A and
> > module
> > > > B
> > > > > >> (which
> > > > > >> are both packaged as Jar), except for ModuleA.jar and
> ModuleB.jar
> > ."
> > > > > >>
> > > > > >> Simply binding copy-dependencies should get you all
> dependencies
> > of
> > > > > >> whatever pom you've put it in. If it's module C, then you'll
> get
> > > > all
> > > > > >> transitive dependencies of that Module. If you put it in the
> > > > parent,
> > > > > >> chances are that parent doesn't declare dependencies like you
> > want
> > > > so
> > > > > >> you won't get what you want (module != dependency).
> > > > > >>
> > > > > >> Brian E Fox wrote:
> > > > > >>>
> > > > > >>> I think the problem is the war packaging. Maven doesn't
> normally
> > > > pull
> > > > > >> in
> > > > > >>> war dependencies transitively because the dependencies are
> > > > included
> > > > > >>> inside it.
> > > > > >>>
> > > > > >>> The dependency plugin xxx-dependencies goals are asking Maven
> to
> > > > do
> > > > > >> the
> > > > > >>> resolution and then filters the results, so in this case the
> > > > > >> transitive
> > > > > >>> deps are not included.
> > > > > >>>
> > > > > >>> One thing you could try is copying the dependencies from
> Module
> > > > C's
> > > > > >> pom
> > > > > >>> since the plugin would have knowledge of all the dependencies,
> > or
> > > > you
> > > > > >>> could unpack the war (because presumably the dependencies you
> > need
> > > > > > are
> > > > > >>> in /lib). (using the latest snapshot, you can filter the
> > contents
> > > > as
> > > > > >>> they are unpacked).
> > > > > >>>
> > > > > >>> -----Original Message-----
> > > > > >>> From: Patrick Vanbrabant [mailto:patrick.vanbrabant@gmail.com]
> > > > > >>> Sent: Sunday, December 30, 2007 5:53 AM
> > > > > >>> To: users@maven.apache.org
> > > > > >>> Subject: Problem with maven-dependency-plugin:
> copy-dependencies
> > > > > >>>
> > > > > >>> Hi,
> > > > > >>>
> > > > > >>> I have a multi-module project set up as follows.
> > > > > >>>
> > > > > >>> Parent
> > > > > >>>     Module A
> > > > > >>>        depenencies: x, y,z
> > > > > >>>     Module B
> > > > > >>>                dependencies: A, y,d,
> > > > > >>>     Module C
> > > > > >>>                dependencies: A, B, t,u,y
> > > > > >>>
> > > > > >>> Each module with its own dependencies.
> > > > > >>>
> > > > > >>> Now I want to execute the goal copy-dependencies on module C,
> > but
> > > > > >>> through
> > > > > >>> the parent pom. So I execute mvn -U package on the parent
> > project.
> > > > > >>>
> > > > > >>> The plugin is configured as follows:
> > > > > >>> <plugin>
> > > > > >>>     <groupId>org.codehaus.mojo</groupId>
> > > > > >>>     <artifactId>dependency-maven-plugin</artifactId>
> > > > > >>>     <executions>
> > > > > >>>         <execution>
> > > > > >>>             <id>copy-dependencies</id>
> > > > > >>>             <phase>test</phase>
> > > > > >>>             <goals>
> > > > > >>>                 <goal>copy-dependencies</goal>
> > > > > >>>             </goals>
> > > > > >>>             <configuration>
> > > > > >>>                 <outputDirectory>${project.build.directory}/${
> > > > > >>> pom.build.finalName}/download</outputDirectory>
> > > > > >>>                 <stripVersion>true</stripVersion>
> > > > > >>>                 <overWriteReleases>false</overWriteReleases>
> > > > > >>>                 <overWriteSnapshots>false</overWriteSnapshots>
> > > > > >>>                     <overWriteIfNewer>true</overWriteIfNewer>
> > > > > >>>             </configuration>
> > > > > >>>         </execution>
> > > > > >>>     </executions>
> > > > > >>> </plugin>
> > > > > >>>
> > > > > >>>
> > > > > >>> According to the documentation, copy-dependencies should copy
> > the
> > > > > >>> project
> > > > > >>> dependencies, and its transitive dependencies.
> > > > > >>>
> > > > > >>> After the execution of the package stage, I find in the
> download
> > > > > >> folder,
> > > > > >>> all
> > > > > >>> the dependen jar files, except those for module A and B. The
> > > > > >> transitive
> > > > > >>> dependencies of those modules however are present in the
> > download
> > > > > >>> folder.
> > > > > >>>
> > > > > >>> On more thing to mention is that module C is packages as a war
> > > > file.
> > > > > >>>
> > > > > >>> I have allready tried lots of things (including setting the
> > phase
> > > > to
> > > > > >>> package
> > > > > >>> (in which case nothing was copied)). The only thing that works
> > is
> > > > if
> > > > > > I
> > > > > >>> use
> > > > > >>> an additional goal "copy" and specify the modules as artifacts
> > for
> > > > > >> that
> > > > > >>> goal. In this case I have to "install" module A and B in my
> > local
> > > > > >>> repository, sonething I think is not necessary nor wanted.
> > > > > >>>
> > > > > >>> Anyone any ideas, on how I can achieve my goal, without
> > reverting
> > > > to
> > > > > >> the
> > > > > >>> "copy" workaround?
> > > > > >>>
> > > > > >>> Many thanks,
> > > > > >>>
> > > > > >>> Patrick Vanbrabant
> > > > > >>> HintTech Internetworking Technologies
> > > > > >>>
> > > > > >>>
> > > >
> ---------------------------------------------------------------------
> > > > > >>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > > > >>> For additional commands, e-mail: users-help@maven.apache.org
> > > > > >>>
> > > > > >>>
> > > > > >>>
> > > > > >>
> > > > > >> --
> > > > > >> View this message in context:
> > > > > >>
> > > > > >
> > > >
> > http://www.nabble.com/Problem-with-maven-dependency-plugin%3A-copy-depen
> > > > > >> dencies-tp14546984s177p14550176.html
> > > > > >> Sent from the Maven - Users mailing list archive at Nabble.com.
> > > > > >>
> > > > > >>
> > > > > >>
> > > >
> ---------------------------------------------------------------------
> > > > > >> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > > > >> For additional commands, e-mail: users-help@maven.apache.org
> > > > > >>
> > > > > >>
> > > > > >>
> > > >
> ---------------------------------------------------------------------
> > > > > >> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > > > >> For additional commands, e-mail: users-help@maven.apache.org
> > > > > >>
> > > > > >>
> > > > > >>
> > > > > >
> > > > > > --
> > > > > > View this message in context:
> > > > > >
> > > >
> > http://www.nabble.com/Problem-with-maven-dependency-plugin%3A-copy-depen
> > > > > > dencies-tp14546984s177p14567676.html
> > > > > > Sent from the Maven - Users mailing list archive at Nabble.com.
> > > > > >
> > > > > >
> > > > > >
> > > >
> ---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > > > > For additional commands, e-mail: users-help@maven.apache.org
> > > > > >
> > > > > >
> > > > > >
> > > >
> ---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > > > > For additional commands, e-mail: users-help@maven.apache.org
> > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > > --
> > > > > View this message in context:
> > > > >
> > > >
> > http://www.nabble.com/Problem-with-maven-dependency-plugin%3A-copy-depen
> > > > dencies-tp14546984s177p14575091.html<
> >
> http://www.nabble.com/Problem-with-maven-dependency-plugin%3A-copy-dependencies-tp14546984s177p14575091.html
> > >
> > > > > Sent from the Maven - Users mailing list archive at Nabble.com.
> > > > >
> > > > >
> > > > >
> > ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > > > For additional commands, e-mail: users-help@maven.apache.org
> > > > >
> > > > >
> > > >
> > > >
> ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > > For additional commands, e-mail: users-help@maven.apache.org
> > > >
> > > >
> > >
> >
>

Re: Problem with maven-dependency-plugin: copy-dependencies

Posted by Stephen Connolly <st...@gmail.com>.
Have you been doing a build clean?

If you don't do a clean build then artifacts from the previous build can end
up hanging around

-Stephen

On Tue, Feb 26, 2008 at 7:11 AM, amit kumar <am...@gmail.com>
wrote:

> Hi,
> Now this is a new problem, I am seeing the dependency getting packaged as
> dependency-1.0.0-SNAPSHOT.jar as well as dependency-1.0.0-TIMESTAMP.jar
> I am using copy-dependency to copy the dependencies to a lib folder. How
> to
> overcome this?
>
> This is my configuration:
>
>  <configuration>
>  <outputDirectory>${project.build.directory}/${project.artifactId}-${
> project.version}/lib</outputDirectory>
>                   <overWriteReleases>false</overWriteReleases>
>                  <overWriteSnapshots>false</overWriteSnapshots>
>                  <overWriteIfNewer>true</overWriteIfNewer>
>                   <excludeTransitive>true</excludeTransitive>
> <configuration>
>
> I tried  turning <overWriteSnapshots>true</overWriteSnapshots> also but
> not
> working. Any help?
>
> Regards,
> Amit
>
>
> On Tue, Feb 26, 2008 at 12:29 PM, amit kumar <am...@gmail.com>
> wrote:
>
> > Oh Ok. Thanks.
> >
> >
> > On Tue, Feb 26, 2008 at 4:33 AM, Brian E. Fox <br...@reply.infinity.nu>
> > wrote:
> >
> > > The dependency plugin only copies things. It's up to whatever is doing
> > > the packaging to create the manifest.
> > >
> > > -----Original Message-----
> > > From: amit kumar [mailto:amit.kumar97400@gmail.com]
> > > Sent: Friday, February 22, 2008 1:37 AM
> > > To: Maven Users List
> > > Subject: Re: Problem with maven-dependency-plugin: copy-dependencies
> > >
> > > Can I modify Manifest entries along with the copy-dependencies goal in
> > > configuration? Or something like that. I want the Manifest.mf to have
> > > entries for the copied dependencies(in the specific folder).
> > >
> > >
> > > Regards,
> > > Amit Kumar
> > >
> > > On Wed, Jan 2, 2008 at 2:18 PM, PatrickV
> > > <Pa...@hinttech.com>
> > > wrote:
> > >
> > > >
> > > > The attachments are there. My first posting did indeed not include
> the
> > > > attachements, I edited the posting and now the file (pp.zip) is
> there.
> > > >
> > > >
> > > >
> > > > Brian E Fox wrote:
> > > > >
> > > > > The attachments didn't come through. Try writing a jira at
> > > > > http://jira.codehaus.org/browse/MDEP and attach the files there.
> > > > >
> > > > > -----Original Message-----
> > > > > From: PatrickV [mailto:Patrick.Vanbrabant@hinttech.com]
> > > > > Sent: Tuesday, January 01, 2008 11:08 AM
> > > > > To: users@maven.apache.org
> > > > > Subject: RE: Problem with maven-dependency-plugin:
> copy-dependencies
> > > > >
> > > > >
> > > > > I hope I can make it clear by attaching the pom's to this message.
> > > The
> > > > > poms
> > > > > are stripped versions of the real stuff.
> > > > >
> > > > > Module A = pp-common.xml
> > > > > Module B = pp-client.xml
> > > > > Module C = pp-server.xml
> > > > >
> > > > > The copy dependencies plugin is stated in pp-server.xml.
> > > > > pp-server depends on pp-common and pp-client.
> > > > >
> > > > > I expect to see after running the copy-dependency goal to target
> > > > > directory:
> > > > >
> > > > > pp-common.jar in target directory
> > > > > pp-client.jar in target directory
> > > > > all dependencies from pp-server
> > > > > all dependencies from pp-common not yet included in target
> directory
> > > > > all dependencies from pp-client not yet included in target
> directory
> > > > >
> > > > > What I do see in target directory
> > > > > all dependencies from pp-server
> > > > > all dependencies from pp-common
> > > > > all dependencies from pp-client
> > > > > BUT NOT... pp-common.jar and pp-client.jar, allthough they too ARE
> > > > > listed in
> > > > > the dependencies of the pp-server project.
> > > > >
> > > > > Packaging of pp-server (war or jar) has no influence on result.
> > > > >
> > > > > The process is triggered by executing mvn -U clean package on
> > > parent.
> > > > >
> > > > > I hope the issue is clear now.
> > > > >
> > > > > KR
> > > > >
> > > > > PatrickV
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > Brian E Fox wrote:
> > > > >>
> > > > >>
> > > > >>
> > > > >> -----Original Mes http://www.nabble.com/file/p14567676/pp.zip
> > > pp.zip
> > > > >> sage-----
> > > > >> From: PatrickV [mailto:Patrick.Vanbrabant@hinttech.com]
> > > > >> Sent: Sunday, December 30, 2007 2:11 PM
> > > > >> To: users@maven.apache.org
> > > > >> Subject: RE: Problem with maven-dependency-plugin:
> > > copy-dependencies
> > > > >>
> > > > >>
> > > > >>>I changed the packaging of module C into jar, and no difference.
> > > > >>>I think the copy-dependency plugin does not take into account
> > > > >> dependencies
> > > > >>>on artifacts on the reactor (in this case Module A and Module B),
> > > but
> > > > >> only
> > > > >>>on "real" dependencies from the repositorie.
> > > > >>
> > > > >> Not sure what you mean here. If a dependency is listed in the
> pom,
> > > it
> > > > > is
> > > > >> included. There are no other ways for dependencies to be
> included.
> > > > >> Sharing a reactor has other subtle effects but doesn't change the
> > > fact
> > > > >> that a dependency needs to be listed. Perhaps I'm not getting
> what
> > > > >> you're saying.
> > > > >>
> > > > >> "...I don't want to pull in the dependencies of Module C (the
> war),
> > > > > but
> > > > >> I want to copy all the dependencies
> > > > >> of Module C (including Module A and Module B).."
> > > > >>
> > > > >> Huh? You do or don't want the dependencies of Module C?
> > > > >>
> > > > >> "to a specific directory, so that later on I can do some
> additional
> > > > >> processing on it. All dependencies
> > > > >> are there, even the transitive dependencies of module A and
> module
> > > B
> > > > >> (which
> > > > >> are both packaged as Jar), except for ModuleA.jar and ModuleB.jar
> ."
> > > > >>
> > > > >> Simply binding copy-dependencies should get you all dependencies
> of
> > > > >> whatever pom you've put it in. If it's module C, then you'll get
> > > all
> > > > >> transitive dependencies of that Module. If you put it in the
> > > parent,
> > > > >> chances are that parent doesn't declare dependencies like you
> want
> > > so
> > > > >> you won't get what you want (module != dependency).
> > > > >>
> > > > >> Brian E Fox wrote:
> > > > >>>
> > > > >>> I think the problem is the war packaging. Maven doesn't normally
> > > pull
> > > > >> in
> > > > >>> war dependencies transitively because the dependencies are
> > > included
> > > > >>> inside it.
> > > > >>>
> > > > >>> The dependency plugin xxx-dependencies goals are asking Maven to
> > > do
> > > > >> the
> > > > >>> resolution and then filters the results, so in this case the
> > > > >> transitive
> > > > >>> deps are not included.
> > > > >>>
> > > > >>> One thing you could try is copying the dependencies from Module
> > > C's
> > > > >> pom
> > > > >>> since the plugin would have knowledge of all the dependencies,
> or
> > > you
> > > > >>> could unpack the war (because presumably the dependencies you
> need
> > > > > are
> > > > >>> in /lib). (using the latest snapshot, you can filter the
> contents
> > > as
> > > > >>> they are unpacked).
> > > > >>>
> > > > >>> -----Original Message-----
> > > > >>> From: Patrick Vanbrabant [mailto:patrick.vanbrabant@gmail.com]
> > > > >>> Sent: Sunday, December 30, 2007 5:53 AM
> > > > >>> To: users@maven.apache.org
> > > > >>> Subject: Problem with maven-dependency-plugin: copy-dependencies
> > > > >>>
> > > > >>> Hi,
> > > > >>>
> > > > >>> I have a multi-module project set up as follows.
> > > > >>>
> > > > >>> Parent
> > > > >>>     Module A
> > > > >>>        depenencies: x, y,z
> > > > >>>     Module B
> > > > >>>                dependencies: A, y,d,
> > > > >>>     Module C
> > > > >>>                dependencies: A, B, t,u,y
> > > > >>>
> > > > >>> Each module with its own dependencies.
> > > > >>>
> > > > >>> Now I want to execute the goal copy-dependencies on module C,
> but
> > > > >>> through
> > > > >>> the parent pom. So I execute mvn -U package on the parent
> project.
> > > > >>>
> > > > >>> The plugin is configured as follows:
> > > > >>> <plugin>
> > > > >>>     <groupId>org.codehaus.mojo</groupId>
> > > > >>>     <artifactId>dependency-maven-plugin</artifactId>
> > > > >>>     <executions>
> > > > >>>         <execution>
> > > > >>>             <id>copy-dependencies</id>
> > > > >>>             <phase>test</phase>
> > > > >>>             <goals>
> > > > >>>                 <goal>copy-dependencies</goal>
> > > > >>>             </goals>
> > > > >>>             <configuration>
> > > > >>>                 <outputDirectory>${project.build.directory}/${
> > > > >>> pom.build.finalName}/download</outputDirectory>
> > > > >>>                 <stripVersion>true</stripVersion>
> > > > >>>                 <overWriteReleases>false</overWriteReleases>
> > > > >>>                 <overWriteSnapshots>false</overWriteSnapshots>
> > > > >>>                     <overWriteIfNewer>true</overWriteIfNewer>
> > > > >>>             </configuration>
> > > > >>>         </execution>
> > > > >>>     </executions>
> > > > >>> </plugin>
> > > > >>>
> > > > >>>
> > > > >>> According to the documentation, copy-dependencies should copy
> the
> > > > >>> project
> > > > >>> dependencies, and its transitive dependencies.
> > > > >>>
> > > > >>> After the execution of the package stage, I find in the download
> > > > >> folder,
> > > > >>> all
> > > > >>> the dependen jar files, except those for module A and B. The
> > > > >> transitive
> > > > >>> dependencies of those modules however are present in the
> download
> > > > >>> folder.
> > > > >>>
> > > > >>> On more thing to mention is that module C is packages as a war
> > > file.
> > > > >>>
> > > > >>> I have allready tried lots of things (including setting the
> phase
> > > to
> > > > >>> package
> > > > >>> (in which case nothing was copied)). The only thing that works
> is
> > > if
> > > > > I
> > > > >>> use
> > > > >>> an additional goal "copy" and specify the modules as artifacts
> for
> > > > >> that
> > > > >>> goal. In this case I have to "install" module A and B in my
> local
> > > > >>> repository, sonething I think is not necessary nor wanted.
> > > > >>>
> > > > >>> Anyone any ideas, on how I can achieve my goal, without
> reverting
> > > to
> > > > >> the
> > > > >>> "copy" workaround?
> > > > >>>
> > > > >>> Many thanks,
> > > > >>>
> > > > >>> Patrick Vanbrabant
> > > > >>> HintTech Internetworking Technologies
> > > > >>>
> > > > >>>
> > > ---------------------------------------------------------------------
> > > > >>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > > >>> For additional commands, e-mail: users-help@maven.apache.org
> > > > >>>
> > > > >>>
> > > > >>>
> > > > >>
> > > > >> --
> > > > >> View this message in context:
> > > > >>
> > > > >
> > >
> http://www.nabble.com/Problem-with-maven-dependency-plugin%3A-copy-depen
> > > > >> dencies-tp14546984s177p14550176.html
> > > > >> Sent from the Maven - Users mailing list archive at Nabble.com.
> > > > >>
> > > > >>
> > > > >>
> > > ---------------------------------------------------------------------
> > > > >> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > > >> For additional commands, e-mail: users-help@maven.apache.org
> > > > >>
> > > > >>
> > > > >>
> > > ---------------------------------------------------------------------
> > > > >> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > > >> For additional commands, e-mail: users-help@maven.apache.org
> > > > >>
> > > > >>
> > > > >>
> > > > >
> > > > > --
> > > > > View this message in context:
> > > > >
> > >
> http://www.nabble.com/Problem-with-maven-dependency-plugin%3A-copy-depen
> > > > > dencies-tp14546984s177p14567676.html
> > > > > Sent from the Maven - Users mailing list archive at Nabble.com.
> > > > >
> > > > >
> > > > >
> > > ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > > > For additional commands, e-mail: users-help@maven.apache.org
> > > > >
> > > > >
> > > > >
> > > ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > > > For additional commands, e-mail: users-help@maven.apache.org
> > > > >
> > > > >
> > > > >
> > > >
> > > > --
> > > > View this message in context:
> > > >
> > >
> http://www.nabble.com/Problem-with-maven-dependency-plugin%3A-copy-depen
> > > dencies-tp14546984s177p14575091.html<
> http://www.nabble.com/Problem-with-maven-dependency-plugin%3A-copy-dependencies-tp14546984s177p14575091.html
> >
> > > > Sent from the Maven - Users mailing list archive at Nabble.com.
> > > >
> > > >
> > > >
> ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > > For additional commands, e-mail: users-help@maven.apache.org
> > > >
> > > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: users-help@maven.apache.org
> > >
> > >
> >
>

RE: Problem with maven-dependency-plugin: copy-dependencies

Posted by "Brian E. Fox" <br...@reply.infinity.nu>.
The difference is where the plugin finds the jar. In remote repos,
snapshots are stored using the timestamp. If you install it locally, it
will only have the -SNAPSHOT ending. This is just how maven works. You
can use the stripVersion flag to dump the version from the file
altogether.

-----Original Message-----
From: amit kumar [mailto:amit.kumar97400@gmail.com] 
Sent: Tuesday, February 26, 2008 2:12 AM
To: Maven Users List
Subject: Re: Problem with maven-dependency-plugin: copy-dependencies

Hi,
Now this is a new problem, I am seeing the dependency getting packaged
as
dependency-1.0.0-SNAPSHOT.jar as well as dependency-1.0.0-TIMESTAMP.jar
I am using copy-dependency to copy the dependencies to a lib folder. How
to
overcome this?

This is my configuration:

 <configuration>
 <outputDirectory>${project.build.directory}/${project.artifactId}-${
project.version}/lib</outputDirectory>
                  <overWriteReleases>false</overWriteReleases>
                  <overWriteSnapshots>false</overWriteSnapshots>
                  <overWriteIfNewer>true</overWriteIfNewer>
                  <excludeTransitive>true</excludeTransitive>
<configuration>

I tried  turning <overWriteSnapshots>true</overWriteSnapshots> also but
not
working. Any help?

Regards,
Amit


On Tue, Feb 26, 2008 at 12:29 PM, amit kumar <am...@gmail.com>
wrote:

> Oh Ok. Thanks.
>
>
> On Tue, Feb 26, 2008 at 4:33 AM, Brian E. Fox
<br...@reply.infinity.nu>
> wrote:
>
> > The dependency plugin only copies things. It's up to whatever is
doing
> > the packaging to create the manifest.
> >
> > -----Original Message-----
> > From: amit kumar [mailto:amit.kumar97400@gmail.com]
> > Sent: Friday, February 22, 2008 1:37 AM
> > To: Maven Users List
> > Subject: Re: Problem with maven-dependency-plugin: copy-dependencies
> >
> > Can I modify Manifest entries along with the copy-dependencies goal
in
> > configuration? Or something like that. I want the Manifest.mf to
have
> > entries for the copied dependencies(in the specific folder).
> >
> >
> > Regards,
> > Amit Kumar
> >
> > On Wed, Jan 2, 2008 at 2:18 PM, PatrickV
> > <Pa...@hinttech.com>
> > wrote:
> >
> > >
> > > The attachments are there. My first posting did indeed not include
the
> > > attachements, I edited the posting and now the file (pp.zip) is
there.
> > >
> > >
> > >
> > > Brian E Fox wrote:
> > > >
> > > > The attachments didn't come through. Try writing a jira at
> > > > http://jira.codehaus.org/browse/MDEP and attach the files there.
> > > >
> > > > -----Original Message-----
> > > > From: PatrickV [mailto:Patrick.Vanbrabant@hinttech.com]
> > > > Sent: Tuesday, January 01, 2008 11:08 AM
> > > > To: users@maven.apache.org
> > > > Subject: RE: Problem with maven-dependency-plugin:
copy-dependencies
> > > >
> > > >
> > > > I hope I can make it clear by attaching the pom's to this
message.
> > The
> > > > poms
> > > > are stripped versions of the real stuff.
> > > >
> > > > Module A = pp-common.xml
> > > > Module B = pp-client.xml
> > > > Module C = pp-server.xml
> > > >
> > > > The copy dependencies plugin is stated in pp-server.xml.
> > > > pp-server depends on pp-common and pp-client.
> > > >
> > > > I expect to see after running the copy-dependency goal to target
> > > > directory:
> > > >
> > > > pp-common.jar in target directory
> > > > pp-client.jar in target directory
> > > > all dependencies from pp-server
> > > > all dependencies from pp-common not yet included in target
directory
> > > > all dependencies from pp-client not yet included in target
directory
> > > >
> > > > What I do see in target directory
> > > > all dependencies from pp-server
> > > > all dependencies from pp-common
> > > > all dependencies from pp-client
> > > > BUT NOT... pp-common.jar and pp-client.jar, allthough they too
ARE
> > > > listed in
> > > > the dependencies of the pp-server project.
> > > >
> > > > Packaging of pp-server (war or jar) has no influence on result.
> > > >
> > > > The process is triggered by executing mvn -U clean package on
> > parent.
> > > >
> > > > I hope the issue is clear now.
> > > >
> > > > KR
> > > >
> > > > PatrickV
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > Brian E Fox wrote:
> > > >>
> > > >>
> > > >>
> > > >> -----Original Mes http://www.nabble.com/file/p14567676/pp.zip
> > pp.zip
> > > >> sage-----
> > > >> From: PatrickV [mailto:Patrick.Vanbrabant@hinttech.com]
> > > >> Sent: Sunday, December 30, 2007 2:11 PM
> > > >> To: users@maven.apache.org
> > > >> Subject: RE: Problem with maven-dependency-plugin:
> > copy-dependencies
> > > >>
> > > >>
> > > >>>I changed the packaging of module C into jar, and no
difference.
> > > >>>I think the copy-dependency plugin does not take into account
> > > >> dependencies
> > > >>>on artifacts on the reactor (in this case Module A and Module
B),
> > but
> > > >> only
> > > >>>on "real" dependencies from the repositorie.
> > > >>
> > > >> Not sure what you mean here. If a dependency is listed in the
pom,
> > it
> > > > is
> > > >> included. There are no other ways for dependencies to be
included.
> > > >> Sharing a reactor has other subtle effects but doesn't change
the
> > fact
> > > >> that a dependency needs to be listed. Perhaps I'm not getting
what
> > > >> you're saying.
> > > >>
> > > >> "...I don't want to pull in the dependencies of Module C (the
war),
> > > > but
> > > >> I want to copy all the dependencies
> > > >> of Module C (including Module A and Module B).."
> > > >>
> > > >> Huh? You do or don't want the dependencies of Module C?
> > > >>
> > > >> "to a specific directory, so that later on I can do some
additional
> > > >> processing on it. All dependencies
> > > >> are there, even the transitive dependencies of module A and
module
> > B
> > > >> (which
> > > >> are both packaged as Jar), except for ModuleA.jar and
ModuleB.jar."
> > > >>
> > > >> Simply binding copy-dependencies should get you all
dependencies of
> > > >> whatever pom you've put it in. If it's module C, then you'll
get
> > all
> > > >> transitive dependencies of that Module. If you put it in the
> > parent,
> > > >> chances are that parent doesn't declare dependencies like you
want
> > so
> > > >> you won't get what you want (module != dependency).
> > > >>
> > > >> Brian E Fox wrote:
> > > >>>
> > > >>> I think the problem is the war packaging. Maven doesn't
normally
> > pull
> > > >> in
> > > >>> war dependencies transitively because the dependencies are
> > included
> > > >>> inside it.
> > > >>>
> > > >>> The dependency plugin xxx-dependencies goals are asking Maven
to
> > do
> > > >> the
> > > >>> resolution and then filters the results, so in this case the
> > > >> transitive
> > > >>> deps are not included.
> > > >>>
> > > >>> One thing you could try is copying the dependencies from
Module
> > C's
> > > >> pom
> > > >>> since the plugin would have knowledge of all the dependencies,
or
> > you
> > > >>> could unpack the war (because presumably the dependencies you
need
> > > > are
> > > >>> in /lib). (using the latest snapshot, you can filter the
contents
> > as
> > > >>> they are unpacked).
> > > >>>
> > > >>> -----Original Message-----
> > > >>> From: Patrick Vanbrabant [mailto:patrick.vanbrabant@gmail.com]
> > > >>> Sent: Sunday, December 30, 2007 5:53 AM
> > > >>> To: users@maven.apache.org
> > > >>> Subject: Problem with maven-dependency-plugin:
copy-dependencies
> > > >>>
> > > >>> Hi,
> > > >>>
> > > >>> I have a multi-module project set up as follows.
> > > >>>
> > > >>> Parent
> > > >>>     Module A
> > > >>>        depenencies: x, y,z
> > > >>>     Module B
> > > >>>                dependencies: A, y,d,
> > > >>>     Module C
> > > >>>                dependencies: A, B, t,u,y
> > > >>>
> > > >>> Each module with its own dependencies.
> > > >>>
> > > >>> Now I want to execute the goal copy-dependencies on module C,
but
> > > >>> through
> > > >>> the parent pom. So I execute mvn -U package on the parent
project.
> > > >>>
> > > >>> The plugin is configured as follows:
> > > >>> <plugin>
> > > >>>     <groupId>org.codehaus.mojo</groupId>
> > > >>>     <artifactId>dependency-maven-plugin</artifactId>
> > > >>>     <executions>
> > > >>>         <execution>
> > > >>>             <id>copy-dependencies</id>
> > > >>>             <phase>test</phase>
> > > >>>             <goals>
> > > >>>                 <goal>copy-dependencies</goal>
> > > >>>             </goals>
> > > >>>             <configuration>
> > > >>>                 <outputDirectory>${project.build.directory}/${
> > > >>> pom.build.finalName}/download</outputDirectory>
> > > >>>                 <stripVersion>true</stripVersion>
> > > >>>                 <overWriteReleases>false</overWriteReleases>
> > > >>>                 <overWriteSnapshots>false</overWriteSnapshots>
> > > >>>                     <overWriteIfNewer>true</overWriteIfNewer>
> > > >>>             </configuration>
> > > >>>         </execution>
> > > >>>     </executions>
> > > >>> </plugin>
> > > >>>
> > > >>>
> > > >>> According to the documentation, copy-dependencies should copy
the
> > > >>> project
> > > >>> dependencies, and its transitive dependencies.
> > > >>>
> > > >>> After the execution of the package stage, I find in the
download
> > > >> folder,
> > > >>> all
> > > >>> the dependen jar files, except those for module A and B. The
> > > >> transitive
> > > >>> dependencies of those modules however are present in the
download
> > > >>> folder.
> > > >>>
> > > >>> On more thing to mention is that module C is packages as a war
> > file.
> > > >>>
> > > >>> I have allready tried lots of things (including setting the
phase
> > to
> > > >>> package
> > > >>> (in which case nothing was copied)). The only thing that works
is
> > if
> > > > I
> > > >>> use
> > > >>> an additional goal "copy" and specify the modules as artifacts
for
> > > >> that
> > > >>> goal. In this case I have to "install" module A and B in my
local
> > > >>> repository, sonething I think is not necessary nor wanted.
> > > >>>
> > > >>> Anyone any ideas, on how I can achieve my goal, without
reverting
> > to
> > > >> the
> > > >>> "copy" workaround?
> > > >>>
> > > >>> Many thanks,
> > > >>>
> > > >>> Patrick Vanbrabant
> > > >>> HintTech Internetworking Technologies
> > > >>>
> > > >>>
> >
---------------------------------------------------------------------
> > > >>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > >>> For additional commands, e-mail: users-help@maven.apache.org
> > > >>>
> > > >>>
> > > >>>
> > > >>
> > > >> --
> > > >> View this message in context:
> > > >>
> > > >
> >
http://www.nabble.com/Problem-with-maven-dependency-plugin%3A-copy-depen
> > > >> dencies-tp14546984s177p14550176.html
> > > >> Sent from the Maven - Users mailing list archive at Nabble.com.
> > > >>
> > > >>
> > > >>
> >
---------------------------------------------------------------------
> > > >> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > >> For additional commands, e-mail: users-help@maven.apache.org
> > > >>
> > > >>
> > > >>
> >
---------------------------------------------------------------------
> > > >> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > >> For additional commands, e-mail: users-help@maven.apache.org
> > > >>
> > > >>
> > > >>
> > > >
> > > > --
> > > > View this message in context:
> > > >
> >
http://www.nabble.com/Problem-with-maven-dependency-plugin%3A-copy-depen
> > > > dencies-tp14546984s177p14567676.html
> > > > Sent from the Maven - Users mailing list archive at Nabble.com.
> > > >
> > > >
> > > >
> >
---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > > For additional commands, e-mail: users-help@maven.apache.org
> > > >
> > > >
> > > >
> >
---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > > For additional commands, e-mail: users-help@maven.apache.org
> > > >
> > > >
> > > >
> > >
> > > --
> > > View this message in context:
> > >
> >
http://www.nabble.com/Problem-with-maven-dependency-plugin%3A-copy-depen
> >
dencies-tp14546984s177p14575091.html<http://www.nabble.com/Problem-with-
maven-dependency-plugin%3A-copy-dependencies-tp14546984s177p14575091.htm
l>
> > > Sent from the Maven - Users mailing list archive at Nabble.com.
> > >
> > >
> > >
---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: users-help@maven.apache.org
> > >
> > >
> >
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>

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


Re: Problem with maven-dependency-plugin: copy-dependencies

Posted by amit kumar <am...@gmail.com>.
Hi,
Now this is a new problem, I am seeing the dependency getting packaged as
dependency-1.0.0-SNAPSHOT.jar as well as dependency-1.0.0-TIMESTAMP.jar
I am using copy-dependency to copy the dependencies to a lib folder. How to
overcome this?

This is my configuration:

 <configuration>
 <outputDirectory>${project.build.directory}/${project.artifactId}-${
project.version}/lib</outputDirectory>
                  <overWriteReleases>false</overWriteReleases>
                  <overWriteSnapshots>false</overWriteSnapshots>
                  <overWriteIfNewer>true</overWriteIfNewer>
                  <excludeTransitive>true</excludeTransitive>
<configuration>

I tried  turning <overWriteSnapshots>true</overWriteSnapshots> also but not
working. Any help?

Regards,
Amit


On Tue, Feb 26, 2008 at 12:29 PM, amit kumar <am...@gmail.com>
wrote:

> Oh Ok. Thanks.
>
>
> On Tue, Feb 26, 2008 at 4:33 AM, Brian E. Fox <br...@reply.infinity.nu>
> wrote:
>
> > The dependency plugin only copies things. It's up to whatever is doing
> > the packaging to create the manifest.
> >
> > -----Original Message-----
> > From: amit kumar [mailto:amit.kumar97400@gmail.com]
> > Sent: Friday, February 22, 2008 1:37 AM
> > To: Maven Users List
> > Subject: Re: Problem with maven-dependency-plugin: copy-dependencies
> >
> > Can I modify Manifest entries along with the copy-dependencies goal in
> > configuration? Or something like that. I want the Manifest.mf to have
> > entries for the copied dependencies(in the specific folder).
> >
> >
> > Regards,
> > Amit Kumar
> >
> > On Wed, Jan 2, 2008 at 2:18 PM, PatrickV
> > <Pa...@hinttech.com>
> > wrote:
> >
> > >
> > > The attachments are there. My first posting did indeed not include the
> > > attachements, I edited the posting and now the file (pp.zip) is there.
> > >
> > >
> > >
> > > Brian E Fox wrote:
> > > >
> > > > The attachments didn't come through. Try writing a jira at
> > > > http://jira.codehaus.org/browse/MDEP and attach the files there.
> > > >
> > > > -----Original Message-----
> > > > From: PatrickV [mailto:Patrick.Vanbrabant@hinttech.com]
> > > > Sent: Tuesday, January 01, 2008 11:08 AM
> > > > To: users@maven.apache.org
> > > > Subject: RE: Problem with maven-dependency-plugin: copy-dependencies
> > > >
> > > >
> > > > I hope I can make it clear by attaching the pom's to this message.
> > The
> > > > poms
> > > > are stripped versions of the real stuff.
> > > >
> > > > Module A = pp-common.xml
> > > > Module B = pp-client.xml
> > > > Module C = pp-server.xml
> > > >
> > > > The copy dependencies plugin is stated in pp-server.xml.
> > > > pp-server depends on pp-common and pp-client.
> > > >
> > > > I expect to see after running the copy-dependency goal to target
> > > > directory:
> > > >
> > > > pp-common.jar in target directory
> > > > pp-client.jar in target directory
> > > > all dependencies from pp-server
> > > > all dependencies from pp-common not yet included in target directory
> > > > all dependencies from pp-client not yet included in target directory
> > > >
> > > > What I do see in target directory
> > > > all dependencies from pp-server
> > > > all dependencies from pp-common
> > > > all dependencies from pp-client
> > > > BUT NOT... pp-common.jar and pp-client.jar, allthough they too ARE
> > > > listed in
> > > > the dependencies of the pp-server project.
> > > >
> > > > Packaging of pp-server (war or jar) has no influence on result.
> > > >
> > > > The process is triggered by executing mvn -U clean package on
> > parent.
> > > >
> > > > I hope the issue is clear now.
> > > >
> > > > KR
> > > >
> > > > PatrickV
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > Brian E Fox wrote:
> > > >>
> > > >>
> > > >>
> > > >> -----Original Mes http://www.nabble.com/file/p14567676/pp.zip
> > pp.zip
> > > >> sage-----
> > > >> From: PatrickV [mailto:Patrick.Vanbrabant@hinttech.com]
> > > >> Sent: Sunday, December 30, 2007 2:11 PM
> > > >> To: users@maven.apache.org
> > > >> Subject: RE: Problem with maven-dependency-plugin:
> > copy-dependencies
> > > >>
> > > >>
> > > >>>I changed the packaging of module C into jar, and no difference.
> > > >>>I think the copy-dependency plugin does not take into account
> > > >> dependencies
> > > >>>on artifacts on the reactor (in this case Module A and Module B),
> > but
> > > >> only
> > > >>>on "real" dependencies from the repositorie.
> > > >>
> > > >> Not sure what you mean here. If a dependency is listed in the pom,
> > it
> > > > is
> > > >> included. There are no other ways for dependencies to be included.
> > > >> Sharing a reactor has other subtle effects but doesn't change the
> > fact
> > > >> that a dependency needs to be listed. Perhaps I'm not getting what
> > > >> you're saying.
> > > >>
> > > >> "...I don't want to pull in the dependencies of Module C (the war),
> > > > but
> > > >> I want to copy all the dependencies
> > > >> of Module C (including Module A and Module B).."
> > > >>
> > > >> Huh? You do or don't want the dependencies of Module C?
> > > >>
> > > >> "to a specific directory, so that later on I can do some additional
> > > >> processing on it. All dependencies
> > > >> are there, even the transitive dependencies of module A and module
> > B
> > > >> (which
> > > >> are both packaged as Jar), except for ModuleA.jar and ModuleB.jar."
> > > >>
> > > >> Simply binding copy-dependencies should get you all dependencies of
> > > >> whatever pom you've put it in. If it's module C, then you'll get
> > all
> > > >> transitive dependencies of that Module. If you put it in the
> > parent,
> > > >> chances are that parent doesn't declare dependencies like you want
> > so
> > > >> you won't get what you want (module != dependency).
> > > >>
> > > >> Brian E Fox wrote:
> > > >>>
> > > >>> I think the problem is the war packaging. Maven doesn't normally
> > pull
> > > >> in
> > > >>> war dependencies transitively because the dependencies are
> > included
> > > >>> inside it.
> > > >>>
> > > >>> The dependency plugin xxx-dependencies goals are asking Maven to
> > do
> > > >> the
> > > >>> resolution and then filters the results, so in this case the
> > > >> transitive
> > > >>> deps are not included.
> > > >>>
> > > >>> One thing you could try is copying the dependencies from Module
> > C's
> > > >> pom
> > > >>> since the plugin would have knowledge of all the dependencies, or
> > you
> > > >>> could unpack the war (because presumably the dependencies you need
> > > > are
> > > >>> in /lib). (using the latest snapshot, you can filter the contents
> > as
> > > >>> they are unpacked).
> > > >>>
> > > >>> -----Original Message-----
> > > >>> From: Patrick Vanbrabant [mailto:patrick.vanbrabant@gmail.com]
> > > >>> Sent: Sunday, December 30, 2007 5:53 AM
> > > >>> To: users@maven.apache.org
> > > >>> Subject: Problem with maven-dependency-plugin: copy-dependencies
> > > >>>
> > > >>> Hi,
> > > >>>
> > > >>> I have a multi-module project set up as follows.
> > > >>>
> > > >>> Parent
> > > >>>     Module A
> > > >>>        depenencies: x, y,z
> > > >>>     Module B
> > > >>>                dependencies: A, y,d,
> > > >>>     Module C
> > > >>>                dependencies: A, B, t,u,y
> > > >>>
> > > >>> Each module with its own dependencies.
> > > >>>
> > > >>> Now I want to execute the goal copy-dependencies on module C, but
> > > >>> through
> > > >>> the parent pom. So I execute mvn -U package on the parent project.
> > > >>>
> > > >>> The plugin is configured as follows:
> > > >>> <plugin>
> > > >>>     <groupId>org.codehaus.mojo</groupId>
> > > >>>     <artifactId>dependency-maven-plugin</artifactId>
> > > >>>     <executions>
> > > >>>         <execution>
> > > >>>             <id>copy-dependencies</id>
> > > >>>             <phase>test</phase>
> > > >>>             <goals>
> > > >>>                 <goal>copy-dependencies</goal>
> > > >>>             </goals>
> > > >>>             <configuration>
> > > >>>                 <outputDirectory>${project.build.directory}/${
> > > >>> pom.build.finalName}/download</outputDirectory>
> > > >>>                 <stripVersion>true</stripVersion>
> > > >>>                 <overWriteReleases>false</overWriteReleases>
> > > >>>                 <overWriteSnapshots>false</overWriteSnapshots>
> > > >>>                     <overWriteIfNewer>true</overWriteIfNewer>
> > > >>>             </configuration>
> > > >>>         </execution>
> > > >>>     </executions>
> > > >>> </plugin>
> > > >>>
> > > >>>
> > > >>> According to the documentation, copy-dependencies should copy the
> > > >>> project
> > > >>> dependencies, and its transitive dependencies.
> > > >>>
> > > >>> After the execution of the package stage, I find in the download
> > > >> folder,
> > > >>> all
> > > >>> the dependen jar files, except those for module A and B. The
> > > >> transitive
> > > >>> dependencies of those modules however are present in the download
> > > >>> folder.
> > > >>>
> > > >>> On more thing to mention is that module C is packages as a war
> > file.
> > > >>>
> > > >>> I have allready tried lots of things (including setting the phase
> > to
> > > >>> package
> > > >>> (in which case nothing was copied)). The only thing that works is
> > if
> > > > I
> > > >>> use
> > > >>> an additional goal "copy" and specify the modules as artifacts for
> > > >> that
> > > >>> goal. In this case I have to "install" module A and B in my local
> > > >>> repository, sonething I think is not necessary nor wanted.
> > > >>>
> > > >>> Anyone any ideas, on how I can achieve my goal, without reverting
> > to
> > > >> the
> > > >>> "copy" workaround?
> > > >>>
> > > >>> Many thanks,
> > > >>>
> > > >>> Patrick Vanbrabant
> > > >>> HintTech Internetworking Technologies
> > > >>>
> > > >>>
> > ---------------------------------------------------------------------
> > > >>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > >>> For additional commands, e-mail: users-help@maven.apache.org
> > > >>>
> > > >>>
> > > >>>
> > > >>
> > > >> --
> > > >> View this message in context:
> > > >>
> > > >
> > http://www.nabble.com/Problem-with-maven-dependency-plugin%3A-copy-depen
> > > >> dencies-tp14546984s177p14550176.html
> > > >> Sent from the Maven - Users mailing list archive at Nabble.com.
> > > >>
> > > >>
> > > >>
> > ---------------------------------------------------------------------
> > > >> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > >> For additional commands, e-mail: users-help@maven.apache.org
> > > >>
> > > >>
> > > >>
> > ---------------------------------------------------------------------
> > > >> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > >> For additional commands, e-mail: users-help@maven.apache.org
> > > >>
> > > >>
> > > >>
> > > >
> > > > --
> > > > View this message in context:
> > > >
> > http://www.nabble.com/Problem-with-maven-dependency-plugin%3A-copy-depen
> > > > dencies-tp14546984s177p14567676.html
> > > > Sent from the Maven - Users mailing list archive at Nabble.com.
> > > >
> > > >
> > > >
> > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > > For additional commands, e-mail: users-help@maven.apache.org
> > > >
> > > >
> > > >
> > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > > For additional commands, e-mail: users-help@maven.apache.org
> > > >
> > > >
> > > >
> > >
> > > --
> > > View this message in context:
> > >
> > http://www.nabble.com/Problem-with-maven-dependency-plugin%3A-copy-depen
> > dencies-tp14546984s177p14575091.html<http://www.nabble.com/Problem-with-maven-dependency-plugin%3A-copy-dependencies-tp14546984s177p14575091.html>
> > > Sent from the Maven - Users mailing list archive at Nabble.com.
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: users-help@maven.apache.org
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>

Re: Problem with maven-dependency-plugin: copy-dependencies

Posted by amit kumar <am...@gmail.com>.
Oh Ok. Thanks.

On Tue, Feb 26, 2008 at 4:33 AM, Brian E. Fox <br...@reply.infinity.nu>
wrote:

> The dependency plugin only copies things. It's up to whatever is doing
> the packaging to create the manifest.
>
> -----Original Message-----
> From: amit kumar [mailto:amit.kumar97400@gmail.com]
> Sent: Friday, February 22, 2008 1:37 AM
> To: Maven Users List
> Subject: Re: Problem with maven-dependency-plugin: copy-dependencies
>
> Can I modify Manifest entries along with the copy-dependencies goal in
> configuration? Or something like that. I want the Manifest.mf to have
> entries for the copied dependencies(in the specific folder).
>
>
> Regards,
> Amit Kumar
>
> On Wed, Jan 2, 2008 at 2:18 PM, PatrickV
> <Pa...@hinttech.com>
> wrote:
>
> >
> > The attachments are there. My first posting did indeed not include the
> > attachements, I edited the posting and now the file (pp.zip) is there.
> >
> >
> >
> > Brian E Fox wrote:
> > >
> > > The attachments didn't come through. Try writing a jira at
> > > http://jira.codehaus.org/browse/MDEP and attach the files there.
> > >
> > > -----Original Message-----
> > > From: PatrickV [mailto:Patrick.Vanbrabant@hinttech.com]
> > > Sent: Tuesday, January 01, 2008 11:08 AM
> > > To: users@maven.apache.org
> > > Subject: RE: Problem with maven-dependency-plugin: copy-dependencies
> > >
> > >
> > > I hope I can make it clear by attaching the pom's to this message.
> The
> > > poms
> > > are stripped versions of the real stuff.
> > >
> > > Module A = pp-common.xml
> > > Module B = pp-client.xml
> > > Module C = pp-server.xml
> > >
> > > The copy dependencies plugin is stated in pp-server.xml.
> > > pp-server depends on pp-common and pp-client.
> > >
> > > I expect to see after running the copy-dependency goal to target
> > > directory:
> > >
> > > pp-common.jar in target directory
> > > pp-client.jar in target directory
> > > all dependencies from pp-server
> > > all dependencies from pp-common not yet included in target directory
> > > all dependencies from pp-client not yet included in target directory
> > >
> > > What I do see in target directory
> > > all dependencies from pp-server
> > > all dependencies from pp-common
> > > all dependencies from pp-client
> > > BUT NOT... pp-common.jar and pp-client.jar, allthough they too ARE
> > > listed in
> > > the dependencies of the pp-server project.
> > >
> > > Packaging of pp-server (war or jar) has no influence on result.
> > >
> > > The process is triggered by executing mvn -U clean package on
> parent.
> > >
> > > I hope the issue is clear now.
> > >
> > > KR
> > >
> > > PatrickV
> > >
> > >
> > >
> > >
> > >
> > > Brian E Fox wrote:
> > >>
> > >>
> > >>
> > >> -----Original Mes http://www.nabble.com/file/p14567676/pp.zip
> pp.zip
> > >> sage-----
> > >> From: PatrickV [mailto:Patrick.Vanbrabant@hinttech.com]
> > >> Sent: Sunday, December 30, 2007 2:11 PM
> > >> To: users@maven.apache.org
> > >> Subject: RE: Problem with maven-dependency-plugin:
> copy-dependencies
> > >>
> > >>
> > >>>I changed the packaging of module C into jar, and no difference.
> > >>>I think the copy-dependency plugin does not take into account
> > >> dependencies
> > >>>on artifacts on the reactor (in this case Module A and Module B),
> but
> > >> only
> > >>>on "real" dependencies from the repositorie.
> > >>
> > >> Not sure what you mean here. If a dependency is listed in the pom,
> it
> > > is
> > >> included. There are no other ways for dependencies to be included.
> > >> Sharing a reactor has other subtle effects but doesn't change the
> fact
> > >> that a dependency needs to be listed. Perhaps I'm not getting what
> > >> you're saying.
> > >>
> > >> "...I don't want to pull in the dependencies of Module C (the war),
> > > but
> > >> I want to copy all the dependencies
> > >> of Module C (including Module A and Module B).."
> > >>
> > >> Huh? You do or don't want the dependencies of Module C?
> > >>
> > >> "to a specific directory, so that later on I can do some additional
> > >> processing on it. All dependencies
> > >> are there, even the transitive dependencies of module A and module
> B
> > >> (which
> > >> are both packaged as Jar), except for ModuleA.jar and ModuleB.jar."
> > >>
> > >> Simply binding copy-dependencies should get you all dependencies of
> > >> whatever pom you've put it in. If it's module C, then you'll get
> all
> > >> transitive dependencies of that Module. If you put it in the
> parent,
> > >> chances are that parent doesn't declare dependencies like you want
> so
> > >> you won't get what you want (module != dependency).
> > >>
> > >> Brian E Fox wrote:
> > >>>
> > >>> I think the problem is the war packaging. Maven doesn't normally
> pull
> > >> in
> > >>> war dependencies transitively because the dependencies are
> included
> > >>> inside it.
> > >>>
> > >>> The dependency plugin xxx-dependencies goals are asking Maven to
> do
> > >> the
> > >>> resolution and then filters the results, so in this case the
> > >> transitive
> > >>> deps are not included.
> > >>>
> > >>> One thing you could try is copying the dependencies from Module
> C's
> > >> pom
> > >>> since the plugin would have knowledge of all the dependencies, or
> you
> > >>> could unpack the war (because presumably the dependencies you need
> > > are
> > >>> in /lib). (using the latest snapshot, you can filter the contents
> as
> > >>> they are unpacked).
> > >>>
> > >>> -----Original Message-----
> > >>> From: Patrick Vanbrabant [mailto:patrick.vanbrabant@gmail.com]
> > >>> Sent: Sunday, December 30, 2007 5:53 AM
> > >>> To: users@maven.apache.org
> > >>> Subject: Problem with maven-dependency-plugin: copy-dependencies
> > >>>
> > >>> Hi,
> > >>>
> > >>> I have a multi-module project set up as follows.
> > >>>
> > >>> Parent
> > >>>     Module A
> > >>>        depenencies: x, y,z
> > >>>     Module B
> > >>>                dependencies: A, y,d,
> > >>>     Module C
> > >>>                dependencies: A, B, t,u,y
> > >>>
> > >>> Each module with its own dependencies.
> > >>>
> > >>> Now I want to execute the goal copy-dependencies on module C, but
> > >>> through
> > >>> the parent pom. So I execute mvn -U package on the parent project.
> > >>>
> > >>> The plugin is configured as follows:
> > >>> <plugin>
> > >>>     <groupId>org.codehaus.mojo</groupId>
> > >>>     <artifactId>dependency-maven-plugin</artifactId>
> > >>>     <executions>
> > >>>         <execution>
> > >>>             <id>copy-dependencies</id>
> > >>>             <phase>test</phase>
> > >>>             <goals>
> > >>>                 <goal>copy-dependencies</goal>
> > >>>             </goals>
> > >>>             <configuration>
> > >>>                 <outputDirectory>${project.build.directory}/${
> > >>> pom.build.finalName}/download</outputDirectory>
> > >>>                 <stripVersion>true</stripVersion>
> > >>>                 <overWriteReleases>false</overWriteReleases>
> > >>>                 <overWriteSnapshots>false</overWriteSnapshots>
> > >>>                     <overWriteIfNewer>true</overWriteIfNewer>
> > >>>             </configuration>
> > >>>         </execution>
> > >>>     </executions>
> > >>> </plugin>
> > >>>
> > >>>
> > >>> According to the documentation, copy-dependencies should copy the
> > >>> project
> > >>> dependencies, and its transitive dependencies.
> > >>>
> > >>> After the execution of the package stage, I find in the download
> > >> folder,
> > >>> all
> > >>> the dependen jar files, except those for module A and B. The
> > >> transitive
> > >>> dependencies of those modules however are present in the download
> > >>> folder.
> > >>>
> > >>> On more thing to mention is that module C is packages as a war
> file.
> > >>>
> > >>> I have allready tried lots of things (including setting the phase
> to
> > >>> package
> > >>> (in which case nothing was copied)). The only thing that works is
> if
> > > I
> > >>> use
> > >>> an additional goal "copy" and specify the modules as artifacts for
> > >> that
> > >>> goal. In this case I have to "install" module A and B in my local
> > >>> repository, sonething I think is not necessary nor wanted.
> > >>>
> > >>> Anyone any ideas, on how I can achieve my goal, without reverting
> to
> > >> the
> > >>> "copy" workaround?
> > >>>
> > >>> Many thanks,
> > >>>
> > >>> Patrick Vanbrabant
> > >>> HintTech Internetworking Technologies
> > >>>
> > >>>
> ---------------------------------------------------------------------
> > >>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > >>> For additional commands, e-mail: users-help@maven.apache.org
> > >>>
> > >>>
> > >>>
> > >>
> > >> --
> > >> View this message in context:
> > >>
> > >
> http://www.nabble.com/Problem-with-maven-dependency-plugin%3A-copy-depen
> > >> dencies-tp14546984s177p14550176.html
> > >> Sent from the Maven - Users mailing list archive at Nabble.com.
> > >>
> > >>
> > >>
> ---------------------------------------------------------------------
> > >> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > >> For additional commands, e-mail: users-help@maven.apache.org
> > >>
> > >>
> > >>
> ---------------------------------------------------------------------
> > >> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > >> For additional commands, e-mail: users-help@maven.apache.org
> > >>
> > >>
> > >>
> > >
> > > --
> > > View this message in context:
> > >
> http://www.nabble.com/Problem-with-maven-dependency-plugin%3A-copy-depen
> > > dencies-tp14546984s177p14567676.html
> > > Sent from the Maven - Users mailing list archive at Nabble.com.
> > >
> > >
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: users-help@maven.apache.org
> > >
> > >
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: users-help@maven.apache.org
> > >
> > >
> > >
> >
> > --
> > View this message in context:
> >
> http://www.nabble.com/Problem-with-maven-dependency-plugin%3A-copy-depen
> dencies-tp14546984s177p14575091.html<http://www.nabble.com/Problem-with-maven-dependency-plugin%3A-copy-dependencies-tp14546984s177p14575091.html>
> > Sent from the Maven - Users mailing list archive at Nabble.com.
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

RE: Problem with maven-dependency-plugin: copy-dependencies

Posted by "Brian E. Fox" <br...@reply.infinity.nu>.
The dependency plugin only copies things. It's up to whatever is doing
the packaging to create the manifest.

-----Original Message-----
From: amit kumar [mailto:amit.kumar97400@gmail.com] 
Sent: Friday, February 22, 2008 1:37 AM
To: Maven Users List
Subject: Re: Problem with maven-dependency-plugin: copy-dependencies

Can I modify Manifest entries along with the copy-dependencies goal in
configuration? Or something like that. I want the Manifest.mf to have
entries for the copied dependencies(in the specific folder).


Regards,
Amit Kumar

On Wed, Jan 2, 2008 at 2:18 PM, PatrickV
<Pa...@hinttech.com>
wrote:

>
> The attachments are there. My first posting did indeed not include the
> attachements, I edited the posting and now the file (pp.zip) is there.
>
>
>
> Brian E Fox wrote:
> >
> > The attachments didn't come through. Try writing a jira at
> > http://jira.codehaus.org/browse/MDEP and attach the files there.
> >
> > -----Original Message-----
> > From: PatrickV [mailto:Patrick.Vanbrabant@hinttech.com]
> > Sent: Tuesday, January 01, 2008 11:08 AM
> > To: users@maven.apache.org
> > Subject: RE: Problem with maven-dependency-plugin: copy-dependencies
> >
> >
> > I hope I can make it clear by attaching the pom's to this message.
The
> > poms
> > are stripped versions of the real stuff.
> >
> > Module A = pp-common.xml
> > Module B = pp-client.xml
> > Module C = pp-server.xml
> >
> > The copy dependencies plugin is stated in pp-server.xml.
> > pp-server depends on pp-common and pp-client.
> >
> > I expect to see after running the copy-dependency goal to target
> > directory:
> >
> > pp-common.jar in target directory
> > pp-client.jar in target directory
> > all dependencies from pp-server
> > all dependencies from pp-common not yet included in target directory
> > all dependencies from pp-client not yet included in target directory
> >
> > What I do see in target directory
> > all dependencies from pp-server
> > all dependencies from pp-common
> > all dependencies from pp-client
> > BUT NOT... pp-common.jar and pp-client.jar, allthough they too ARE
> > listed in
> > the dependencies of the pp-server project.
> >
> > Packaging of pp-server (war or jar) has no influence on result.
> >
> > The process is triggered by executing mvn -U clean package on
parent.
> >
> > I hope the issue is clear now.
> >
> > KR
> >
> > PatrickV
> >
> >
> >
> >
> >
> > Brian E Fox wrote:
> >>
> >>
> >>
> >> -----Original Mes http://www.nabble.com/file/p14567676/pp.zip
pp.zip
> >> sage-----
> >> From: PatrickV [mailto:Patrick.Vanbrabant@hinttech.com]
> >> Sent: Sunday, December 30, 2007 2:11 PM
> >> To: users@maven.apache.org
> >> Subject: RE: Problem with maven-dependency-plugin:
copy-dependencies
> >>
> >>
> >>>I changed the packaging of module C into jar, and no difference.
> >>>I think the copy-dependency plugin does not take into account
> >> dependencies
> >>>on artifacts on the reactor (in this case Module A and Module B),
but
> >> only
> >>>on "real" dependencies from the repositorie.
> >>
> >> Not sure what you mean here. If a dependency is listed in the pom,
it
> > is
> >> included. There are no other ways for dependencies to be included.
> >> Sharing a reactor has other subtle effects but doesn't change the
fact
> >> that a dependency needs to be listed. Perhaps I'm not getting what
> >> you're saying.
> >>
> >> "...I don't want to pull in the dependencies of Module C (the war),
> > but
> >> I want to copy all the dependencies
> >> of Module C (including Module A and Module B).."
> >>
> >> Huh? You do or don't want the dependencies of Module C?
> >>
> >> "to a specific directory, so that later on I can do some additional
> >> processing on it. All dependencies
> >> are there, even the transitive dependencies of module A and module
B
> >> (which
> >> are both packaged as Jar), except for ModuleA.jar and ModuleB.jar."
> >>
> >> Simply binding copy-dependencies should get you all dependencies of
> >> whatever pom you've put it in. If it's module C, then you'll get
all
> >> transitive dependencies of that Module. If you put it in the
parent,
> >> chances are that parent doesn't declare dependencies like you want
so
> >> you won't get what you want (module != dependency).
> >>
> >> Brian E Fox wrote:
> >>>
> >>> I think the problem is the war packaging. Maven doesn't normally
pull
> >> in
> >>> war dependencies transitively because the dependencies are
included
> >>> inside it.
> >>>
> >>> The dependency plugin xxx-dependencies goals are asking Maven to
do
> >> the
> >>> resolution and then filters the results, so in this case the
> >> transitive
> >>> deps are not included.
> >>>
> >>> One thing you could try is copying the dependencies from Module
C's
> >> pom
> >>> since the plugin would have knowledge of all the dependencies, or
you
> >>> could unpack the war (because presumably the dependencies you need
> > are
> >>> in /lib). (using the latest snapshot, you can filter the contents
as
> >>> they are unpacked).
> >>>
> >>> -----Original Message-----
> >>> From: Patrick Vanbrabant [mailto:patrick.vanbrabant@gmail.com]
> >>> Sent: Sunday, December 30, 2007 5:53 AM
> >>> To: users@maven.apache.org
> >>> Subject: Problem with maven-dependency-plugin: copy-dependencies
> >>>
> >>> Hi,
> >>>
> >>> I have a multi-module project set up as follows.
> >>>
> >>> Parent
> >>>     Module A
> >>>        depenencies: x, y,z
> >>>     Module B
> >>>                dependencies: A, y,d,
> >>>     Module C
> >>>                dependencies: A, B, t,u,y
> >>>
> >>> Each module with its own dependencies.
> >>>
> >>> Now I want to execute the goal copy-dependencies on module C, but
> >>> through
> >>> the parent pom. So I execute mvn -U package on the parent project.
> >>>
> >>> The plugin is configured as follows:
> >>> <plugin>
> >>>     <groupId>org.codehaus.mojo</groupId>
> >>>     <artifactId>dependency-maven-plugin</artifactId>
> >>>     <executions>
> >>>         <execution>
> >>>             <id>copy-dependencies</id>
> >>>             <phase>test</phase>
> >>>             <goals>
> >>>                 <goal>copy-dependencies</goal>
> >>>             </goals>
> >>>             <configuration>
> >>>                 <outputDirectory>${project.build.directory}/${
> >>> pom.build.finalName}/download</outputDirectory>
> >>>                 <stripVersion>true</stripVersion>
> >>>                 <overWriteReleases>false</overWriteReleases>
> >>>                 <overWriteSnapshots>false</overWriteSnapshots>
> >>>                     <overWriteIfNewer>true</overWriteIfNewer>
> >>>             </configuration>
> >>>         </execution>
> >>>     </executions>
> >>> </plugin>
> >>>
> >>>
> >>> According to the documentation, copy-dependencies should copy the
> >>> project
> >>> dependencies, and its transitive dependencies.
> >>>
> >>> After the execution of the package stage, I find in the download
> >> folder,
> >>> all
> >>> the dependen jar files, except those for module A and B. The
> >> transitive
> >>> dependencies of those modules however are present in the download
> >>> folder.
> >>>
> >>> On more thing to mention is that module C is packages as a war
file.
> >>>
> >>> I have allready tried lots of things (including setting the phase
to
> >>> package
> >>> (in which case nothing was copied)). The only thing that works is
if
> > I
> >>> use
> >>> an additional goal "copy" and specify the modules as artifacts for
> >> that
> >>> goal. In this case I have to "install" module A and B in my local
> >>> repository, sonething I think is not necessary nor wanted.
> >>>
> >>> Anyone any ideas, on how I can achieve my goal, without reverting
to
> >> the
> >>> "copy" workaround?
> >>>
> >>> Many thanks,
> >>>
> >>> Patrick Vanbrabant
> >>> HintTech Internetworking Technologies
> >>>
> >>>
---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> >>> For additional commands, e-mail: users-help@maven.apache.org
> >>>
> >>>
> >>>
> >>
> >> --
> >> View this message in context:
> >>
> >
http://www.nabble.com/Problem-with-maven-dependency-plugin%3A-copy-depen
> >> dencies-tp14546984s177p14550176.html
> >> Sent from the Maven - Users mailing list archive at Nabble.com.
> >>
> >>
> >>
---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> >> For additional commands, e-mail: users-help@maven.apache.org
> >>
> >>
> >>
---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> >> For additional commands, e-mail: users-help@maven.apache.org
> >>
> >>
> >>
> >
> > --
> > View this message in context:
> >
http://www.nabble.com/Problem-with-maven-dependency-plugin%3A-copy-depen
> > dencies-tp14546984s177p14567676.html
> > Sent from the Maven - Users mailing list archive at Nabble.com.
> >
> >
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
> >
>
> --
> View this message in context:
>
http://www.nabble.com/Problem-with-maven-dependency-plugin%3A-copy-depen
dencies-tp14546984s177p14575091.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

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


Re: Problem with maven-dependency-plugin: copy-dependencies

Posted by amit kumar <am...@gmail.com>.
Can I modify Manifest entries along with the copy-dependencies goal in
configuration? Or something like that. I want the Manifest.mf to have
entries for the copied dependencies(in the specific folder).


Regards,
Amit Kumar

On Wed, Jan 2, 2008 at 2:18 PM, PatrickV <Pa...@hinttech.com>
wrote:

>
> The attachments are there. My first posting did indeed not include the
> attachements, I edited the posting and now the file (pp.zip) is there.
>
>
>
> Brian E Fox wrote:
> >
> > The attachments didn't come through. Try writing a jira at
> > http://jira.codehaus.org/browse/MDEP and attach the files there.
> >
> > -----Original Message-----
> > From: PatrickV [mailto:Patrick.Vanbrabant@hinttech.com]
> > Sent: Tuesday, January 01, 2008 11:08 AM
> > To: users@maven.apache.org
> > Subject: RE: Problem with maven-dependency-plugin: copy-dependencies
> >
> >
> > I hope I can make it clear by attaching the pom's to this message. The
> > poms
> > are stripped versions of the real stuff.
> >
> > Module A = pp-common.xml
> > Module B = pp-client.xml
> > Module C = pp-server.xml
> >
> > The copy dependencies plugin is stated in pp-server.xml.
> > pp-server depends on pp-common and pp-client.
> >
> > I expect to see after running the copy-dependency goal to target
> > directory:
> >
> > pp-common.jar in target directory
> > pp-client.jar in target directory
> > all dependencies from pp-server
> > all dependencies from pp-common not yet included in target directory
> > all dependencies from pp-client not yet included in target directory
> >
> > What I do see in target directory
> > all dependencies from pp-server
> > all dependencies from pp-common
> > all dependencies from pp-client
> > BUT NOT... pp-common.jar and pp-client.jar, allthough they too ARE
> > listed in
> > the dependencies of the pp-server project.
> >
> > Packaging of pp-server (war or jar) has no influence on result.
> >
> > The process is triggered by executing mvn -U clean package on parent.
> >
> > I hope the issue is clear now.
> >
> > KR
> >
> > PatrickV
> >
> >
> >
> >
> >
> > Brian E Fox wrote:
> >>
> >>
> >>
> >> -----Original Mes http://www.nabble.com/file/p14567676/pp.zip pp.zip
> >> sage-----
> >> From: PatrickV [mailto:Patrick.Vanbrabant@hinttech.com]
> >> Sent: Sunday, December 30, 2007 2:11 PM
> >> To: users@maven.apache.org
> >> Subject: RE: Problem with maven-dependency-plugin: copy-dependencies
> >>
> >>
> >>>I changed the packaging of module C into jar, and no difference.
> >>>I think the copy-dependency plugin does not take into account
> >> dependencies
> >>>on artifacts on the reactor (in this case Module A and Module B), but
> >> only
> >>>on "real" dependencies from the repositorie.
> >>
> >> Not sure what you mean here. If a dependency is listed in the pom, it
> > is
> >> included. There are no other ways for dependencies to be included.
> >> Sharing a reactor has other subtle effects but doesn't change the fact
> >> that a dependency needs to be listed. Perhaps I'm not getting what
> >> you're saying.
> >>
> >> "...I don't want to pull in the dependencies of Module C (the war),
> > but
> >> I want to copy all the dependencies
> >> of Module C (including Module A and Module B).."
> >>
> >> Huh? You do or don't want the dependencies of Module C?
> >>
> >> "to a specific directory, so that later on I can do some additional
> >> processing on it. All dependencies
> >> are there, even the transitive dependencies of module A and module B
> >> (which
> >> are both packaged as Jar), except for ModuleA.jar and ModuleB.jar."
> >>
> >> Simply binding copy-dependencies should get you all dependencies of
> >> whatever pom you've put it in. If it's module C, then you'll get all
> >> transitive dependencies of that Module. If you put it in the parent,
> >> chances are that parent doesn't declare dependencies like you want so
> >> you won't get what you want (module != dependency).
> >>
> >> Brian E Fox wrote:
> >>>
> >>> I think the problem is the war packaging. Maven doesn't normally pull
> >> in
> >>> war dependencies transitively because the dependencies are included
> >>> inside it.
> >>>
> >>> The dependency plugin xxx-dependencies goals are asking Maven to do
> >> the
> >>> resolution and then filters the results, so in this case the
> >> transitive
> >>> deps are not included.
> >>>
> >>> One thing you could try is copying the dependencies from Module C's
> >> pom
> >>> since the plugin would have knowledge of all the dependencies, or you
> >>> could unpack the war (because presumably the dependencies you need
> > are
> >>> in /lib). (using the latest snapshot, you can filter the contents as
> >>> they are unpacked).
> >>>
> >>> -----Original Message-----
> >>> From: Patrick Vanbrabant [mailto:patrick.vanbrabant@gmail.com]
> >>> Sent: Sunday, December 30, 2007 5:53 AM
> >>> To: users@maven.apache.org
> >>> Subject: Problem with maven-dependency-plugin: copy-dependencies
> >>>
> >>> Hi,
> >>>
> >>> I have a multi-module project set up as follows.
> >>>
> >>> Parent
> >>>     Module A
> >>>        depenencies: x, y,z
> >>>     Module B
> >>>                dependencies: A, y,d,
> >>>     Module C
> >>>                dependencies: A, B, t,u,y
> >>>
> >>> Each module with its own dependencies.
> >>>
> >>> Now I want to execute the goal copy-dependencies on module C, but
> >>> through
> >>> the parent pom. So I execute mvn -U package on the parent project.
> >>>
> >>> The plugin is configured as follows:
> >>> <plugin>
> >>>     <groupId>org.codehaus.mojo</groupId>
> >>>     <artifactId>dependency-maven-plugin</artifactId>
> >>>     <executions>
> >>>         <execution>
> >>>             <id>copy-dependencies</id>
> >>>             <phase>test</phase>
> >>>             <goals>
> >>>                 <goal>copy-dependencies</goal>
> >>>             </goals>
> >>>             <configuration>
> >>>                 <outputDirectory>${project.build.directory}/${
> >>> pom.build.finalName}/download</outputDirectory>
> >>>                 <stripVersion>true</stripVersion>
> >>>                 <overWriteReleases>false</overWriteReleases>
> >>>                 <overWriteSnapshots>false</overWriteSnapshots>
> >>>                     <overWriteIfNewer>true</overWriteIfNewer>
> >>>             </configuration>
> >>>         </execution>
> >>>     </executions>
> >>> </plugin>
> >>>
> >>>
> >>> According to the documentation, copy-dependencies should copy the
> >>> project
> >>> dependencies, and its transitive dependencies.
> >>>
> >>> After the execution of the package stage, I find in the download
> >> folder,
> >>> all
> >>> the dependen jar files, except those for module A and B. The
> >> transitive
> >>> dependencies of those modules however are present in the download
> >>> folder.
> >>>
> >>> On more thing to mention is that module C is packages as a war file.
> >>>
> >>> I have allready tried lots of things (including setting the phase to
> >>> package
> >>> (in which case nothing was copied)). The only thing that works is if
> > I
> >>> use
> >>> an additional goal "copy" and specify the modules as artifacts for
> >> that
> >>> goal. In this case I have to "install" module A and B in my local
> >>> repository, sonething I think is not necessary nor wanted.
> >>>
> >>> Anyone any ideas, on how I can achieve my goal, without reverting to
> >> the
> >>> "copy" workaround?
> >>>
> >>> Many thanks,
> >>>
> >>> Patrick Vanbrabant
> >>> HintTech Internetworking Technologies
> >>>
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> >>> For additional commands, e-mail: users-help@maven.apache.org
> >>>
> >>>
> >>>
> >>
> >> --
> >> View this message in context:
> >>
> > http://www.nabble.com/Problem-with-maven-dependency-plugin%3A-copy-depen
> >> dencies-tp14546984s177p14550176.html
> >> Sent from the Maven - Users mailing list archive at Nabble.com.
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> >> For additional commands, e-mail: users-help@maven.apache.org
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> >> For additional commands, e-mail: users-help@maven.apache.org
> >>
> >>
> >>
> >
> > --
> > View this message in context:
> > http://www.nabble.com/Problem-with-maven-dependency-plugin%3A-copy-depen
> > dencies-tp14546984s177p14567676.html
> > Sent from the Maven - Users mailing list archive at Nabble.com.
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Problem-with-maven-dependency-plugin%3A-copy-dependencies-tp14546984s177p14575091.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

RE: Problem with maven-dependency-plugin: copy-dependencies

Posted by PatrickV <Pa...@hinttech.com>.
The attachments are there. My first posting did indeed not include the
attachements, I edited the posting and now the file (pp.zip) is there.



Brian E Fox wrote:
> 
> The attachments didn't come through. Try writing a jira at
> http://jira.codehaus.org/browse/MDEP and attach the files there.
> 
> -----Original Message-----
> From: PatrickV [mailto:Patrick.Vanbrabant@hinttech.com] 
> Sent: Tuesday, January 01, 2008 11:08 AM
> To: users@maven.apache.org
> Subject: RE: Problem with maven-dependency-plugin: copy-dependencies
> 
> 
> I hope I can make it clear by attaching the pom's to this message. The
> poms
> are stripped versions of the real stuff.
> 
> Module A = pp-common.xml
> Module B = pp-client.xml
> Module C = pp-server.xml
> 
> The copy dependencies plugin is stated in pp-server.xml.
> pp-server depends on pp-common and pp-client.
> 
> I expect to see after running the copy-dependency goal to target
> directory:
> 
> pp-common.jar in target directory
> pp-client.jar in target directory
> all dependencies from pp-server
> all dependencies from pp-common not yet included in target directory
> all dependencies from pp-client not yet included in target directory
> 
> What I do see in target directory
> all dependencies from pp-server
> all dependencies from pp-common
> all dependencies from pp-client
> BUT NOT... pp-common.jar and pp-client.jar, allthough they too ARE
> listed in
> the dependencies of the pp-server project.
> 
> Packaging of pp-server (war or jar) has no influence on result.
> 
> The process is triggered by executing mvn -U clean package on parent.
> 
> I hope the issue is clear now.
> 
> KR
> 
> PatrickV
> 
> 
> 
> 
> 
> Brian E Fox wrote:
>> 
>> 
>> 
>> -----Original Mes http://www.nabble.com/file/p14567676/pp.zip pp.zip
>> sage-----
>> From: PatrickV [mailto:Patrick.Vanbrabant@hinttech.com] 
>> Sent: Sunday, December 30, 2007 2:11 PM
>> To: users@maven.apache.org
>> Subject: RE: Problem with maven-dependency-plugin: copy-dependencies
>> 
>> 
>>>I changed the packaging of module C into jar, and no difference.
>>>I think the copy-dependency plugin does not take into account
>> dependencies
>>>on artifacts on the reactor (in this case Module A and Module B), but
>> only
>>>on "real" dependencies from the repositorie.
>> 
>> Not sure what you mean here. If a dependency is listed in the pom, it
> is
>> included. There are no other ways for dependencies to be included.
>> Sharing a reactor has other subtle effects but doesn't change the fact
>> that a dependency needs to be listed. Perhaps I'm not getting what
>> you're saying.
>> 
>> "...I don't want to pull in the dependencies of Module C (the war),
> but
>> I want to copy all the dependencies
>> of Module C (including Module A and Module B).."
>> 
>> Huh? You do or don't want the dependencies of Module C?
>> 
>> "to a specific directory, so that later on I can do some additional
>> processing on it. All dependencies
>> are there, even the transitive dependencies of module A and module B
>> (which
>> are both packaged as Jar), except for ModuleA.jar and ModuleB.jar."
>> 
>> Simply binding copy-dependencies should get you all dependencies of
>> whatever pom you've put it in. If it's module C, then you'll get all
>> transitive dependencies of that Module. If you put it in the parent,
>> chances are that parent doesn't declare dependencies like you want so
>> you won't get what you want (module != dependency).
>> 
>> Brian E Fox wrote:
>>> 
>>> I think the problem is the war packaging. Maven doesn't normally pull
>> in
>>> war dependencies transitively because the dependencies are included
>>> inside it. 
>>>  
>>> The dependency plugin xxx-dependencies goals are asking Maven to do
>> the
>>> resolution and then filters the results, so in this case the
>> transitive
>>> deps are not included. 
>>> 
>>> One thing you could try is copying the dependencies from Module C's
>> pom
>>> since the plugin would have knowledge of all the dependencies, or you
>>> could unpack the war (because presumably the dependencies you need
> are
>>> in /lib). (using the latest snapshot, you can filter the contents as
>>> they are unpacked).
>>> 
>>> -----Original Message-----
>>> From: Patrick Vanbrabant [mailto:patrick.vanbrabant@gmail.com] 
>>> Sent: Sunday, December 30, 2007 5:53 AM
>>> To: users@maven.apache.org
>>> Subject: Problem with maven-dependency-plugin: copy-dependencies
>>> 
>>> Hi,
>>> 
>>> I have a multi-module project set up as follows.
>>> 
>>> Parent
>>>     Module A
>>>        depenencies: x, y,z
>>>     Module B
>>>                dependencies: A, y,d,
>>>     Module C
>>>                dependencies: A, B, t,u,y
>>> 
>>> Each module with its own dependencies.
>>> 
>>> Now I want to execute the goal copy-dependencies on module C, but
>>> through
>>> the parent pom. So I execute mvn -U package on the parent project.
>>> 
>>> The plugin is configured as follows:
>>> <plugin>
>>>     <groupId>org.codehaus.mojo</groupId>
>>>     <artifactId>dependency-maven-plugin</artifactId>
>>>     <executions>
>>>         <execution>
>>>             <id>copy-dependencies</id>
>>>             <phase>test</phase>
>>>             <goals>
>>>                 <goal>copy-dependencies</goal>
>>>             </goals>
>>>             <configuration>
>>>                 <outputDirectory>${project.build.directory}/${
>>> pom.build.finalName}/download</outputDirectory>
>>>                 <stripVersion>true</stripVersion>
>>>                 <overWriteReleases>false</overWriteReleases>
>>>                 <overWriteSnapshots>false</overWriteSnapshots>
>>>                     <overWriteIfNewer>true</overWriteIfNewer>
>>>             </configuration>
>>>         </execution>
>>>     </executions>
>>> </plugin>
>>> 
>>> 
>>> According to the documentation, copy-dependencies should copy the
>>> project
>>> dependencies, and its transitive dependencies.
>>> 
>>> After the execution of the package stage, I find in the download
>> folder,
>>> all
>>> the dependen jar files, except those for module A and B. The
>> transitive
>>> dependencies of those modules however are present in the download
>>> folder.
>>> 
>>> On more thing to mention is that module C is packages as a war file.
>>> 
>>> I have allready tried lots of things (including setting the phase to
>>> package
>>> (in which case nothing was copied)). The only thing that works is if
> I
>>> use
>>> an additional goal "copy" and specify the modules as artifacts for
>> that
>>> goal. In this case I have to "install" module A and B in my local
>>> repository, sonething I think is not necessary nor wanted.
>>> 
>>> Anyone any ideas, on how I can achieve my goal, without reverting to
>> the
>>> "copy" workaround?
>>> 
>>> Many thanks,
>>> 
>>> Patrick Vanbrabant
>>> HintTech Internetworking Technologies
>>> 
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: users-help@maven.apache.org
>>> 
>>> 
>>> 
>> 
>> -- 
>> View this message in context:
>>
> http://www.nabble.com/Problem-with-maven-dependency-plugin%3A-copy-depen
>> dencies-tp14546984s177p14550176.html
>> Sent from the Maven - Users mailing list archive at Nabble.com.
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>> 
>> 
>> 
> 
> -- 
> View this message in context:
> http://www.nabble.com/Problem-with-maven-dependency-plugin%3A-copy-depen
> dencies-tp14546984s177p14567676.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Problem-with-maven-dependency-plugin%3A-copy-dependencies-tp14546984s177p14575091.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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


RE: Problem with maven-dependency-plugin: copy-dependencies

Posted by "Brian E. Fox" <br...@reply.infinity.nu>.
The attachments didn't come through. Try writing a jira at
http://jira.codehaus.org/browse/MDEP and attach the files there.

-----Original Message-----
From: PatrickV [mailto:Patrick.Vanbrabant@hinttech.com] 
Sent: Tuesday, January 01, 2008 11:08 AM
To: users@maven.apache.org
Subject: RE: Problem with maven-dependency-plugin: copy-dependencies


I hope I can make it clear by attaching the pom's to this message. The
poms
are stripped versions of the real stuff.

Module A = pp-common.xml
Module B = pp-client.xml
Module C = pp-server.xml

The copy dependencies plugin is stated in pp-server.xml.
pp-server depends on pp-common and pp-client.

I expect to see after running the copy-dependency goal to target
directory:

pp-common.jar in target directory
pp-client.jar in target directory
all dependencies from pp-server
all dependencies from pp-common not yet included in target directory
all dependencies from pp-client not yet included in target directory

What I do see in target directory
all dependencies from pp-server
all dependencies from pp-common
all dependencies from pp-client
BUT NOT... pp-common.jar and pp-client.jar, allthough they too ARE
listed in
the dependencies of the pp-server project.

Packaging of pp-server (war or jar) has no influence on result.

The process is triggered by executing mvn -U clean package on parent.

I hope the issue is clear now.

KR

PatrickV





Brian E Fox wrote:
> 
> 
> 
> -----Original Mes http://www.nabble.com/file/p14567676/pp.zip pp.zip
> sage-----
> From: PatrickV [mailto:Patrick.Vanbrabant@hinttech.com] 
> Sent: Sunday, December 30, 2007 2:11 PM
> To: users@maven.apache.org
> Subject: RE: Problem with maven-dependency-plugin: copy-dependencies
> 
> 
>>I changed the packaging of module C into jar, and no difference.
>>I think the copy-dependency plugin does not take into account
> dependencies
>>on artifacts on the reactor (in this case Module A and Module B), but
> only
>>on "real" dependencies from the repositorie.
> 
> Not sure what you mean here. If a dependency is listed in the pom, it
is
> included. There are no other ways for dependencies to be included.
> Sharing a reactor has other subtle effects but doesn't change the fact
> that a dependency needs to be listed. Perhaps I'm not getting what
> you're saying.
> 
> "...I don't want to pull in the dependencies of Module C (the war),
but
> I want to copy all the dependencies
> of Module C (including Module A and Module B).."
> 
> Huh? You do or don't want the dependencies of Module C?
> 
> "to a specific directory, so that later on I can do some additional
> processing on it. All dependencies
> are there, even the transitive dependencies of module A and module B
> (which
> are both packaged as Jar), except for ModuleA.jar and ModuleB.jar."
> 
> Simply binding copy-dependencies should get you all dependencies of
> whatever pom you've put it in. If it's module C, then you'll get all
> transitive dependencies of that Module. If you put it in the parent,
> chances are that parent doesn't declare dependencies like you want so
> you won't get what you want (module != dependency).
> 
> Brian E Fox wrote:
>> 
>> I think the problem is the war packaging. Maven doesn't normally pull
> in
>> war dependencies transitively because the dependencies are included
>> inside it. 
>>  
>> The dependency plugin xxx-dependencies goals are asking Maven to do
> the
>> resolution and then filters the results, so in this case the
> transitive
>> deps are not included. 
>> 
>> One thing you could try is copying the dependencies from Module C's
> pom
>> since the plugin would have knowledge of all the dependencies, or you
>> could unpack the war (because presumably the dependencies you need
are
>> in /lib). (using the latest snapshot, you can filter the contents as
>> they are unpacked).
>> 
>> -----Original Message-----
>> From: Patrick Vanbrabant [mailto:patrick.vanbrabant@gmail.com] 
>> Sent: Sunday, December 30, 2007 5:53 AM
>> To: users@maven.apache.org
>> Subject: Problem with maven-dependency-plugin: copy-dependencies
>> 
>> Hi,
>> 
>> I have a multi-module project set up as follows.
>> 
>> Parent
>>     Module A
>>        depenencies: x, y,z
>>     Module B
>>                dependencies: A, y,d,
>>     Module C
>>                dependencies: A, B, t,u,y
>> 
>> Each module with its own dependencies.
>> 
>> Now I want to execute the goal copy-dependencies on module C, but
>> through
>> the parent pom. So I execute mvn -U package on the parent project.
>> 
>> The plugin is configured as follows:
>> <plugin>
>>     <groupId>org.codehaus.mojo</groupId>
>>     <artifactId>dependency-maven-plugin</artifactId>
>>     <executions>
>>         <execution>
>>             <id>copy-dependencies</id>
>>             <phase>test</phase>
>>             <goals>
>>                 <goal>copy-dependencies</goal>
>>             </goals>
>>             <configuration>
>>                 <outputDirectory>${project.build.directory}/${
>> pom.build.finalName}/download</outputDirectory>
>>                 <stripVersion>true</stripVersion>
>>                 <overWriteReleases>false</overWriteReleases>
>>                 <overWriteSnapshots>false</overWriteSnapshots>
>>                     <overWriteIfNewer>true</overWriteIfNewer>
>>             </configuration>
>>         </execution>
>>     </executions>
>> </plugin>
>> 
>> 
>> According to the documentation, copy-dependencies should copy the
>> project
>> dependencies, and its transitive dependencies.
>> 
>> After the execution of the package stage, I find in the download
> folder,
>> all
>> the dependen jar files, except those for module A and B. The
> transitive
>> dependencies of those modules however are present in the download
>> folder.
>> 
>> On more thing to mention is that module C is packages as a war file.
>> 
>> I have allready tried lots of things (including setting the phase to
>> package
>> (in which case nothing was copied)). The only thing that works is if
I
>> use
>> an additional goal "copy" and specify the modules as artifacts for
> that
>> goal. In this case I have to "install" module A and B in my local
>> repository, sonething I think is not necessary nor wanted.
>> 
>> Anyone any ideas, on how I can achieve my goal, without reverting to
> the
>> "copy" workaround?
>> 
>> Many thanks,
>> 
>> Patrick Vanbrabant
>> HintTech Internetworking Technologies
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>> 
>> 
>> 
> 
> -- 
> View this message in context:
>
http://www.nabble.com/Problem-with-maven-dependency-plugin%3A-copy-depen
> dencies-tp14546984s177p14550176.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> 

-- 
View this message in context:
http://www.nabble.com/Problem-with-maven-dependency-plugin%3A-copy-depen
dencies-tp14546984s177p14567676.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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


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


RE: Problem with maven-dependency-plugin: copy-dependencies

Posted by PatrickV <Pa...@hinttech.com>.
I hope I can make it clear by attaching the pom's to this message. The poms
are stripped versions of the real stuff.

Module A = pp-common.xml
Module B = pp-client.xml
Module C = pp-server.xml

The copy dependencies plugin is stated in pp-server.xml.
pp-server depends on pp-common and pp-client.

I expect to see after running the copy-dependency goal to target directory:

pp-common.jar in target directory
pp-client.jar in target directory
all dependencies from pp-server
all dependencies from pp-common not yet included in target directory
all dependencies from pp-client not yet included in target directory

What I do see in target directory
all dependencies from pp-server
all dependencies from pp-common
all dependencies from pp-client
BUT NOT... pp-common.jar and pp-client.jar, allthough they too ARE listed in
the dependencies of the pp-server project.

Packaging of pp-server (war or jar) has no influence on result.

The process is triggered by executing mvn -U clean package on parent.

I hope the issue is clear now.

KR

PatrickV





Brian E Fox wrote:
> 
> 
> 
> -----Original Mes http://www.nabble.com/file/p14567676/pp.zip pp.zip
> sage-----
> From: PatrickV [mailto:Patrick.Vanbrabant@hinttech.com] 
> Sent: Sunday, December 30, 2007 2:11 PM
> To: users@maven.apache.org
> Subject: RE: Problem with maven-dependency-plugin: copy-dependencies
> 
> 
>>I changed the packaging of module C into jar, and no difference.
>>I think the copy-dependency plugin does not take into account
> dependencies
>>on artifacts on the reactor (in this case Module A and Module B), but
> only
>>on "real" dependencies from the repositorie.
> 
> Not sure what you mean here. If a dependency is listed in the pom, it is
> included. There are no other ways for dependencies to be included.
> Sharing a reactor has other subtle effects but doesn't change the fact
> that a dependency needs to be listed. Perhaps I'm not getting what
> you're saying.
> 
> "...I don't want to pull in the dependencies of Module C (the war), but
> I want to copy all the dependencies
> of Module C (including Module A and Module B).."
> 
> Huh? You do or don't want the dependencies of Module C?
> 
> "to a specific directory, so that later on I can do some additional
> processing on it. All dependencies
> are there, even the transitive dependencies of module A and module B
> (which
> are both packaged as Jar), except for ModuleA.jar and ModuleB.jar."
> 
> Simply binding copy-dependencies should get you all dependencies of
> whatever pom you've put it in. If it's module C, then you'll get all
> transitive dependencies of that Module. If you put it in the parent,
> chances are that parent doesn't declare dependencies like you want so
> you won't get what you want (module != dependency).
> 
> Brian E Fox wrote:
>> 
>> I think the problem is the war packaging. Maven doesn't normally pull
> in
>> war dependencies transitively because the dependencies are included
>> inside it. 
>>  
>> The dependency plugin xxx-dependencies goals are asking Maven to do
> the
>> resolution and then filters the results, so in this case the
> transitive
>> deps are not included. 
>> 
>> One thing you could try is copying the dependencies from Module C's
> pom
>> since the plugin would have knowledge of all the dependencies, or you
>> could unpack the war (because presumably the dependencies you need are
>> in /lib). (using the latest snapshot, you can filter the contents as
>> they are unpacked).
>> 
>> -----Original Message-----
>> From: Patrick Vanbrabant [mailto:patrick.vanbrabant@gmail.com] 
>> Sent: Sunday, December 30, 2007 5:53 AM
>> To: users@maven.apache.org
>> Subject: Problem with maven-dependency-plugin: copy-dependencies
>> 
>> Hi,
>> 
>> I have a multi-module project set up as follows.
>> 
>> Parent
>>     Module A
>>        depenencies: x, y,z
>>     Module B
>>                dependencies: A, y,d,
>>     Module C
>>                dependencies: A, B, t,u,y
>> 
>> Each module with its own dependencies.
>> 
>> Now I want to execute the goal copy-dependencies on module C, but
>> through
>> the parent pom. So I execute mvn -U package on the parent project.
>> 
>> The plugin is configured as follows:
>> <plugin>
>>     <groupId>org.codehaus.mojo</groupId>
>>     <artifactId>dependency-maven-plugin</artifactId>
>>     <executions>
>>         <execution>
>>             <id>copy-dependencies</id>
>>             <phase>test</phase>
>>             <goals>
>>                 <goal>copy-dependencies</goal>
>>             </goals>
>>             <configuration>
>>                 <outputDirectory>${project.build.directory}/${
>> pom.build.finalName}/download</outputDirectory>
>>                 <stripVersion>true</stripVersion>
>>                 <overWriteReleases>false</overWriteReleases>
>>                 <overWriteSnapshots>false</overWriteSnapshots>
>>                     <overWriteIfNewer>true</overWriteIfNewer>
>>             </configuration>
>>         </execution>
>>     </executions>
>> </plugin>
>> 
>> 
>> According to the documentation, copy-dependencies should copy the
>> project
>> dependencies, and its transitive dependencies.
>> 
>> After the execution of the package stage, I find in the download
> folder,
>> all
>> the dependen jar files, except those for module A and B. The
> transitive
>> dependencies of those modules however are present in the download
>> folder.
>> 
>> On more thing to mention is that module C is packages as a war file.
>> 
>> I have allready tried lots of things (including setting the phase to
>> package
>> (in which case nothing was copied)). The only thing that works is if I
>> use
>> an additional goal "copy" and specify the modules as artifacts for
> that
>> goal. In this case I have to "install" module A and B in my local
>> repository, sonething I think is not necessary nor wanted.
>> 
>> Anyone any ideas, on how I can achieve my goal, without reverting to
> the
>> "copy" workaround?
>> 
>> Many thanks,
>> 
>> Patrick Vanbrabant
>> HintTech Internetworking Technologies
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>> 
>> 
>> 
> 
> -- 
> View this message in context:
> http://www.nabble.com/Problem-with-maven-dependency-plugin%3A-copy-depen
> dencies-tp14546984s177p14550176.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Problem-with-maven-dependency-plugin%3A-copy-dependencies-tp14546984s177p14567676.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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


RE: Problem with maven-dependency-plugin: copy-dependencies

Posted by "Brian E. Fox" <br...@reply.infinity.nu>.

-----Original Message-----
From: PatrickV [mailto:Patrick.Vanbrabant@hinttech.com] 
Sent: Sunday, December 30, 2007 2:11 PM
To: users@maven.apache.org
Subject: RE: Problem with maven-dependency-plugin: copy-dependencies


>I changed the packaging of module C into jar, and no difference.
>I think the copy-dependency plugin does not take into account
dependencies
>on artifacts on the reactor (in this case Module A and Module B), but
only
>on "real" dependencies from the repositorie.

Not sure what you mean here. If a dependency is listed in the pom, it is
included. There are no other ways for dependencies to be included.
Sharing a reactor has other subtle effects but doesn't change the fact
that a dependency needs to be listed. Perhaps I'm not getting what
you're saying.

"...I don't want to pull in the dependencies of Module C (the war), but
I want to copy all the dependencies
of Module C (including Module A and Module B).."

Huh? You do or don't want the dependencies of Module C?

"to a specific directory, so that later on I can do some additional
processing on it. All dependencies
are there, even the transitive dependencies of module A and module B
(which
are both packaged as Jar), except for ModuleA.jar and ModuleB.jar."

Simply binding copy-dependencies should get you all dependencies of
whatever pom you've put it in. If it's module C, then you'll get all
transitive dependencies of that Module. If you put it in the parent,
chances are that parent doesn't declare dependencies like you want so
you won't get what you want (module != dependency).

Brian E Fox wrote:
> 
> I think the problem is the war packaging. Maven doesn't normally pull
in
> war dependencies transitively because the dependencies are included
> inside it. 
>  
> The dependency plugin xxx-dependencies goals are asking Maven to do
the
> resolution and then filters the results, so in this case the
transitive
> deps are not included. 
> 
> One thing you could try is copying the dependencies from Module C's
pom
> since the plugin would have knowledge of all the dependencies, or you
> could unpack the war (because presumably the dependencies you need are
> in /lib). (using the latest snapshot, you can filter the contents as
> they are unpacked).
> 
> -----Original Message-----
> From: Patrick Vanbrabant [mailto:patrick.vanbrabant@gmail.com] 
> Sent: Sunday, December 30, 2007 5:53 AM
> To: users@maven.apache.org
> Subject: Problem with maven-dependency-plugin: copy-dependencies
> 
> Hi,
> 
> I have a multi-module project set up as follows.
> 
> Parent
>     Module A
>        depenencies: x, y,z
>     Module B
>                dependencies: A, y,d,
>     Module C
>                dependencies: A, B, t,u,y
> 
> Each module with its own dependencies.
> 
> Now I want to execute the goal copy-dependencies on module C, but
> through
> the parent pom. So I execute mvn -U package on the parent project.
> 
> The plugin is configured as follows:
> <plugin>
>     <groupId>org.codehaus.mojo</groupId>
>     <artifactId>dependency-maven-plugin</artifactId>
>     <executions>
>         <execution>
>             <id>copy-dependencies</id>
>             <phase>test</phase>
>             <goals>
>                 <goal>copy-dependencies</goal>
>             </goals>
>             <configuration>
>                 <outputDirectory>${project.build.directory}/${
> pom.build.finalName}/download</outputDirectory>
>                 <stripVersion>true</stripVersion>
>                 <overWriteReleases>false</overWriteReleases>
>                 <overWriteSnapshots>false</overWriteSnapshots>
>                     <overWriteIfNewer>true</overWriteIfNewer>
>             </configuration>
>         </execution>
>     </executions>
> </plugin>
> 
> 
> According to the documentation, copy-dependencies should copy the
> project
> dependencies, and its transitive dependencies.
> 
> After the execution of the package stage, I find in the download
folder,
> all
> the dependen jar files, except those for module A and B. The
transitive
> dependencies of those modules however are present in the download
> folder.
> 
> On more thing to mention is that module C is packages as a war file.
> 
> I have allready tried lots of things (including setting the phase to
> package
> (in which case nothing was copied)). The only thing that works is if I
> use
> an additional goal "copy" and specify the modules as artifacts for
that
> goal. In this case I have to "install" module A and B in my local
> repository, sonething I think is not necessary nor wanted.
> 
> Anyone any ideas, on how I can achieve my goal, without reverting to
the
> "copy" workaround?
> 
> Many thanks,
> 
> Patrick Vanbrabant
> HintTech Internetworking Technologies
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> 

-- 
View this message in context:
http://www.nabble.com/Problem-with-maven-dependency-plugin%3A-copy-depen
dencies-tp14546984s177p14550176.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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


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


RE: Problem with maven-dependency-plugin: copy-dependencies

Posted by PatrickV <Pa...@hinttech.com>.
I changed the packaging of module C into jar, and no difference.
I think the copy-dependency plugin does not take into account dependencies
on artifacts on the reactor (in this case Module A and Module B), but only
on "real" dependencies from the repositorie.

Maybe there is a misunderstanding here, I don't want to pull in the
dependencies of Module C (the war), but I want to copy all the dependencies
of Module C (including Module A and Module B) to a specific directory, so
that later on I can do some additional processing on it. All dependencies
are there, even the transitive dependencies of module A and module B (which
are both packaged as Jar), except for ModuleA.jar and ModuleB.jar.

KR

Patrick Vanbrabant



Brian E Fox wrote:
> 
> I think the problem is the war packaging. Maven doesn't normally pull in
> war dependencies transitively because the dependencies are included
> inside it. 
>  
> The dependency plugin xxx-dependencies goals are asking Maven to do the
> resolution and then filters the results, so in this case the transitive
> deps are not included. 
> 
> One thing you could try is copying the dependencies from Module C's pom
> since the plugin would have knowledge of all the dependencies, or you
> could unpack the war (because presumably the dependencies you need are
> in /lib). (using the latest snapshot, you can filter the contents as
> they are unpacked).
> 
> -----Original Message-----
> From: Patrick Vanbrabant [mailto:patrick.vanbrabant@gmail.com] 
> Sent: Sunday, December 30, 2007 5:53 AM
> To: users@maven.apache.org
> Subject: Problem with maven-dependency-plugin: copy-dependencies
> 
> Hi,
> 
> I have a multi-module project set up as follows.
> 
> Parent
>     Module A
>        depenencies: x, y,z
>     Module B
>                dependencies: A, y,d,
>     Module C
>                dependencies: A, B, t,u,y
> 
> Each module with its own dependencies.
> 
> Now I want to execute the goal copy-dependencies on module C, but
> through
> the parent pom. So I execute mvn -U package on the parent project.
> 
> The plugin is configured as follows:
> <plugin>
>     <groupId>org.codehaus.mojo</groupId>
>     <artifactId>dependency-maven-plugin</artifactId>
>     <executions>
>         <execution>
>             <id>copy-dependencies</id>
>             <phase>test</phase>
>             <goals>
>                 <goal>copy-dependencies</goal>
>             </goals>
>             <configuration>
>                 <outputDirectory>${project.build.directory}/${
> pom.build.finalName}/download</outputDirectory>
>                 <stripVersion>true</stripVersion>
>                 <overWriteReleases>false</overWriteReleases>
>                 <overWriteSnapshots>false</overWriteSnapshots>
>                     <overWriteIfNewer>true</overWriteIfNewer>
>             </configuration>
>         </execution>
>     </executions>
> </plugin>
> 
> 
> According to the documentation, copy-dependencies should copy the
> project
> dependencies, and its transitive dependencies.
> 
> After the execution of the package stage, I find in the download folder,
> all
> the dependen jar files, except those for module A and B. The transitive
> dependencies of those modules however are present in the download
> folder.
> 
> On more thing to mention is that module C is packages as a war file.
> 
> I have allready tried lots of things (including setting the phase to
> package
> (in which case nothing was copied)). The only thing that works is if I
> use
> an additional goal "copy" and specify the modules as artifacts for that
> goal. In this case I have to "install" module A and B in my local
> repository, sonething I think is not necessary nor wanted.
> 
> Anyone any ideas, on how I can achieve my goal, without reverting to the
> "copy" workaround?
> 
> Many thanks,
> 
> Patrick Vanbrabant
> HintTech Internetworking Technologies
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Problem-with-maven-dependency-plugin%3A-copy-dependencies-tp14546984s177p14550176.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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


RE: Problem with maven-dependency-plugin: copy-dependencies

Posted by "Brian E. Fox" <br...@reply.infinity.nu>.
I think the problem is the war packaging. Maven doesn't normally pull in
war dependencies transitively because the dependencies are included
inside it. 

The dependency plugin xxx-dependencies goals are asking Maven to do the
resolution and then filters the results, so in this case the transitive
deps are not included. 

One thing you could try is copying the dependencies from Module C's pom
since the plugin would have knowledge of all the dependencies, or you
could unpack the war (because presumably the dependencies you need are
in /lib). (using the latest snapshot, you can filter the contents as
they are unpacked).

-----Original Message-----
From: Patrick Vanbrabant [mailto:patrick.vanbrabant@gmail.com] 
Sent: Sunday, December 30, 2007 5:53 AM
To: users@maven.apache.org
Subject: Problem with maven-dependency-plugin: copy-dependencies

Hi,

I have a multi-module project set up as follows.

Parent
    Module A
       depenencies: x, y,z
    Module B
               dependencies: A, y,d,
    Module C
               dependencies: A, B, t,u,y

Each module with its own dependencies.

Now I want to execute the goal copy-dependencies on module C, but
through
the parent pom. So I execute mvn -U package on the parent project.

The plugin is configured as follows:
<plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>dependency-maven-plugin</artifactId>
    <executions>
        <execution>
            <id>copy-dependencies</id>
            <phase>test</phase>
            <goals>
                <goal>copy-dependencies</goal>
            </goals>
            <configuration>
                <outputDirectory>${project.build.directory}/${
pom.build.finalName}/download</outputDirectory>
                <stripVersion>true</stripVersion>
                <overWriteReleases>false</overWriteReleases>
                <overWriteSnapshots>false</overWriteSnapshots>
                    <overWriteIfNewer>true</overWriteIfNewer>
            </configuration>
        </execution>
    </executions>
</plugin>


According to the documentation, copy-dependencies should copy the
project
dependencies, and its transitive dependencies.

After the execution of the package stage, I find in the download folder,
all
the dependen jar files, except those for module A and B. The transitive
dependencies of those modules however are present in the download
folder.

On more thing to mention is that module C is packages as a war file.

I have allready tried lots of things (including setting the phase to
package
(in which case nothing was copied)). The only thing that works is if I
use
an additional goal "copy" and specify the modules as artifacts for that
goal. In this case I have to "install" module A and B in my local
repository, sonething I think is not necessary nor wanted.

Anyone any ideas, on how I can achieve my goal, without reverting to the
"copy" workaround?

Many thanks,

Patrick Vanbrabant
HintTech Internetworking Technologies

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