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

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


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to