title: Maven and Jenkins: dependency error when building project
body: <p>I'm trying to move an application from being built locally on a Windows Eclipse installation to a Jenkins server. From what I can see the settings are correct and the dependencies should resolve. Even the ones it is complaining about are there when I check the ~/.m2/repositories/ folder. I'm not sure what I'm doing wrong here. I'm completely new to Jenkins and little to no experience with Maven itself.</p>
  
  <p>Here's my pom.xml:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;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"&gt;
  &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  &lt;groupId&gt;com.my.project&lt;/groupId&gt;
  &lt;artifactId&gt;My-Project&lt;/artifactId&gt;
  &lt;name&gt;MyProject&lt;/name&gt;
  &lt;packaging&gt;war&lt;/packaging&gt;
  &lt;version&gt;1.2.2&lt;/version&gt;
  &lt;properties&gt;
      &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
  &lt;/properties&gt;
  &lt;dependencies&gt;
      &lt;!-- Spring --&gt;
  
      &lt;!-- AspectJ --&gt;
  
      &lt;!-- Logging --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;log4j&lt;/groupId&gt;
          &lt;artifactId&gt;log4j&lt;/artifactId&gt;
          &lt;version&gt;1.2.17&lt;/version&gt;
          &lt;exclusions&gt;
              &lt;exclusion&gt;
                  &lt;groupId&gt;javax.mail&lt;/groupId&gt;
                  &lt;artifactId&gt;mail&lt;/artifactId&gt;
              &lt;/exclusion&gt;
              &lt;exclusion&gt;
                  &lt;groupId&gt;javax.jms&lt;/groupId&gt;
                  &lt;artifactId&gt;jms&lt;/artifactId&gt;
              &lt;/exclusion&gt;
              &lt;exclusion&gt;
                  &lt;groupId&gt;com.sun.jdmk&lt;/groupId&gt;
                  &lt;artifactId&gt;jmxtools&lt;/artifactId&gt;
              &lt;/exclusion&gt;
              &lt;exclusion&gt;
                  &lt;groupId&gt;com.sun.jmx&lt;/groupId&gt;
                  &lt;artifactId&gt;jmxri&lt;/artifactId&gt;
              &lt;/exclusion&gt;
          &lt;/exclusions&gt;
          &lt;scope&gt;runtime&lt;/scope&gt;
      &lt;/dependency&gt;
  
      &lt;!-- @Inject --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;javax.inject&lt;/groupId&gt;
          &lt;artifactId&gt;javax.inject&lt;/artifactId&gt;
          &lt;version&gt;1&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;!-- Servlet --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;javax.servlet&lt;/groupId&gt;
          &lt;artifactId&gt;servlet-api&lt;/artifactId&gt;
          &lt;version&gt;2.5&lt;/version&gt;
          &lt;scope&gt;provided&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;javax.servlet.jsp&lt;/groupId&gt;
          &lt;artifactId&gt;jsp-api&lt;/artifactId&gt;
          &lt;version&gt;2.1&lt;/version&gt;
          &lt;scope&gt;provided&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;javax.servlet&lt;/groupId&gt;
          &lt;artifactId&gt;jstl&lt;/artifactId&gt;
          &lt;version&gt;1.2&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;!-- Test --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;junit&lt;/groupId&gt;
          &lt;artifactId&gt;junit&lt;/artifactId&gt;
          &lt;version&gt;4.7&lt;/version&gt;
          &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
  
  
      &lt;!-- CUSTOM --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;commons-io&lt;/groupId&gt;
          &lt;artifactId&gt;commons-io&lt;/artifactId&gt;
          &lt;version&gt;2.4&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;3.3.2&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;commons-discovery&lt;/groupId&gt;
          &lt;artifactId&gt;commons-discovery&lt;/artifactId&gt;
          &lt;version&gt;0.5&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.apache.axis&lt;/groupId&gt;
          &lt;artifactId&gt;axis&lt;/artifactId&gt;
          &lt;version&gt;1.4&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;commons-logging&lt;/groupId&gt;
          &lt;artifactId&gt;commons-logging&lt;/artifactId&gt;
          &lt;version&gt;1.1.1&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;commons-logging&lt;/groupId&gt;
          &lt;artifactId&gt;commons-logging-adapters&lt;/artifactId&gt;
          &lt;version&gt;1.1&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;commons-logging&lt;/groupId&gt;
          &lt;artifactId&gt;commons-logging-api&lt;/artifactId&gt;
          &lt;version&gt;1.1&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;commons-validator&lt;/groupId&gt;
          &lt;artifactId&gt;commons-validator&lt;/artifactId&gt;
          &lt;version&gt;1.3.1&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;dom4j&lt;/groupId&gt;
          &lt;artifactId&gt;dom4j&lt;/artifactId&gt;
          &lt;version&gt;1.6.1&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.jdom&lt;/groupId&gt;
          &lt;artifactId&gt;jdom2&lt;/artifactId&gt;
          &lt;version&gt;2.0.5&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;jstl&lt;/groupId&gt;
          &lt;artifactId&gt;jstl&lt;/artifactId&gt;
          &lt;version&gt;1.2&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
          &lt;artifactId&gt;slf4j-log4j12&lt;/artifactId&gt;
          &lt;version&gt;1.7.7&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
          &lt;artifactId&gt;jcl-over-slf4j&lt;/artifactId&gt;
          &lt;version&gt;1.7.7&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework&lt;/groupId&gt;
          &lt;artifactId&gt;spring-aop&lt;/artifactId&gt;
          &lt;version&gt;3.2.10.RELEASE&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework&lt;/groupId&gt;
          &lt;artifactId&gt;spring-aspects&lt;/artifactId&gt;
          &lt;version&gt;3.2.10.RELEASE&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework&lt;/groupId&gt;
          &lt;artifactId&gt;spring-beans&lt;/artifactId&gt;
          &lt;version&gt;3.2.10.RELEASE&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework&lt;/groupId&gt;
          &lt;artifactId&gt;spring-context&lt;/artifactId&gt;
          &lt;version&gt;3.2.10.RELEASE&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework&lt;/groupId&gt;
          &lt;artifactId&gt;spring-context-support&lt;/artifactId&gt;
          &lt;version&gt;3.2.10.RELEASE&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework&lt;/groupId&gt;
          &lt;artifactId&gt;spring-core&lt;/artifactId&gt;
          &lt;version&gt;3.2.10.RELEASE&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework&lt;/groupId&gt;
          &lt;artifactId&gt;spring-expression&lt;/artifactId&gt;
          &lt;version&gt;3.2.10.RELEASE&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework&lt;/groupId&gt;
          &lt;artifactId&gt;spring-jdbc&lt;/artifactId&gt;
          &lt;version&gt;3.2.10.RELEASE&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework&lt;/groupId&gt;
          &lt;artifactId&gt;spring-jms&lt;/artifactId&gt;
          &lt;version&gt;3.2.10.RELEASE&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework&lt;/groupId&gt;
          &lt;artifactId&gt;spring-orm&lt;/artifactId&gt;
          &lt;version&gt;3.2.10.RELEASE&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework&lt;/groupId&gt;
          &lt;artifactId&gt;spring-oxm&lt;/artifactId&gt;
          &lt;version&gt;3.2.10.RELEASE&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework&lt;/groupId&gt;
          &lt;artifactId&gt;spring-test&lt;/artifactId&gt;
          &lt;version&gt;3.2.10.RELEASE&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework&lt;/groupId&gt;
          &lt;artifactId&gt;spring-tx&lt;/artifactId&gt;
          &lt;version&gt;3.2.10.RELEASE&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework&lt;/groupId&gt;
          &lt;artifactId&gt;spring-web&lt;/artifactId&gt;
          &lt;version&gt;3.2.10.RELEASE&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework&lt;/groupId&gt;
          &lt;artifactId&gt;spring-webmvc&lt;/artifactId&gt;
          &lt;version&gt;3.2.10.RELEASE&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.postgresql&lt;/groupId&gt;
          &lt;artifactId&gt;postgresql&lt;/artifactId&gt;
          &lt;version&gt;9.3-1102-jdbc41&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;net.sf.ehcache&lt;/groupId&gt;
          &lt;artifactId&gt;ehcache&lt;/artifactId&gt;
          &lt;version&gt;2.8.3&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;commons-codec&lt;/groupId&gt;
          &lt;artifactId&gt;commons-codec&lt;/artifactId&gt;
          &lt;version&gt;1.9&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;javax.validation&lt;/groupId&gt;
          &lt;artifactId&gt;validation-api&lt;/artifactId&gt;
          &lt;version&gt;1.1.0.Final&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.jboss.logging&lt;/groupId&gt;
          &lt;artifactId&gt;jboss-logging&lt;/artifactId&gt;
          &lt;version&gt;3.1.4.GA&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
          &lt;artifactId&gt;hibernate-validator&lt;/artifactId&gt;
          &lt;version&gt;4.3.2.Final&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;commons-fileupload&lt;/groupId&gt;
          &lt;artifactId&gt;commons-fileupload&lt;/artifactId&gt;
          &lt;version&gt;1.3.1&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.eclipse.birt.runtime&lt;/groupId&gt;
          &lt;artifactId&gt;org.eclipse.birt.runtime&lt;/artifactId&gt;
          &lt;version&gt;4.4.0&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.eclipse.birt.runtime&lt;/groupId&gt;
          &lt;artifactId&gt;viewservlets&lt;/artifactId&gt;
          &lt;version&gt;4.3.1&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
          &lt;artifactId&gt;maven-war-plugin&lt;/artifactId&gt;
          &lt;version&gt;2.5&lt;/version&gt;
          &lt;exclusions&gt;
              &lt;exclusion&gt;
                  &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
                  &lt;artifactId&gt;slf4j-jdk14&lt;/artifactId&gt;
              &lt;/exclusion&gt;
          &lt;/exclusions&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.apache.httpcomponents&lt;/groupId&gt;
          &lt;artifactId&gt;httpclient&lt;/artifactId&gt;
          &lt;version&gt;4.3.6&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.apache.xmlrpc&lt;/groupId&gt;
          &lt;artifactId&gt;xmlrpc-common&lt;/artifactId&gt;
          &lt;version&gt;3.1.3&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.apache.xmlrpc&lt;/groupId&gt;
          &lt;artifactId&gt;xmlrpc-client&lt;/artifactId&gt;
          &lt;version&gt;3.1.3&lt;/version&gt;
      &lt;/dependency&gt;
  
  &lt;/dependencies&gt;
  &lt;scm&gt;
      &lt;connection&gt;scm:svn:http://192.168.1.88:18080/svn/project&lt;/connection&gt;
      &lt;tag&gt;HEAD&lt;/tag&gt;
      &lt;url&gt;scm:svn:http://192.168.1.88:18080/svn/project&lt;/url&gt;
  &lt;/scm&gt;
  &lt;build&gt;
      &lt;pluginManagement&gt;
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.eclipse.m2e&lt;/groupId&gt;
                  &lt;artifactId&gt;lifecycle-mapping&lt;/artifactId&gt;
                  &lt;version&gt;1.0.0&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;lifecycleMappingMetadata&gt;
                          &lt;pluginExecutions&gt;
                              &lt;pluginExecution&gt;
                                  &lt;pluginExecutionFilter&gt;
                                      &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
                                      &lt;artifactId&gt;buildnumber-maven-plugin&lt;/artifactId&gt;
                                      &lt;versionRange&gt;[1.0,)&lt;/versionRange&gt;
                                      &lt;goals&gt;
                                          &lt;goal&gt;create&lt;/goal&gt;
                                      &lt;/goals&gt;
                                  &lt;/pluginExecutionFilter&gt;
                                  &lt;action&gt;
                                      &lt;execute&gt;
                                          &lt;runOnIncremental&gt;true&lt;/runOnIncremental&gt;
                                      &lt;/execute&gt;
                                  &lt;/action&gt;
                              &lt;/pluginExecution&gt;
                          &lt;/pluginExecutions&gt;
                      &lt;/lifecycleMappingMetadata&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/pluginManagement&gt;
      &lt;plugins&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
              &lt;artifactId&gt;buildnumber-maven-plugin&lt;/artifactId&gt;
              &lt;version&gt;1.0&lt;/version&gt;
              &lt;executions&gt;
                  &lt;execution&gt;
                      &lt;phase&gt;validate&lt;/phase&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;create&lt;/goal&gt;
                      &lt;/goals&gt;
                  &lt;/execution&gt;
              &lt;/executions&gt;
              &lt;configuration&gt;
                  &lt;doCheck&gt;false&lt;/doCheck&gt;
                  &lt;doUpdate&gt;false&lt;/doUpdate&gt;
                  &lt;timestampFormat&gt;{0,date,yyyy-MM-dd HH:mm:ss}&lt;/timestampFormat&gt;
                  &lt;revisionOnScmFailure&gt;unknownbuild&lt;/revisionOnScmFailure&gt;
                  &lt;providerImplementations&gt;
                      &lt;svn&gt;javasvn&lt;/svn&gt;
                  &lt;/providerImplementations&gt;
              &lt;/configuration&gt;
              &lt;dependencies&gt;
                  &lt;dependency&gt;
                      &lt;groupId&gt;com.google.code.maven-scm-provider-svnjava&lt;/groupId&gt;
                      &lt;artifactId&gt;maven-scm-provider-svnjava&lt;/artifactId&gt;
                      &lt;version&gt;2.0.2&lt;/version&gt;
                  &lt;/dependency&gt;
                  &lt;dependency&gt;
                      &lt;groupId&gt;org.tmatesoft.svnkit&lt;/groupId&gt;
                      &lt;artifactId&gt;svnkit&lt;/artifactId&gt;
                      &lt;version&gt;1.8.5&lt;/version&gt;
                  &lt;/dependency&gt;
              &lt;/dependencies&gt;
          &lt;/plugin&gt;
          &lt;plugin&gt;
              &lt;artifactId&gt;maven-eclipse-plugin&lt;/artifactId&gt;
              &lt;version&gt;2.9&lt;/version&gt;
              &lt;configuration&gt;
                  &lt;additionalProjectnatures&gt;
                      &lt;projectnature&gt;org.springframework.ide.eclipse.core.springnature&lt;/projectnature&gt;
                  &lt;/additionalProjectnatures&gt;
                  &lt;additionalBuildcommands&gt;
                      &lt;buildcommand&gt;org.springframework.ide.eclipse.core.springbuilder&lt;/buildcommand&gt;
                  &lt;/additionalBuildcommands&gt;
                  &lt;downloadSources&gt;true&lt;/downloadSources&gt;
                  &lt;downloadJavadocs&gt;true&lt;/downloadJavadocs&gt;
              &lt;/configuration&gt;
          &lt;/plugin&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;2.5.1&lt;/version&gt;
              &lt;configuration&gt;
                  &lt;source&gt;1.7&lt;/source&gt;
                  &lt;target&gt;1.7&lt;/target&gt;
                  &lt;compilerArgument&gt;-Xlint:all&lt;/compilerArgument&gt;
                  &lt;showWarnings&gt;true&lt;/showWarnings&gt;
                  &lt;showDeprecation&gt;true&lt;/showDeprecation&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
              &lt;artifactId&gt;exec-maven-plugin&lt;/artifactId&gt;
              &lt;version&gt;1.2.1&lt;/version&gt;
              &lt;configuration&gt;
                  &lt;mainClass&gt;org.test.int1.Main&lt;/mainClass&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
              &lt;artifactId&gt;maven-war-plugin&lt;/artifactId&gt;
              &lt;version&gt;2.5&lt;/version&gt;
              &lt;configuration&gt;
                  &lt;archive&gt;
                      &lt;manifest&gt;
                          &lt;addDefaultImplementationEntries&gt;true&lt;/addDefaultImplementationEntries&gt;
                      &lt;/manifest&gt;
                      &lt;manifestEntries&gt;
                          &lt;Implementation-Build&gt;${buildNumber}&lt;/Implementation-Build&gt;
                      &lt;/manifestEntries&gt;
                  &lt;/archive&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
      &lt;/plugins&gt;
  &lt;/build&gt;
  </code></pre>
  
  <p></p>
  
  <p>I was originally getting this error:</p>
  
  <pre><code>[WARNING] Failed to retrieve plugin descriptor for org.eclipse.m2e:lifecycle-mapping:1.0.0: Plugin org.eclipse.m2e:lifecycle-mapping:1.0.0 or one of its dependencies could not be resolved: Failure to find org.eclipse.m2e:lifecycle-mapping:jar:1.0.0 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
  org.apache.maven.plugin.PluginResolutionException: Plugin org.eclipse.m2e:lifecycle-mapping:1.0.0 or one of its dependencies could not be resolved: Failure to find org.eclipse.m2e:lifecycle-mapping:jar:1.0.0 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
  </code></pre>
  
  <p>I've since learned that the m2e:lifecycle-mapping is not a real plugin and is something that's built into Eclipse, so Maven on a Linux server is not able to resolve it. I can manage to to get around it temporarily with this command (courtesy of <a href="https://stackoverflow.com/questions/7409823/m2e-lifecycle-mapping-not-found">this post</a>):</p>
  
  <pre><code>sudo -u jenkins /opt/apache-maven-3.2.5/bin/mvn archetype:generate -DgroupId=org.eclipse.m2e -DartifactId=lifecycle-mapping -Dversion=1.0.0 -DarchetypeArtifactId=maven-archetype-mojo
  </code></pre>
  
  <p>But now I'm running into this problem:</p>
  
  <pre><code>[INFO] Error stacktraces are turned on.
  [INFO] Scanning for projects...
  [WARNING] The POM for org.eclipse.m2e:lifecycle-mapping:jar:1.0.0 is missing, no dependency information available
  [WARNING] Failed to retrieve plugin descriptor for org.eclipse.m2e:lifecycle-mapping:1.0.0: Plugin org.eclipse.m2e:lifecycle-mapping:1.0.0 or one of its dependencies could not be resolved: Failure to find org.eclipse.m2e:lifecycle-mapping:jar:1.0.0 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
  [INFO]
  [INFO] ------------------------------------------------------------------------
  [INFO] Building My-Project 1.2.2
  [INFO] ------------------------------------------------------------------------
  [WARNING] The POM for org.eclipse.m2e:lifecycle-mapping:jar:1.0.0 is missing, no dependency information available
  [WARNING] Failed to retrieve plugin descriptor for org.eclipse.m2e:lifecycle-mapping:1.0.0: Plugin org.eclipse.m2e:lifecycle-mapping:1.0.0 or one of its dependencies could not be resolved: Failure to find org.eclipse.m2e:lifecycle-mapping:jar:1.0.0 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
  [INFO]
  [INFO] &gt;&gt;&gt; maven-archetype-plugin:2.2:generate (default-cli) &gt; generate-sources @ My-Project &gt;&gt;&gt;
  [INFO]
  [INFO] --- buildnumber-maven-plugin:1.0:create (default) @ My-Project ---
  [INFO] Change the default 'svn' provider implementation to 'javasvn'.
  [INFO] Checking for local modifications: skipped.
  [INFO] Updating project files from SCM: skipped.
  [INFO] Storing buildNumber: 207 at timestamp: 2015-02-13 11:38:15
  [INFO] Storing buildScmBranch: trunk
  [INFO]
  [INFO] &lt;&lt;&lt; maven-archetype-plugin:2.2:generate (default-cli) &lt; generate-sources @ My-Project &lt;&lt;&lt;
  [INFO]
  [INFO] --- maven-archetype-plugin:2.2:generate (default-cli) @ My-Project ---
  [INFO] Generating project in Interactive mode
  [INFO] Using property: groupId = org.eclipse.m2e
  [INFO] Using property: artifactId = lifecycle-mapping
  [INFO] Using property: version = 1.0.0
  [INFO] Using property: package = org.eclipse.m2e
  Confirm properties configuration:
  groupId: org.eclipse.m2e
  artifactId: lifecycle-mapping
  version: 1.0.0
  package: org.eclipse.m2e
   Y: : Y
  [INFO] ----------------------------------------------------------------------------
  [INFO] Using following parameters for creating project from Old (1.x) Archetype: maven-archetype-mojo:1.0
  [INFO] ----------------------------------------------------------------------------
  [INFO] Parameter: groupId, Value: org.eclipse.m2e
  [INFO] Parameter: packageName, Value: org.eclipse.m2e
  [INFO] Parameter: package, Value: org.eclipse.m2e
  [INFO] Parameter: artifactId, Value: lifecycle-mapping
  [INFO] Parameter: basedir, Value: /var/lib/jenkins/jobs/MyProject/workspace
  [INFO] Parameter: version, Value: 1.0.0
  [INFO] ------------------------------------------------------------------------
  [INFO] BUILD FAILURE
  [INFO] ------------------------------------------------------------------------
  [INFO] Total time: 23.486 s
  [INFO] Finished at: 2015-02-13T11:38:36-05:00
  [INFO] Final Memory: 16M/137M
  [INFO] ------------------------------------------------------------------------
  [ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.2:generate (default-cli) on project My-Project: Unable to add module to the current project as it is not of packaging type 'pom' -&gt; [Help 1]
  org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.2:generate (default-cli) on project My-Project: Unable to add module to the current project as it is not of packaging type 'pom'
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
          at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
          at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
          at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
          at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120)
          at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:355)
          at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)
          at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)
          at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:216)
          at org.apache.maven.cli.MavenCli.main(MavenCli.java:160)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:606)
          at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
          at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
          at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
          at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
  Caused by: org.apache.maven.plugin.MojoFailureException: Unable to add module to the current project as it is not of packaging type 'pom'
          at org.apache.maven.archetype.mojos.CreateProjectFromArchetypeMojo.execute(CreateProjectFromArchetypeMojo.java:211)
          at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
          ... 19 more
  [ERROR]
  [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/MojoFailureException
  </code></pre>
  
  <p>Any help on this is appreciated.</p>