title: "Peer Not Authenticated" in maven when trying to run a job in JENKINS
body: <p>When I try running a maven job in Jenkins, the build is not successful. </p>
  
  <p>The error message in the console displays the following :</p>
  
  <pre><code>[INFO] ------------------------------------------------------------------------
  Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-       resources-plugin/2.5/maven-resources-plugin-2.5.pom
  [INFO] ------------------------------------------------------------------------
  [INFO] BUILD FAILURE
  [INFO] ------------------------------------------------------------------------
  [INFO] Total time: 0.640s
  [INFO] Finished at: Tue Aug 20 11:21:36 EST 2013
  [INFO] Final Memory: 6M/16M
  [INFO] ------------------------------------------------------------------------
  mavenExecutionResult exceptions not empty
  message : Plugin org.apache.maven.plugins:maven-resources-plugin:2.5 or one of its     dependencies could not be resolved: Failed to read artifact descriptor for         org.apache.maven.plugins:maven-resources-plugin:jar:2.5
  cause : Failed to read artifact descriptor for org.apache.maven.plugins:maven-    resources-plugin:jar:2.5
  Stack trace : 
  
  
  org.apache.maven.plugin.PluginResolutionException: Plugin org.apache.maven.plugins:maven-resources-plugin:2.5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.5
  at org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver.resolve(DefaultPluginDependenciesResolver.java:129)
  at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getPluginDescriptor(DefaultMavenPluginManager.java:142)
  at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getMojoDescriptor(DefaultMavenPluginManager.java:261)
  at org.apache.maven.plugin.DefaultBuildPluginManager.getMojoDescriptor(DefaultBuildPluginManager.java:185)
  at org.apache.maven.lifecycle.internal.DefaultLifecycleExecutionPlanCalculator.setupMojoExecution(DefaultLifecycleExecutionPlanCalculator.java:152)
  at org.apache.maven.lifecycle.internal.DefaultLifecycleExecutionPlanCalculator.setupMojoExecutions(DefaultLifecycleExecutionPlanCalculator.java:139)
  at org.apache.maven.lifecycle.internal.DefaultLifecycleExecutionPlanCalculator.calculateExecutionPlan(DefaultLifecycleExecutionPlanCalculator.java:116)
  at org.apache.maven.lifecycle.internal.DefaultLifecycleExecutionPlanCalculator.calculateExecutionPlan(DefaultLifecycleExecutionPlanCalculator.java:129)
  at org.apache.maven.lifecycle.internal.BuilderCommon.resolveBuildPlan(BuilderCommon.java:92)
  at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
  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.jvnet.hudson.maven3.launcher.Maven3Launcher.main(Maven3Launcher.java:79)
  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.launchStandard(Launcher.java:329)
  at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:239)
  at org.jvnet.hudson.maven3.agent.Maven3Main.launch(Maven3Main.java:158)
  at hudson.maven.Maven3Builder.call(Maven3Builder.java:100)
  at hudson.maven.Maven3Builder.call(Maven3Builder.java:66)
  at hudson.remoting.UserRequest.perform(UserRequest.java:118)
  at hudson.remoting.UserRequest.perform(UserRequest.java:48)
  at hudson.remoting.Request$2.run(Request.java:326)
  at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
  at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
  at java.util.concurrent.FutureTask.run(FutureTask.java:166)
  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
  at java.lang.Thread.run(Thread.java:724)
  Caused by: org.sonatype.aether.resolution.ArtifactDescriptorException: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.5
  at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:296)
  at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.readArtifactDescriptor(DefaultArtifactDescriptorReader.java:186)
  at org.sonatype.aether.impl.internal.DefaultRepositorySystem.readArtifactDescriptor(DefaultRepositorySystem.java:279)
  at org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver.resolve(DefaultPluginDependenciesResolver.java:115)
  ... 33 more
  Caused by: org.sonatype.aether.resolution.ArtifactResolutionException: Could not transfer artifact org.apache.maven.plugins:maven-resources-plugin:pom:2.5 from/to central (http://repo.maven.apache.org/maven2): peer not authenticated
  at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:538)
  at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:216)
  at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:193)
  at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:281)
  ... 36 more
  Caused by: org.sonatype.aether.transfer.ArtifactTransferException: Could not transfer artifact org.apache.maven.plugins:maven-resources-plugin:pom:2.5 from/to central (http://repo.maven.apache.org/maven2): peer not authenticated
  at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:951)
  at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:941)
  at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$GetTask.run(WagonRepositoryConnector.java:669)
  at org.sonatype.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:60)
  ... 3 more
  Caused by: org.apache.maven.wagon.TransferFailedException: peer not authenticated
  at org.apache.maven.wagon.shared.http4.AbstractHttpClientWagon.fillInputData(AbstractHttpClientWagon.java:892)
  at org.apache.maven.wagon.StreamWagon.getInputStream(StreamWagon.java:116)
  at org.apache.maven.wagon.StreamWagon.getIfNewer(StreamWagon.java:88)
  at org.apache.maven.wagon.StreamWagon.get(StreamWagon.java:61)
  at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$GetTask.run(WagonRepositoryConnector.java:601)
  ... 4 more
  Caused by: javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated
  at sun.security.ssl.SSLSessionImpl.getPeerCertificates(SSLSessionImpl.java:397)
  at org.apache.maven.wagon.providers.http.httpclient.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java:126)
  at org.apache.maven.wagon.providers.http.httpclient.conn.ssl.SSLSocketFactory.createLayeredSocket(SSLSocketFactory.java:628)
  at org.apache.maven.wagon.shared.http4.ConfigurableSSLSocketFactoryDecorator.createLayeredSocket(ConfigurableSSLSocketFactoryDecorator.java:57)
  at org.apache.maven.wagon.providers.http.httpclient.impl.conn.DefaultClientConnectionOperator.updateSecureConnection(DefaultClientConnectionOperator.java:232)
  at org.apache.maven.wagon.providers.http.httpclient.impl.conn.ManagedClientConnectionImpl.layerProtocol(ManagedClientConnectionImpl.java:401)
  at org.apache.maven.wagon.providers.http.httpclient.impl.client.DefaultRequestDirector.establishRoute(DefaultRequestDirector.java:842)
  at org.apache.maven.wagon.providers.http.httpclient.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:649)
  at org.apache.maven.wagon.providers.http.httpclient.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:480)
  at org.apache.maven.wagon.providers.http.httpclient.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:906)
  at org.apache.maven.wagon.providers.http.httpclient.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:805)
  at org.apache.maven.wagon.shared.http4.AbstractHttpClientWagon.execute(AbstractHttpClientWagon.java:746)
  at org.apache.maven.wagon.shared.http4.AbstractHttpClientWagon.fillInputData(AbstractHttpClientWagon.java:886)
  ... 8 more
  channel stopped
  Picked up JAVA_TOOL_OPTIONS: -agentlib:jvmhook
  Picked up _JAVA_OPTIONS: -Xrunjvmhook -    Xbootclasspath/a:C:\PROGRA~1\HP\QUICKT~1\bin\JAVA_S~1\classes;C:\PROGRA~1\HP\QUICKT~1\bin\J    AVA_S~1\classes\jasmine.jar
  Finished: FAILURE
  </code></pre>
  
  <p>I'm able to get to know the root cause of the error is some authentication issue("peer not authenticated"). But not able to get it resolved as I am not aware what authetication I need to key in and where to key in. </p>
  
  <p>Additional details : I am using Maven 3.0.3 and JDK 1.7</p>
  
  <p>Thanks in advance for your time in helping me resolving the issue. Let me know if you need any additional info.</p>
  
  <p>Thanks</p>