maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Gainty <mgai...@hotmail.com>
Subject RE: maven + SNI == problems?
Date Thu, 21 Aug 2014 15:08:31 GMT



> From: minfrin@sharp.fm
> Subject: maven + SNI == problems?
> Date: Wed, 20 Aug 2014 22:37:36 +0200
> To: users@maven.apache.org
> 
> Hi all,
> 
> I just tied to do a simple “mvn install” against a long-since-working maven repository
that is hosted on an SSL client-certificate protected server using SNI, and I get the exception
below.
> 
> I see in the stacktrace the default is httpclient, which has very patchy support for
SSL/SNI. Is there a workaround to downgrade to a wagon that works with SSL and SNI?
> 
> Apache Maven 3.2.3 (33f8c3e1027c3ddde99d3cdebad2656a31e8fdf4; 2014-08-11T22:58:10+02:00)
> Java version: 1.8.0_11, vendor: Oracle Corporation
> 
> [ERROR] Failed to execute goal on project XXX: Could not resolve dependencies for project
XXX:war:1.0.0-SNAPSHOT: Failed to collect dependencies at XXX:jar:1.23: Failed to read artifact
descriptor for XXX:jar:1.23: Could not transfer artifact XXX from/to XXX (https://repo.example.com/XXX/maven2):
hostname in certificate didn't match: <repo.example.com> != <nexus.example.com>
OR <nexus.example.com> OR <nexus.slg.example.com> OR <nexus.slg1.example.com>
OR <nexus.slg2.example.com> -> [Help 1]
> org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal on project
XXX: Could not resolve dependencies for project XXX:war:1.0.0-SNAPSHOT: Failed to collect
dependencies at XXX:jar:1.23
> 	at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDependencies(LifecycleDependencyResolver.java:220)
> 	at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.resolveProjectDependencies(LifecycleDependencyResolver.java:127)
> 	at org.apache.maven.lifecycle.internal.MojoExecutor.ensureDependenciesAreResolved(MojoExecutor.java:257)
> 	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:200)
> 	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:347)
> 	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:154)
> 	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:582)
> 	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
> 	at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:483)
> 	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.project.DependencyResolutionException: Could not resolve
dependencies for project XXX:war:1.0.0-SNAPSHOT: Failed to collect dependencies at XXX:jar:1.23
> 	at org.apache.maven.project.DefaultProjectDependenciesResolver.resolve(DefaultProjectDependenciesResolver.java:167)
> 	at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDependencies(LifecycleDependencyResolver.java:195)
> 	... 22 more
> Caused by: org.eclipse.aether.collection.DependencyCollectionException: Failed to collect
dependencies at XXX:jar:1.23
> 	at org.eclipse.aether.internal.impl.DefaultDependencyCollector.collectDependencies(DefaultDependencyCollector.java:292)
> 	at org.eclipse.aether.internal.impl.DefaultRepositorySystem.collectDependencies(DefaultRepositorySystem.java:317)
> 	at org.apache.maven.project.DefaultProjectDependenciesResolver.resolve(DefaultProjectDependenciesResolver.java:159)
> 	... 23 more
> Caused by: org.eclipse.aether.resolution.ArtifactDescriptorException: Failed to read
artifact descriptor for XXX:jar:1.23
> 	at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:349)
> 	at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.readArtifactDescriptor(DefaultArtifactDescriptorReader.java:231)
> 	at org.eclipse.aether.internal.impl.DefaultDependencyCollector.process(DefaultDependencyCollector.java:461)
> 	at org.eclipse.aether.internal.impl.DefaultDependencyCollector.collectDependencies(DefaultDependencyCollector.java:261)
> 	... 25 more
> Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: Could not transfer
artifact XXX:pom:1.23 from/to XXX (https://repo.example.com/XXX/maven2): hostname in certificate
didn't match: <repo.example.com> != <nexus.example.com> OR <nexus.example.com>
OR <nexus.slg.example.com> OR <nexus.slg1.example.com> OR <nexus.slg2.example.com>
MG>
MG>The hostname that the cert is bound to != HostNameYouAreProviding
MG>determine the hostname which the cert is using and use that instead
MG>OR create a new cert from the key provided (jks)..here are the instructions
MG>http://docs.oracle.com/cd/E19798-01/821-1841/gjrgy/index.html
MG>pay particular attention to host= attribute which usually is localhost
MG>
> 	at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:459)
> 	at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:262)
> 	at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:239)
> 	at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:334)
> 	... 28 more
> Caused by: org.eclipse.aether.transfer.ArtifactTransferException: Could not transfer
artifact XXX:pom:1.23 from/to XXX (https://repo.example.com/XXX/maven2): hostname in certificate
didn't match: <repo.example.com> != <nexus.example.com> OR <nexus.example.com>
OR <nexus.slg.example.com> OR <nexus.slg1.example.com> OR <nexus.slg2.example.com>
> 	at org.eclipse.aether.connector.wagon.WagonRepositoryConnector$6.wrap(WagonRepositoryConnector.java:1016)
> 	at org.eclipse.aether.connector.wagon.WagonRepositoryConnector$6.wrap(WagonRepositoryConnector.java:1004)
> 	at org.eclipse.aether.connector.wagon.WagonRepositoryConnector$GetTask.run(WagonRepositoryConnector.java:725)
> 	at org.eclipse.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:67)
> 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> 	at java.lang.Thread.run(Thread.java:745)
> Caused by: org.apache.maven.wagon.TransferFailedException: hostname in certificate didn't
match: <repo.example.com> != <nexus.example.com> OR <nexus.example.com>
OR <nexus.slg.example.com> OR <nexus.slg1.example.com> OR <nexus.slg2.example.com>
> 	at org.apache.maven.wagon.providers.http.AbstractHttpClientWagon.fillInputData(AbstractHttpClientWagon.java:935)
> 	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.eclipse.aether.connector.wagon.WagonRepositoryConnector$GetTask.run(WagonRepositoryConnector.java:660)
> 	... 4 more
> Caused by: javax.net.ssl.SSLException: hostname in certificate didn't match: <repo.example.com>
!= <nexus.example.com> OR <nexus.example.com> OR <nexus.slg.example.com>
OR <nexus.slg1.example.com> OR <nexus.slg2.example.com>
> 	at org.apache.maven.wagon.providers.http.httpclient.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java:231)
> 	at org.apache.maven.wagon.providers.http.httpclient.conn.ssl.BrowserCompatHostnameVerifier.verify(BrowserCompatHostnameVerifier.java:54)
> 	at org.apache.maven.wagon.providers.http.httpclient.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java:152)
> 	at org.apache.maven.wagon.providers.http.httpclient.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java:133)
> 	at org.apache.maven.wagon.providers.http.httpclient.conn.ssl.SSLConnectionSocketFactory.verifyHostname(SSLConnectionSocketFactory.java:291)
> 	at org.apache.maven.wagon.providers.http.httpclient.conn.ssl.SSLConnectionSocketFactory.connectSocket(SSLConnectionSocketFactory.java:262)
> 	at org.apache.maven.wagon.providers.http.httpclient.impl.conn.HttpClientConnectionOperator.connect(HttpClientConnectionOperator.java:118)
> 	at org.apache.maven.wagon.providers.http.httpclient.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:314)
> 	at org.apache.maven.wagon.providers.http.httpclient.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:357)
> 	at org.apache.maven.wagon.providers.http.httpclient.impl.execchain.MainClientExec.execute(MainClientExec.java:218)
> 	at org.apache.maven.wagon.providers.http.httpclient.impl.execchain.ProtocolExec.execute(ProtocolExec.java:194)
> 	at org.apache.maven.wagon.providers.http.httpclient.impl.execchain.RetryExec.execute(RetryExec.java:85)
> 	at org.apache.maven.wagon.providers.http.httpclient.impl.execchain.RedirectExec.execute(RedirectExec.java:108)
> 	at org.apache.maven.wagon.providers.http.httpclient.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:186)
> 	at org.apache.maven.wagon.providers.http.httpclient.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82)
> 	at org.apache.maven.wagon.providers.http.AbstractHttpClientWagon.execute(AbstractHttpClientWagon.java:756)
> 	at org.apache.maven.wagon.providers.http.AbstractHttpClientWagon.fillInputData(AbstractHttpClientWagon.java:854)
> 	... 8 more
> [ERROR] 
> [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
> 
> Regards,
> Graham
> —
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
 		 	   		  
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message