You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "John (JIRA)" <ji...@apache.org> on 2018/05/08 13:01:00 UTC

[jira] [Commented] (MDEP-82) go-offline / resolve-plugins does not resolve all plugin dependencies

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

John commented on MDEP-82:
--------------------------

Using Apache Maven 3.3.9, this error persists. Our build system uses a "provision" step where all dependencies are gathered (we support a lot more than Maven), and a build step in a clean environment with no internet connectivity. 

starting with a clean local repository:
{code:java}
repository jchittum$ pwd
/Users/jchittum/.m2/repository
repository jchittum$ ls
repository jchittum$
{code}

using the following POM


{code:java}
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.akamai.devprod</groupId>
<artifactId>pull-tester</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<name>test-app</name>
<url>https://dev-repos.devprod.akamai.com</url>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.8</version>
<scope>test</scope>
</dependency> 
<dependency>
<groupId>com.spotify</groupId>
<artifactId>docker-client</artifactId>
<version>8.11.2</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.25</version>
</dependency>
</dependencies>
<properties>
<maven.compiler.source>1.6</maven.compiler.source>
<maven.compiler.target>1.6</maven.compiler.target>
</properties>
</project>

{code}

I then run go-offline, which populates a most plugins and dependencies, however, I always run into some that aren't populated. Running mvn -o install


{code:java}
bos-mpoxc:test-pull-app jchittum$ mvn -o install
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building test-app 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ pull-tester ---
[WARNING] The POM for org.apache.maven:maven-core:jar:2.0.6 is missing, no dependency information available
[WARNING] The POM for org.apache.maven:maven-monitor:jar:2.0.6 is missing, no dependency information available
[WARNING] The POM for org.codehaus.plexus:plexus-utils:jar:2.0.5 is missing, no dependency information available
[WARNING] The POM for org.apache.maven.shared:maven-filtering:jar:1.1 is missing, no dependency information available
[WARNING] The POM for org.codehaus.plexus:plexus-interpolation:jar:1.13 is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.525 s
[INFO] Finished at: 2018-05-08T07:52:34-05:00
[INFO] Final Memory: 9M/309M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:2.6:resources (default-resources) on project pull-tester: Execution default-resources of goal org.apache.maven.plugins:maven-resources-plugin:2.6:resources failed: Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its dependencies could not be resolved: The following artifacts could not be resolved: org.apache.maven:maven-profile:jar:2.0.6, org.apache.maven:maven-repository-metadata:jar:2.0.6, org.apache.maven:maven-plugin-registry:jar:2.0.6, classworlds:classworlds:jar:1.1-alpha-2: Cannot access central (https://repos.akamai.com/public-maven-repos) in offline mode and the artifact org.apache.maven:maven-profile:jar:2.0.6 has not been downloaded from it before. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException
{code}
I can tell at least the following plugins are not downloaded with a go-offline:
 * surefire (and transitive dependencies)
 * jar (and its transitive dependencies
 * compiler (and its transitive dependencies)
 * resources (and its transitive dependencies)

It appears the original bug stating that core plugins for lifecycle phases are not populated. As is, since our build environment is docker based, I'll be setting up a script to manually pull all Apache maintained plugins and populating the initial build environment. 


How about this proposal?

The Maven Dependency Plugin, when using go-offline, should do a greedy pull, and populate all Maven core plugins and their transitive dependencies.

 

> 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
(v7.6.3#76005)