From 9fd4ed53b23e35de8ad8179e5b379acf3721ffbe Mon Sep 17 00:00:00 2001 From: Michael Osipov Date: Fri, 7 Jun 2024 23:02:49 +0200 Subject: [PATCH] Revert "Fix sources goal for multimodule projects" This reverts commit 0bb4c5917222c4f4a6df53bbc70dd770507a3d4d. --- src/it/projects/sources/module-a/pom.xml | 48 ------------------- src/it/projects/sources/module-b/pom.xml | 48 ------------------- src/it/projects/sources/pom.xml | 18 +++---- .../ResolveDependencySourcesMojo.java | 2 +- 4 files changed, 11 insertions(+), 105 deletions(-) delete mode 100644 src/it/projects/sources/module-a/pom.xml delete mode 100644 src/it/projects/sources/module-b/pom.xml diff --git a/src/it/projects/sources/module-a/pom.xml b/src/it/projects/sources/module-a/pom.xml deleted file mode 100644 index 7c6fe3c1d..000000000 --- a/src/it/projects/sources/module-a/pom.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - - - 4.0.0 - - - org.apache.maven.its.dependency - tree-multimodule - 1.0-SNAPSHOT - - - MultimoduleTest Module A - - tree-multimodule-module-a - - - UTF-8 - - - - - org.apache.maven - maven-project - 2.0.6 - - - - diff --git a/src/it/projects/sources/module-b/pom.xml b/src/it/projects/sources/module-b/pom.xml deleted file mode 100644 index bffea42af..000000000 --- a/src/it/projects/sources/module-b/pom.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - - - 4.0.0 - - - org.apache.maven.its.dependency - tree-multimodule - 1.0-SNAPSHOT - - - MultimoduleTest Module B - - tree-multimodule-module-b - - - UTF-8 - - - - - org.apache.maven.its.dependency - tree-multimodule-module-a - ${project.version} - - - - diff --git a/src/it/projects/sources/pom.xml b/src/it/projects/sources/pom.xml index 062e10d43..f04fc4d88 100644 --- a/src/it/projects/sources/pom.xml +++ b/src/it/projects/sources/pom.xml @@ -24,22 +24,24 @@ 4.0.0 org.apache.maven.its.dependency - tree-multimodule + test 1.0-SNAPSHOT - pom - MultimoduleTest + Test - Test dependency:tree on multimodule project + Test dependency:sources UTF-8 - - module-a - module-b - + + + org.apache.maven + maven-project + 2.0.8 + + diff --git a/src/main/java/org/apache/maven/plugins/dependency/resolvers/ResolveDependencySourcesMojo.java b/src/main/java/org/apache/maven/plugins/dependency/resolvers/ResolveDependencySourcesMojo.java index f4871de0b..21e8cce3b 100644 --- a/src/main/java/org/apache/maven/plugins/dependency/resolvers/ResolveDependencySourcesMojo.java +++ b/src/main/java/org/apache/maven/plugins/dependency/resolvers/ResolveDependencySourcesMojo.java @@ -32,7 +32,7 @@ @Mojo( name = "sources", defaultPhase = LifecyclePhase.GENERATE_SOURCES, - requiresDependencyCollection = ResolutionScope.TEST, + requiresDependencyResolution = ResolutionScope.TEST, threadSafe = true) public class ResolveDependencySourcesMojo extends ResolveDependenciesMojo {