[
https://jira.codehaus.org/browse/MDEP-451?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=352321#comment-352321
]
Karl-Heinz Marbaise edited comment on MDEP-451 at 9/4/14 5:10 PM:
------------------------------------------------------------------
The fix for the problem is easy:
{code}
Index:
src/main/java/org/apache/maven/plugin/dependency/fromConfiguration/CopyMojo.java
===================================================================
---
src/main/java/org/apache/maven/plugin/dependency/fromConfiguration/CopyMojo.java
(revision 1622302)
+++
src/main/java/org/apache/maven/plugin/dependency/fromConfiguration/CopyMojo.java
(working copy)
@@ -37,7 +37,7 @@
* @version $Id$
* @since 1.0
*/
-@Mojo( name = "copy", defaultPhase = LifecyclePhase.PROCESS_SOURCES,
requiresProject = false, threadSafe = true )
+@Mojo( name = "copy", defaultPhase = LifecyclePhase.PROCESS_SOURCES,
requiresProject = true, threadSafe = true )
public class CopyMojo
extends AbstractFromConfigurationMojo
{code}
The problem is that dependency:copy goal is intended to work outside the life
cycle and outside off the project context. So i don't see a chance to change
the current behaviour. But what i could imagine is to create a separate goal
like copy-with-project.
Furthermore i have checked to run dependency:copy on the root of the project
and i don't have any difference between Maven 2.2.1, 3.0.3, 3.0.5, 3.1.1,
3.2.1, 3.2.2 and 3.2.3...in all versions the same behaviour. Have you allways
specified the same version of maven-dependency-plugin ?
was (Author: khmarbaise):
The fix for the problem is easy:
{code}
Index:
src/main/java/org/apache/maven/plugin/dependency/fromConfiguration/CopyMojo.java
===================================================================
---
src/main/java/org/apache/maven/plugin/dependency/fromConfiguration/CopyMojo.java
(revision 1622302)
+++
src/main/java/org/apache/maven/plugin/dependency/fromConfiguration/CopyMojo.java
(working copy)
@@ -37,7 +37,7 @@
* @version $Id$
* @since 1.0
*/
-@Mojo( name = "copy", defaultPhase = LifecyclePhase.PROCESS_SOURCES,
requiresProject = false, threadSafe = true )
+@Mojo( name = "copy", defaultPhase = LifecyclePhase.PROCESS_SOURCES,
requiresProject = true, threadSafe = true )
public class CopyMojo
extends AbstractFromConfigurationMojo
{code}
The problem is that dependency:copy goal is intended to work outside the life
cycle and outside off the project context. So i don't see a chance to change
the current behaviour. But what i could imagine is to create a separate goal
like copy-with-project.
> Regression: mvn dependency:copy doesn't run under maven 3.x multi-module
> project
> --------------------------------------------------------------------------------
>
> Key: MDEP-451
> URL: https://jira.codehaus.org/browse/MDEP-451
> Project: Maven Dependency Plugin
> Issue Type: Bug
> Components: copy
> Affects Versions: 2.8
> Environment: All
> Reporter: Lenny Primak
> Priority: Critical
> Attachments: deptest.tar
>
>
> I have a muldi-module project,
> running mvn dependency:copy on root project just runs
> on root project without recursing into the modules.
> This works under maven 3.0.3 but doesn't run at all in the
> current 3.2.2 version of maven
--
This message was sent by Atlassian JIRA
(v6.1.6#6162)