title: Jenkins - Could not find artifact org.apache.maven:maven:pom:3.1.0 in Repo
body: <p>Java 8, maven compile issue on Jenkins</p>
  <p>struggling for ages with this one. I can locally build, compile and test everything without a problem. I use same maven command as I use on my Jenkins. I wiped my <code>.m2</code> folder so I have same empty repo and still everything fine.</p>
  <p>This is the maven command I use:</p>
  <p><code>(mvn) -U clean install -PTestExecutor -Dheadless=true -C</code></p>
  <p>this is my <code>POM</code>:</p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
  &lt;project xmlns=&quot;http://maven.apache.org/POM/4.0.0&quot;
           xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
           xsi:schemaLocation=&quot;http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd&quot;&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  
      &lt;groupId&gt;com.xxx&lt;/groupId&gt;
      &lt;artifactId&gt;testing&lt;/artifactId&gt;
      &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
  
      &lt;properties&gt;
          &lt;java.version&gt;1.8&lt;/java.version&gt;
          &lt;maven.compiler.source&gt;${java.version}&lt;/maven.compiler.source&gt;
          &lt;maven.compiler.target&gt;${java.version}&lt;/maven.compiler.target&gt;
  
          &lt;cucumber.version&gt;7.3.3&lt;/cucumber.version&gt;
          &lt;selenium.version&gt;4.1.4&lt;/selenium.version&gt;
          &lt;awaitility.version&gt;4.2.0&lt;/awaitility.version&gt;
          &lt;assertj.version&gt;3.22.0&lt;/assertj.version&gt;
          &lt;commonsmodel.version&gt;5.3.3&lt;/commonsmodel.version&gt;
          &lt;maven.compiler.version&gt;3.10.1&lt;/maven.compiler.version&gt;
          &lt;maven.surefire.version&gt;3.0.0-M6&lt;/maven.surefire.version&gt;
          &lt;commons-lang3.version&gt;3.12.0&lt;/commons-lang3.version&gt;
          &lt;junit-jupiter-engine.version&gt;5.8.2&lt;/junit-jupiter-engine.version&gt;
          &lt;maven-cucumber-reporting.version&gt;5.7.0&lt;/maven-cucumber-reporting.version&gt;
      &lt;/properties&gt;
  
      &lt;dependencies&gt;
  
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.maven&lt;/groupId&gt;
              &lt;artifactId&gt;maven-artifact&lt;/artifactId&gt;
              &lt;version&gt;3.1.1&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.maven&lt;/groupId&gt;
              &lt;artifactId&gt;maven-core&lt;/artifactId&gt;
              &lt;version&gt;3.1.0&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.maven&lt;/groupId&gt;
              &lt;artifactId&gt;maven-plugin-api&lt;/artifactId&gt;
              &lt;version&gt;3.1.0&lt;/version&gt;
          &lt;/dependency&gt;
  
  
          &lt;dependency&gt;
              &lt;groupId&gt;io.cucumber&lt;/groupId&gt;
              &lt;artifactId&gt;cucumber-java&lt;/artifactId&gt;
              &lt;version&gt;${cucumber.version}&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;io.cucumber&lt;/groupId&gt;
              &lt;artifactId&gt;cucumber-junit-platform-engine&lt;/artifactId&gt;
              &lt;version&gt;${cucumber.version}&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.junit.platform&lt;/groupId&gt;
              &lt;artifactId&gt;junit-platform-suite&lt;/artifactId&gt;
              &lt;version&gt;1.8.2&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.junit.jupiter&lt;/groupId&gt;
              &lt;artifactId&gt;junit-jupiter-engine&lt;/artifactId&gt;
              &lt;version&gt;${junit-jupiter-engine.version}&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;net.jodah&lt;/groupId&gt;
              &lt;artifactId&gt;failsafe&lt;/artifactId&gt;
              &lt;version&gt;2.4.4&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.seleniumhq.selenium&lt;/groupId&gt;
              &lt;artifactId&gt;selenium-java&lt;/artifactId&gt;
              &lt;version&gt;${selenium.version}&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.awaitility&lt;/groupId&gt;
              &lt;artifactId&gt;awaitility&lt;/artifactId&gt;
              &lt;version&gt;${awaitility.version}&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.assertj&lt;/groupId&gt;
              &lt;artifactId&gt;assertj-core&lt;/artifactId&gt;
              &lt;version&gt;${assertj.version}&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;io.cucumber&lt;/groupId&gt;
              &lt;artifactId&gt;cucumber-picocontainer&lt;/artifactId&gt;
              &lt;version&gt;${cucumber.version}&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.commons&lt;/groupId&gt;
              &lt;artifactId&gt;commons-lang3&lt;/artifactId&gt;
              &lt;version&gt;${commons-lang3.version}&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;net.masterthought&lt;/groupId&gt;
              &lt;artifactId&gt;maven-cucumber-reporting&lt;/artifactId&gt;
              &lt;version&gt;${maven-cucumber-reporting.version}&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
              &lt;artifactId&gt;maven-surefire-plugin&lt;/artifactId&gt;
              &lt;version&gt;${maven.surefire.version}&lt;/version&gt;
          &lt;/dependency&gt;
  
  
      &lt;/dependencies&gt;
  
      &lt;profiles&gt;
          &lt;profile&gt;
              &lt;id&gt;TestExecutor&lt;/id&gt;
              &lt;build&gt;
                  &lt;plugins&gt;
                      &lt;plugin&gt;
                          &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                          &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
                          &lt;version&gt;${maven.compiler.version}&lt;/version&gt;
                      &lt;/plugin&gt;
                      &lt;plugin&gt;
                          &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                          &lt;artifactId&gt;maven-surefire-plugin&lt;/artifactId&gt;
                          &lt;version&gt;${maven.surefire.version}&lt;/version&gt;
                          &lt;dependencies&gt;
                              &lt;dependency&gt;
                                  &lt;groupId&gt;org.junit.jupiter&lt;/groupId&gt;
                                  &lt;artifactId&gt;junit-jupiter-engine&lt;/artifactId&gt;
                                  &lt;version&gt;${junit-jupiter-engine.version}&lt;/version&gt;
                              &lt;/dependency&gt;
                          &lt;/dependencies&gt;
                          &lt;configuration&gt;
                              &lt;includes&gt;
                                  &lt;includes&gt;**/ExecutorTest.java&lt;/includes&gt;
                              &lt;/includes&gt;
                          &lt;/configuration&gt;
                      &lt;/plugin&gt;
                      &lt;!--cucumber report plugin--&gt;
                      &lt;plugin&gt;
                          &lt;groupId&gt;net.masterthought&lt;/groupId&gt;
                          &lt;artifactId&gt;maven-cucumber-reporting&lt;/artifactId&gt;
                          &lt;version&gt;${maven-cucumber-reporting.version}&lt;/version&gt;
                          &lt;executions&gt;
                              &lt;execution&gt;
                                  &lt;id&gt;generate-cucumber-reports&lt;/id&gt;
                                  &lt;phase&gt;test&lt;/phase&gt;
                                  &lt;goals&gt;
                                      &lt;goal&gt;generate&lt;/goal&gt;
                                  &lt;/goals&gt;
                                  &lt;configuration&gt;
                                      &lt;projectName&gt;Automation report&lt;/projectName&gt;
                                      &lt;outputDirectory&gt;${project.build.directory}/cucumber-reports&lt;/outputDirectory&gt;
                                      &lt;inputDirectory&gt;${project.build.directory}/cucumber&lt;/inputDirectory&gt;
                                      &lt;jsonFiles&gt;
                                          &lt;param&gt;**/*.json&lt;/param&gt;
                                      &lt;/jsonFiles&gt;
                                      &lt;checkBuildResult&gt;false&lt;/checkBuildResult&gt;
                                  &lt;/configuration&gt;
                              &lt;/execution&gt;
                          &lt;/executions&gt;
                      &lt;/plugin&gt;
                  &lt;/plugins&gt;
              &lt;/build&gt;
          &lt;/profile&gt;
      &lt;/profiles&gt;
  
  
  &lt;/project&gt;
  </code></pre>
  <p>and this is the full error report on Jenkins output:</p>
  <pre><code>Executing Maven:  -B -f /appl/xxx/jenkins/workspace/Customer_Portal/web-full-suite/pom.xml -s /appl/xxx/maven/apache-maven-3.3.9/conf/settings.xml -U clean install -PTestExecutor -Dheadless=true -C
  [INFO] Scanning for projects...
  [HUDSON] Collecting dependencies info
  [INFO]                                                                         
  [INFO] ------------------------------------------------------------------------
  [INFO] Building testing 1.0-SNAPSHOT
  [INFO] ------------------------------------------------------------------------
  [INFO] Downloading: http://nlxxxxcv166.srvfarm4-eur.xxx-group.com:8081/artifactory/Maven_repo/org/apache/maven/maven-core/3.1.0/maven-core-3.1.0.pom
  [INFO] Downloading: http://nlxxxxcv166.srvfarm4-eur.xxx-group.com:8081/artifactory/plugins-release/org/apache/maven/maven-core/3.1.0/maven-core-3.1.0.pom
  [WARNING] The POM for org.apache.maven:maven-core:jar:3.1.0 is missing, no dependency information available
  [INFO] Downloading: http://nlxxxxcv166.srvfarm4-eur.xxx-group.com:8081/artifactory/Maven_repo/org/apache/maven/maven-plugin-api/3.1.0/maven-plugin-api-3.1.0.pom
  [INFO] Downloading: http://nlxxxxcv166.srvfarm4-eur.xxx-group.com:8081/artifactory/plugins-release/org/apache/maven/maven-plugin-api/3.1.0/maven-plugin-api-3.1.0.pom
  [WARNING] The POM for org.apache.maven:maven-plugin-api:jar:3.1.0 is missing, no dependency information available
  [INFO] Downloading: http://nlxxxxcv166.srvfarm4-eur.xxx-group.com:8081/artifactory/plugins-release/io/cucumber/messages/maven-metadata.xml
  [INFO] Downloading: http://nlxxxxcv166.srvfarm4-eur.xxx-group.com:8081/artifactory/Maven_repo/io/cucumber/messages/maven-metadata.xml
  [INFO] Downloaded: http://nlxxxxcv166.srvfarm4-eur.xxx-group.com:8081/artifactory/Maven_repo/io/cucumber/messages/maven-metadata.xml (421 B at 20.6 KB/sec)
  [WARNING] The POM for org.apache.maven:maven-plugin-api:jar:3.8.5 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
  [INFO] Downloading: http://nlxxxxcv166.srvfarm4-eur.xxx-group.com:8081/artifactory/Maven_repo/org/apache/maven/maven/3.1.0/maven-3.1.0.pom
  [INFO] Downloading: http://nlxxxxcv166.srvfarm4-eur.xxx-group.com:8081/artifactory/plugins-release/org/apache/maven/maven/3.1.0/maven-3.1.0.pom
  [WARNING] Attempt to (de-)serialize anonymous class org.jfrog.hudson.maven2.MavenDependenciesRecorder$1; see: https://jenkins.io/redirect/serialization-of-anonymous-classes/
  [INFO] ------------------------------------------------------------------------
  [INFO] BUILD FAILURE
  [INFO] ------------------------------------------------------------------------
  [INFO] Total time: 1.828 s
  [INFO] Finished at: 2022-06-13T16:59:43+02:00
  [INFO] Final Memory: 18M/152M
  [INFO] ------------------------------------------------------------------------
  Waiting for Jenkins to finish collecting data
  [ERROR] Failed to execute goal on project testing: Could not resolve dependencies for project com.xxx:testing:jar:1.0-SNAPSHOT: Failed to collect dependencies at org.apache.maven.plugins:maven-surefire-plugin:jar:3.0.0-M6 -&gt; org.apache.maven.surefire:maven-surefire-common:jar:3.0.0-M6 -&gt; org.apache.maven.shared:maven-common-artifact-filters:jar:3.1.1 -&gt; org.apache.maven:maven-artifact:jar:3.1.0: Failed to read artifact descriptor for org.apache.maven:maven-artifact:jar:3.1.0: Could not find artifact org.apache.maven:maven:pom:3.1.0 in XXX-Repo (http://nlxxxxcv166.srvfarm4-eur.xxx-group.com:8081/artifactory/Maven_repo) -&gt; [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/DependencyResolutionException
  [JENKINS] Archiving /appl/xxx/jenkins/workspace/Customer_Portal/web-full-suite/pom.xml to com.xxx/testing/1.0-SNAPSHOT/testing-1.0-SNAPSHOT.pom
  channel stopped
  [htmlpublisher] Archiving HTML reports...
  [htmlpublisher] Archiving at PROJECT level /cucumber/cucumber.html to /appl/xxx/jenkins/jobs/Customer_Portal/jobs/web-full-suite/htmlreports/HTML_20Report
  ERROR: Specified HTML directory '/cucumber/cucumber.html' does not exist.
  Publishing Selenium report...
  Copying the reports.
  parsing resultFile cucumber/cucumber.html
  Unable to parse cucumber/cucumber.html: java.io.IOException: org.xml.sax.SAXParseException; systemId: file:/appl/xxx/jenkins/jobs/Customer_Portal/jobs/web-full-suite/builds/160/seleniumReports/cucumber/cucumber.html; lineNumber: 1; columnNumber: 10; DOCTYPE is disallowed when the feature &quot;http://apache.org/xml/features/disallow-doctype-decl&quot; set to true.
  Set result to FAILURE
  Finished: FAILURE
  </code></pre>