This is an automated email from the ASF dual-hosted git repository. michaelo pushed a commit to branch revert-MDEP-895 in repository https://gitbox.apache.org/repos/asf/maven-dependency-plugin.git
commit 9fd4ed53b23e35de8ad8179e5b379acf3721ffbe Author: Michael Osipov <micha...@apache.org> AuthorDate: Fri Jun 7 23:02:49 2024 +0200 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 ++++---- .../resolvers/ResolveDependencySourcesMojo.java | 2 +- 4 files changed, 11 insertions(+), 105 deletions(-) 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 7c6fe3c1..00000000 --- a/src/it/projects/sources/module-a/pom.xml +++ /dev/null @@ -1,48 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - ~ Licensed to the Apache Software Foundation (ASF) under one - ~ or more contributor license agreements. See the NOTICE file - ~ distributed with this work for additional information - ~ regarding copyright ownership. The ASF licenses this file - ~ to you under the Apache License, Version 2.0 (the - ~ "License"); you may not use this file except in compliance - ~ with the License. You may obtain a copy of the License at - ~ - ~ http://www.apache.org/licenses/LICENSE-2.0 - ~ - ~ Unless required by applicable law or agreed to in writing, - ~ software distributed under the License is distributed on an - ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - ~ KIND, either express or implied. See the License for the - ~ specific language governing permissions and limitations - ~ under the License. - --> - -<project xmlns="http://maven.apache.org/POM/4.0.0" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - - <parent> - <groupId>org.apache.maven.its.dependency</groupId> - <artifactId>tree-multimodule</artifactId> - <version>1.0-SNAPSHOT</version> - </parent> - - <name>MultimoduleTest Module A</name> - - <artifactId>tree-multimodule-module-a</artifactId> - - <properties> - <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> - </properties> - - <dependencies> - <dependency> - <groupId>org.apache.maven</groupId> - <artifactId>maven-project</artifactId> - <version>2.0.6</version> - </dependency> - </dependencies> - -</project> 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 bffea42a..00000000 --- a/src/it/projects/sources/module-b/pom.xml +++ /dev/null @@ -1,48 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - ~ Licensed to the Apache Software Foundation (ASF) under one - ~ or more contributor license agreements. See the NOTICE file - ~ distributed with this work for additional information - ~ regarding copyright ownership. The ASF licenses this file - ~ to you under the Apache License, Version 2.0 (the - ~ "License"); you may not use this file except in compliance - ~ with the License. You may obtain a copy of the License at - ~ - ~ http://www.apache.org/licenses/LICENSE-2.0 - ~ - ~ Unless required by applicable law or agreed to in writing, - ~ software distributed under the License is distributed on an - ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - ~ KIND, either express or implied. See the License for the - ~ specific language governing permissions and limitations - ~ under the License. - --> - -<project xmlns="http://maven.apache.org/POM/4.0.0" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - - <parent> - <groupId>org.apache.maven.its.dependency</groupId> - <artifactId>tree-multimodule</artifactId> - <version>1.0-SNAPSHOT</version> - </parent> - - <name>MultimoduleTest Module B</name> - - <artifactId>tree-multimodule-module-b</artifactId> - - <properties> - <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> - </properties> - - <dependencies> - <dependency> - <groupId>org.apache.maven.its.dependency</groupId> - <artifactId>tree-multimodule-module-a</artifactId> - <version>${project.version}</version> - </dependency> - </dependencies> - -</project> diff --git a/src/it/projects/sources/pom.xml b/src/it/projects/sources/pom.xml index 062e10d4..f04fc4d8 100644 --- a/src/it/projects/sources/pom.xml +++ b/src/it/projects/sources/pom.xml @@ -24,22 +24,24 @@ <modelVersion>4.0.0</modelVersion> <groupId>org.apache.maven.its.dependency</groupId> - <artifactId>tree-multimodule</artifactId> + <artifactId>test</artifactId> <version>1.0-SNAPSHOT</version> - <packaging>pom</packaging> - <name>MultimoduleTest</name> + <name>Test</name> <description> - Test dependency:tree on multimodule project + Test dependency:sources </description> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> </properties> - <modules> - <module>module-a</module> - <module>module-b</module> - </modules> + <dependencies> + <dependency> + <groupId>org.apache.maven</groupId> + <artifactId>maven-project</artifactId> + <version>2.0.8</version> + </dependency> + </dependencies> </project> 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 f4871de0..21e8cce3 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 @@ import org.apache.maven.plugins.annotations.ResolutionScope; @Mojo( name = "sources", defaultPhase = LifecyclePhase.GENERATE_SOURCES, - requiresDependencyCollection = ResolutionScope.TEST, + requiresDependencyResolution = ResolutionScope.TEST, threadSafe = true) public class ResolveDependencySourcesMojo extends ResolveDependenciesMojo {