Daniel commented on MDEP-82:

I'm running mvn 3.5.2, and I tried the workaround above.  There's two issues, 
one of which has its own workaround, but the other I haven't been able to work 

First off, when explicitly depending on the standard lifecycle plugins, 
go-offline doesn't seem to be fetch transitive dependencies.  The workaround is 
to list them all explicitly. For example, in addition to listing 
org.apache.maven.plugins:maven-compiler-plugin:3.6.1, also list what's below 
(in xml, just colon separated for brevity):
 # org.codehaus.plexus:plexus-utils:jar:2.0.4
 # org.apache.maven:maven-repository-metadata:jar:3.0
 # org.codehaus.plexus:plexus-component-annotations:jar:1.6

The second problem, and one that I don't have a fix for is that 
org.apache.maven.plugins:maven-compiler-plugin:3.6.1 requires 
org.apache.maven:maven-repository-metadata:jar:3.0, but 
org.apache.maven.plugins:maven-resources-plugin:2.6 requires 
org.apache.maven:maven-repository-metadata:jar:2.0.6. Listing both versions of 
maven-repository-metadata gets me the 2.0.6 jar & pom, and the 3.0 pom, but no 
jar. If I list them together using a range I get the same behavior.

Am I missing something here? Is there a workaround? A fix? Thank you in advance.

> go-offline / resolve-plugins does not resolve all plugin dependencies
> ---------------------------------------------------------------------
>                 Key: MDEP-82
>                 URL: https://issues.apache.org/jira/browse/MDEP-82
>             Project: Maven Dependency Plugin
>          Issue Type: Bug
>          Components: go-offline, resolve-plugins
>    Affects Versions: 2.0-alpha-4
>         Environment: Maven 2.0.6
>            Reporter: Arne Degenring
>            Priority: Major
>         Attachments: maven-dependency-plugin-2.3.patch, pom.xml
> The attached pom.xml is a very simple JAR project, without any direct 
> dependencies or plugin dependencies.
> Start with an empty local repository, and run mvn dependency:go-offline on 
> it. Some files get downloaded, but not everything that is needed for the 
> build. If you run "mvn -o package" afterwards, you end up with the following 
> error:
> {noformat}[ERROR] BUILD ERROR
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] The plugin 'org.apache.maven.plugins:maven-resources-plugin' does not 
> exist or no valid version could be found{noformat}
> Afterwards, even "mvn package" without the "-o" parameter does not work any 
> longer.

This message was sent by Atlassian JIRA

Reply via email to