Thomas Weißschuh created MPH-171:
------------------------------------
Summary: Plugin repositories are not preserved from project pom
Key: MPH-171
URL: https://issues.apache.org/jira/browse/MPH-171
Project: Maven Help Plugin
Issue Type: Bug
Components: effective-pom
Affects Versions: 3.2.0
Reporter: Thomas Weißschuh
h1. Description
When computing the effective POM for an external artifact the
plugin-repositories of the local project are not taken into account.
h1. Reproduction case
{code:xml}
<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>
<groupId>org.example</groupId>
<artifactId>maven-help-plugin-missing-pluginrepositories</artifactId>
<version>1.0.0-SNAPSHOT</version>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-help-plugin</artifactId>
<version>3.2.0</version>
</plugin>
</plugins>
</pluginManagement>
</build>
<pluginRepositories>
<pluginRepository>
<id>atlassian-public</id>
<url>https://packages.atlassian.com/maven-external</url>
<releases>
<enabled>true</enabled>
</releases>
</pluginRepository>
</pluginRepositories>
<repositories>
<repository>
<id>atlassian-public</id>
<url>https://packages.atlassian.com/maven-external</url>
<releases>
<enabled>true</enabled>
</releases>
</repository>
</repositories>
</project>
{code}
{code:sh}
$ mvn help:effective-pom
-Dartifact=com.atlassian.confluence:confluence-webapp:6.13.10
{code}
h1. Expected result
The correct effective POM is shown.
h1. Actual result
The following error occurs
{code:sh}
[INFO]
[INFO] ------< org.example:maven-help-plugin-missing-pluginrepositories >------
[INFO] Building maven-help-plugin-missing-pluginrepositories 1.0.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-help-plugin:3.2.0:effective-pom (default-cli) @
maven-help-plugin-missing-pluginrepositories ---
[WARNING] The POM for
com.atlassian.maven.plugins:artifactory-staging-maven-plugin:jar:2.0.1 is
missing, no dependency information available
[WARNING] Failed to build parent project for
com.atlassian.confluence:confluence-project:pom:6.13.10
[WARNING] Failed to build parent project for
com.atlassian.confluence:confluence-webapp:war:6.13.10
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.191 s
[INFO] Finished at: 2021-01-06T14:24:24+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-help-plugin:3.2.0:effective-pom (default-cli) on
project maven-help-plugin-missing-pluginrepositories: Unable to get the POM for
the artifact 'com.atlassian.confluence:confluence-webapp:6.13.10'. Verify the
artifact parameter.: Some problems were encountered while processing the POMs:
[ERROR] [ERROR] Unresolveable build extension: Plugin
com.atlassian.maven.plugins:artifactory-staging-maven-plugin:2.0.1 or one of
its dependencies could not be resolved: Failure to find
com.atlassian.maven.plugins:artifactory-staging-maven-plugin:jar:2.0.1 in
https://repo.maven.apache.org/maven2 was cached in the local repository,
resolution will not be reattempted until the update interval of central has
elapsed or updates are forced @: 1 problem was encountered while building the
effective model for com.atlassian.confluence:confluence-webapp:6.13.10
[ERROR] [ERROR] Unresolveable build extension: Plugin
com.atlassian.maven.plugins:artifactory-staging-maven-plugin:2.0.1 or one of
its dependencies could not be resolved: Failure to find
com.atlassian.maven.plugins:artifactory-staging-maven-plugin:jar:2.0.1 in
https://repo.maven.apache.org/maven2 was cached in the local repository,
resolution will not be reattempted until the update interval of central has
elapsed or updates are forced @
[ERROR] -> [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/MojoExecutionException
{code}
h1. Root cause
AbstractHelpMojo.getMavenProject does not add the current
pluginartifact-repositories to the ProjectBuildingRequest. It does so for the
normal remote-repositories
--
This message was sent by Atlassian Jira
(v8.3.4#803005)