Parent pom upgrade from 4.38 to 4.43.1 creates missing artifact warnings

In the process of upgrading a plugin to the parent pom from 4.38 to 4.43.1, I now get warnings when I run mvn hpi:run:

[WARNING] Missing:
----------
1) org.jenkins-ci.main:jenkins-core:jar:2.303.3

  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-core -Dversion=2.303.3 -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-core -Dversion=2.303.3 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

  Path to dependency:
        1) org.jenkins-ci.main:jenkins-core:jar:2.303.3

----------
1 required artifact is missing.

for artifact:
  org.jenkins-ci.main:jenkins-core:jar:2.303.3

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-core:jar:2.303.3

And there are similar warnings for:

  • org.jenkins-ci.main:jenkins-war:executable-war:2.303.3
  • org.jenkins-ci.main:jenkins-test-harness:jar:1802.v9de0d87365d2
  • org.jenkins-ci:test-annotations:jar:1.4

I am not sure how to address these warnings… should these be hard coded in the pom.xml?

Thanks for asking! I asked the same question in the Jenkins developers mailing list.

Jesse Glick suggested that my ~/.m2/settings.xml file needs an entry that declares repo.jenkins-ci.org as the mirror for almost everything since I was already declaring it as a mirror. He shares more details (including the note that a mirror configuration is not required) in a GitHub issue comment.

The syntax for that is:

<settings>
  <mirrors>
    <mirror>
      <id>repo.jenkins-ci.org</id>
      <url>https://repo.jenkins-ci.org/public/</url>
      <mirrorOf>*,!repo.jenkins-ci.org,!incrementals</mirrorOf>
    </mirror>
  </mirrors>
</settings>

Basil notes that it is a regression in the Maven enforcer plugin 1.6.0. He has no Maven mirror configured and sees the message. I’ve not yet submitted a bug report to the Maven enforcer plugin, but I’m getting closer.

1 Like

I use an internal mirror, and this line fixes it:

Thanks!

1 Like