[ 
https://issues.apache.org/jira/browse/MDEP-82?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16471815#comment-16471815
 ] 

Hervé Boutemy edited comment on MDEP-82 at 5/11/18 12:18 PM:
-------------------------------------------------------------

TL;DR = *Works with Maven 3.1.0+ and maven-dependency-plugin 3.0.0+, fails with 
any Maven version or maven-dependency-plugin before*
If you have any issue, please precise which Maven and maven-dependency-plugin 
versions you are using

Then detailed tests:
tested with attached pom.xml (dummy) and following settings.xml to provide a 
clean local repository on each test (and locale repository manager for 
efficiency):
{code:xml}<settings>
  <localRepository>repo</localRepository>

  <!--mirrors>
    <mirror>
      <id>central</id>
      <name>My Repository Manager</name>
      <url>http://localhost:8080/...</url>
      <mirrorOf>central</mirrorOf>
    </mirror>
  </mirrors-->

</settings>{code}

then define explicitiely the maven-dependency-plugin version used for 
{{go-offline}} to not depend on default version defined inside Maven: 
{noformat}mvn -s settings.xml 
org.apache.maven.plugins:maven-dependency-plugin:2.8:go-offline{noformat}

And finally check if the build in offline mode works:
{noformat}mvn -V -s settings.xml verify -o{noformat}

Result: build works with *maven-dependency-plugin starting with version 3.0.0* 
with recent Maven versions

On one line:
{noformat}\rm -rf repo ; mvn -s settings.xml 
org.apache.maven.plugins:maven-dependency-plugin:3.0.0:go-offline ; mvn -V -s 
settings.xml verify -o{noformat}
works like a charm (tested with success also with 3.0.1, 3.0.2, 3.1.0)
The same test fails with 2.10 or anything before fails.
Tested with success with Maven 3.5.3, 3.3.9, 3.2.5, 3.1.0
But fails with Maven 3.0.5


was (Author: hboutemy):
TL;DR = *Works with Maven 3.1.0+ and maven-dependency-plugin 3.3.0+, fails with 
any Maven version or maven-dependency-plugin before*
If you have any issue, please precise which Maven and maven-dependency-plugin 
versions you are using

Then detailed tests:
tested with attached pom.xml (dummy) and following settings.xml to provide a 
clean local repository on each test (and locale repository manager for 
efficiency):
{code:xml}<settings>
  <localRepository>repo</localRepository>

  <!--mirrors>
    <mirror>
      <id>central</id>
      <name>My Repository Manager</name>
      <url>http://localhost:8080/...</url>
      <mirrorOf>central</mirrorOf>
    </mirror>
  </mirrors-->

</settings>{code}

then define explicitiely the maven-dependency-plugin version used for 
{{go-offline}} to not depend on default version defined inside Maven: 
{noformat}mvn -s settings.xml 
org.apache.maven.plugins:maven-dependency-plugin:2.8:go-offline{noformat}

And finally check if the build in offline mode works:
{noformat}mvn -V -s settings.xml verify -o{noformat}

Result: build works with *maven-dependency-plugin starting with version 3.0.0* 
with recent Maven versions

On one line:
{noformat}\rm -rf repo ; mvn -s settings.xml 
org.apache.maven.plugins:maven-dependency-plugin:3.0.0:go-offline ; mvn -V -s 
settings.xml verify -o{noformat}
works like a charm (tested with success also with 3.0.1, 3.0.2, 3.1.0)
The same test fails with 2.10 or anything before fails.
Tested with success with Maven 3.5.3, 3.3.9, 3.2.5, 3.1.0
But fails with Maven 3.0.5

> 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, 2.8, 2.10
>         Environment: Maven 2.0.6
>            Reporter: Arne Degenring
>            Priority: Major
>             Fix For: 3.0.0
>
>         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
(v7.6.3#76005)

Reply via email to