1.6.0 warns about missing dependencies when previous versions did not (original) (raw)
With the inclusion of #220 in extra enforcer plugin 1.6.0, dependencies are reported as missing even though previous versions of the extra enforcer plugin did not warn about those dependencies and later use in the project do not report the dependencies as missing.
Background
Jenkins plugins (like the implied labels plugin) use a parent pom that includes the extra enforcer rules plugin. When plugins are upgraded to a parent pom version that uses extra enforcer rules 1.6.0, the plugin builds now received warnings like the following:
[WARNING] Missing:
----------
1) org.jenkins-ci.main:jenkins-test-harness:jar:1802.v9de0d87365d2
Try downloading the file manually from the project website.
Then, install it using the command:
mvn install:install-file -DgroupId=org.jenkins-ci.main -DartifactId=jenkins-test-harness -Dversion=1802.v9de0d87365d2 -Dpackaging=jar -Dfile=/path/to/file
Alternatively, if you host your own repository you can deploy the file there:
mvn deploy:deploy-file -DgroupId=org.jenkins-ci.main -DartifactId=jenkins-test-harness -Dversion=1802.v9de0d87365d2 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
Path to dependency:
1) org.jenkins-ci.main:jenkins-test-harness:jar:1802.v9de0d87365d2
----------
1 required artifact is missing.
for artifact:
org.jenkins-ci.main:jenkins-test-harness:jar:1802.v9de0d87365d2
from the specified remote repositories:
central (https://repo.maven.apache.org/maven2, releases=true, snapshots=false)
Path to dependency:
1) org.jenkins-ci.main:jenkins-test-harness:jar:1802.v9de0d87365d2
The dependencies that are reported as unresolvable are then later resolved in the build process without issue.
Duplicate the issue
Duplicate the issue with the commands:
$ rm -rf implied-labels-plugin $ git clone https://github.com/jenkinsci/implied-labels-plugin.git $ cd implied-labels-plugin $ echo '' > settings.xml $ mvn validate
Configuration change to avoid the issue
When I was seeing the issue, my ~/.m2/settings.xml file included the following mirror definition:
I can avoid the issue by changing my ~/.m2/settings.xml file to use the following mirror definition instead:
Other users have reported the same issue, including:
- @basil - Jenkins developers mailing list
- @martinda - Jenkins community forum
- @NotMyFault - Jenkins core pull request
- At least one other user in the Jenkins gitter channel
Expected results
I think that warnings about unresolvable dependencies in the extra enforcer rules should be consistent with the warnings in the rest of a maven build process.