Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Duplicate
-
3.3.0
-
None
-
None
-
Linux, NixOS unstable
Description
It seems that `go-offline` goal does not download dependencies which are declared as plugin dependency:
e.g
<plugin> <groupId>org.codehaus.gmaven</groupId> <artifactId>groovy-maven-plugin</artifactId> <version>${groovy-maven-plugin.version}</version> <dependencies> <dependency> <groupId>org.codehaus.groovy</groupId> <artifactId>groovy-all</artifactId> <version>3.0.9</version> <type>pom</type> <exclusions> <exclusion> <!-- groovy-testng depends on testng 7.2.0 wich is not on maven central --> <groupId>org.codehaus.groovy</groupId> <artifactId>groovy-testng</artifactId> </exclusion> </exclusions> </dependency> </dependencies> </plugin>
After org.apache.maven.plugins:maven-dependency-plugin:3.3.0:go-offline I still get:
[ERROR] Failed to execute goal org.codehaus.gmaven:groovy-maven-plugin:2.1.1:execute (set-platform-properties) on project mvnd: Execution set-platform-properties of goal org.codehaus.gmaven:groovy-maven-plugin:2.1.1:execute failed: Plugin org.codehaus.gmaven:groovy-maven-plugin:2.1.1 or one of its dependencies could not be resolved: The following artifacts could not be resolved: org.codehaus.groovy:groovy-all:pom:3.0.9, org.codehaus.plexus:plexus-utils:jar:1.1: Cannot access central ([https://repo.maven.apache.org/maven2]) in offline mode and the artifact org.codehaus.groovy:groovy-all:pom:3.0.9 has not been downloaded from it before. -> [Help 1]
How to reproduce
git clone https://github.com/apache/maven-mvnd.git
git checkout 0.8.0
mvn org.apache.maven.plugins:maven-dependency-plugin:3.3.0:go-offline -Pnative -Dmaven.repo.local=/tmp/m2
mvn -o verify -Pnative -Dmaven.repo.local=/tmp/m2
Attachments
Issue Links
- duplicates
-
MDEP-507 dependency:resolve-plugins and dependency:go-offline doesn't respect plugin dependencies from pom.xml
- Open