title: Maven archetype plugin - Checksum validation warnings
body: <p>I am using Maven 3.5 on Windows 7.
  The Environment variables 'M2_HOME' and 'JAVA_HOME' are set correctly, and 'JAVA_HOME\bin' and 'M2_HOME\bin' are included in my system's PATH.</p>
  
  <p>I deleted all the files under .m2 directory and executed from the command line:</p>
  
  <p><strong>$mvn archetype:generate -DinteractiveMode=true</strong></p>
  
  <p>Maven downloaded some files successfully until the following was displayed:</p>
  
  <pre><code>Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/archetype/maven-archetype/2.2/maven-archetype-2.2.pom
  [WARNING] Checksum validation failed, expected d5572e8bea6f4876a086779ea878d71731d0ab36 but is 0d9d945a1b1c11a251adc893695c119eb9653cd2 for http://repo.maven.apache.org/maven2/org/apache/maven/archetype/maven-archetype/2.2/maven-archetype-2.2.pom
  [WARNING] Checksum validation failed, expected d5572e8bea6f4876a086779ea878d71731d0ab36 but is 0d9d945a1b1c11a251adc893695c119eb9653cd2 for http://repo.maven.apache.org/maven2/org/apache/maven/archetype/maven-archetype/2.2/maven-archetype-2.2.pom
  Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/archetype/maven-archetype/2.2/maven-archetype-2.2.pom (15 KB at 36.9 KB/sec)
  [WARNING] The POM for org.apache.maven.plugins:maven-archetype-plugin:jar:2.2 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
  Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-archetype-plugin/2.2/maven-archetype-plugin-2.2.jar
  Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-archetype-plugin/2.2/maven-archetype-plugin-2.2.jar (86 KB at 207.7 KB/sec)
  [INFO]
  [INFO] ------------------------------------------------------------------------
  [INFO] Building Maven Stub Project (No POM) 1
  [INFO] ------------------------------------------------------------------------
  [INFO]
  [INFO] &gt;&gt;&gt; maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom &gt;&gt;&gt;
  [INFO]
  [INFO] &lt;&lt;&lt; maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom &lt;&lt;&lt;
  [INFO]
  [INFO] --- maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom ---
  [WARNING] The POM for org.apache.maven.plugins:maven-archetype-plugin:jar:2.2 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
  Downloading: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.jar
  Downloaded: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.jar (165 KB at 381.1 KB/sec)
  ε°⌡ 12, 2013 12:43:48 AM org.sonatype.guice.bean.reflect.Logs$JULSink warn
  WARNING: Error injecting: org.apache.maven.archetype.mojos.CreateProjectFromArchetypeMojo
  java.lang.NoClassDefFoundError: org/apache/maven/shared/invoker/MavenInvocationException
          at java.lang.Class.getDeclaredConstructors0(Native Method)
          at java.lang.Class.privateGetDeclaredConstructors(Class.java:2413)
          at java.lang.Class.getDeclaredConstructors(Class.java:1855)
          at com.google.inject.spi.InjectionPoint.forConstructorOf(InjectionPoint.java:245)
          at com.google.inject.internal.ConstructorBindingImpl.create(ConstructorBindingImpl.java:98)
          at com.google.inject.internal.InjectorImpl.createUninitializedBinding(InjectorImpl.java:629)
          at com.google.inject.internal.InjectorImpl.createJustInTimeBinding(InjectorImpl.java:831)
          at com.google.inject.internal.InjectorImpl.createJustInTimeBindingRecursive(InjectorImpl.java:758)
          at com.google.inject.internal.InjectorImpl.getJustInTimeBinding(InjectorImpl.java:255)
          at com.google.inject.internal.InjectorImpl.getBindingOrThrow(InjectorImpl.java:204)
          at com.google.inject.internal.InjectorImpl.getProviderOrThrow(InjectorImpl.java:954)
          at com.google.inject.internal.InjectorImpl.getProvider(InjectorImpl.java:987)
          at com.google.inject.internal.InjectorImpl.getProvider(InjectorImpl.java:950)
          at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1000)
          at org.sonatype.guice.bean.reflect.AbstractDeferredClass.get(AbstractDeferredClass.java:45)
          at com.google.inject.internal.ProviderInternalFactory.provision(ProviderInternalFactory.java:84)
          at com.google.inject.internal.InternalFactoryToInitializableAdapter.provision(InternalFactoryToInitializableAdapter.java:52)
          at com.google.inject.internal.ProviderInternalFactory$1.call(ProviderInternalFactory.java:70)
          at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:100)
          at org.sonatype.guice.plexus.lifecycles.PlexusLifecycleManager.onProvision(PlexusLifecycleManager.java:138)
          at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:108)
          at com.google.inject.internal.ProvisionListenerStackCallback.provision(ProvisionListenerStackCallback.java:55)
          at com.google.inject.internal.ProviderInternalFactory.circularGet(ProviderInternalFactory.java:68)
          at com.google.inject.internal.InternalFactoryToInitializableAdapter.get(InternalFactoryToInitializableAdapter.java:45)
          at com.google.inject.internal.InjectorImpl$3$1.call(InjectorImpl.java:965)
          at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1011)
          at com.google.inject.internal.InjectorImpl$3.get(InjectorImpl.java:961)
          at com.google.inject.Scopes$1$1.get(Scopes.java:59)
          at org.sonatype.guice.bean.locators.LazyBeanEntry.getValue(LazyBeanEntry.java:83)
          at org.sonatype.guice.plexus.locators.LazyPlexusBean.getValue(LazyPlexusBean.java:49)
          at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:253)
          at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:245)
          at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getConfiguredMojo(DefaultMavenPluginManager.java:455)
          at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:92)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
          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:84)
          at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
          at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
          at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
          at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
          at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
          at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
          at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
          at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
          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:601)
          at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
          at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
          at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
          at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
  Caused by: java.lang.ClassNotFoundException: org.apache.maven.shared.invoker.MavenInvocationException
          at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
          at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:244)
          at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:230)
          ... 54 more
  
  [INFO] ------------------------------------------------------------------------
  [INFO] BUILD FAILURE
  [INFO] ------------------------------------------------------------------------
  [INFO] Total time: 10.952s
  [INFO] Finished at: Tue Mar 12 00:43:48 IST 2013
  [INFO] Final Memory: 7M/109M
  [INFO] ------------------------------------------------------------------------
  [ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.2:generate (default-cli) on project standalone-pom: Execution default-cli of goal org.apache.maven.plugins:maven-archetype-plugin:2.2:generate failed: A required class w
  as missing while executing org.apache.maven.plugins:maven-archetype-plugin:2.2:generate: org/apache/maven/shared/invoker/MavenInvocationException
  [ERROR] -----------------------------------------------------
  [ERROR] realm =    plugin&gt;org.apache.maven.plugins:maven-archetype-plugin:2.2
  [ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
  [ERROR] urls[0] = file:/C:/Users/Oz/.m2/repository/org/apache/maven/plugins/maven-archetype-plugin/2.2/maven-archetype-plugin-2.2.jar
  [ERROR] urls[1] = file:/C:/Users/Oz/.m2/repository/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.jar
  [ERROR] Number of foreign imports: 1
  [ERROR] import: Entry[import  from realm ClassRealm[maven.api, parent: null]]
  [ERROR]
  [ERROR] -----------------------------------------------------: org.apache.maven.shared.invoker.MavenInvocationException
  [ERROR] -&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/PluginContainerException
  C:\Users\Oz&gt;
  </code></pre>
  
  <p>When I manually downloaded the problematic file from:
  <a href="http://repo.maven.apache.org/maven2/org/apache/maven/archetype/maven-archetype/2.2/maven-archetype-2.2.pom" rel="nofollow noreferrer">http://repo.maven.apache.org/maven2/org/apache/maven/archetype/maven-archetype/2.2/maven-archetype-2.2.pom</a>
  I noticed that the file is not formatted well (I guess the XML should be valid and it isn't).</p>
  
  <p>Is it a known bug or am I doing something wrong here?</p>