Thanks but I did not put the configuration inside the /executions/ tag.
Look at my code extract.
There's a specific outputDirectory value overwritten in the execution
tags but all needed informations are set in a configuration tag outside
the execution.
The issue is that this is working fine in these cases :
- mvn package
- mvn dependency:copy -N
This is not working in this case :
- mvn dependency:copy
If I remove the module, everything work fine again.
So, as said in the mail title, it's an issue related to the presence of
a module in the pom.
Moreover, it seems to fail in the submodule. Is it a maven inheritance
issue ?
Is there a workaround to neutralize the execution of this plugin in the
submodule in order no having to add -N when running "mvn dependency:copy" ?
Thanks,
Julien
Brian E. Fox a écrit :
You need to see this:
http://maven.apache.org/plugins/maven-dependency-plugin/faq.html#cli
-----Original Message-----
From: Julien CARSIQUE [mailto:[EMAIL PROTECTED]
Sent: Monday, July 28, 2008 8:01 AM
To: Maven Users List
Subject: maven-dependency-plugin fails if pom.xml contains a submodule
Hi,
Using maven-dependency-plugin, I go a build error since I've add a
module in the pom.
Principle is to be able to manage two different calls : from execution,
libraries go in target/lib/ and from a command-line call (or Ant),
libraries go into ${jboss.lib}.
All worked fine until I added a module. Now, calls from command line
unless we specify the "-N" option.
The plugin configuration is not inside a pluginManagement tag, so it
shouldn't be inherited, does it ?
I got this error from the submodule, not from the module containing the
dependency plugin configuration:
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] One or more required plugin parameters are invalid/missing
for 'dependency:copy'
[0] Inside the definition for plugin 'maven-dependency-plugin'
specify the following:
<configuration>
...
<artifactItems>VALUE</artifactItems>
</configuration>.
- using "-N" on the command line solve the problem
- help:effective-pom result (ran on the failing child) doesn't contain
any reference to dependency-plugin except this one in the
pluginManagement:
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.0</version>
</plugin>
- call from execution, during an "mvn package" for example succeed.
Here's my configuration :
<modules>
<module>aModule</module>
</modules>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<configuration>
<outputDirectory>${jboss.lib}</outputDirectory>
<artifactItems>
<artifactItem>
<groupId>aGroupId</groupId>
<artifactId>anArtifactId</artifactId>
<version>aVersion</version>
<overWrite>true</overWrite>
</artifactItem>
</artifactItems>
</configuration>
<executions>
<execution>
<id>copy-installed</id>
<phase>package</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/lib</outputDirectory>
</configuration>
</execution>
</executions>
<plugin>
</plugins>
</build>
Thanks,
Julien
--
Julien CARSIQUE, Nuxeo (Paris, France)
www.nuxeo.com - The Open Source ECM Platform - www.nuxeo.org
Nuxeo ECM Stack - The Java EE, scalable, standard-based ECM Platform
[EMAIL PROTECTED] | Tel: +33 1 40 33 79 87
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]