Uploaded image for project: 'Fedora Repository Project'
  1. Fedora Repository Project
  2. FCREPO-1219

Maven fails to resolve dependency due to SSL Exception

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: Fedora 3.8.0
    • Fix Version/s: Fedora 3.8.0
    • Component/s: legacy - Fedora
    • Labels:
      None

      Description

      Using a fresh Maven setup (empty local repository), Maven can not resolve dependencies for project org.fcrepo:fcrepo-common. Looks like there is an SSL issue with https://m2.duraspace.org/content/repositories/releases.

      The repository is accessible via web browser but Maven always stops the resolving process with "peer not authenticated" error.

      I tried to trick Maven into accepting all SSL with http://stackoverflow.com/questions/21252800/maven-trusting-all-certs-unlimited-java-policy, but this just leads to "unable to find valid certification path to requested target" error.

      Here is the Maven output:

      [INFO] ------------------------------------------------------------------------
      [INFO] Reactor Summary:
      [INFO]
      [INFO] Fedora Repository Project ......................... SUCCESS [0.610s]
      [INFO] Fedora Common Library ............................. FAILURE [1.317s]
      [INFO] Fedora Server Library ............................. SKIPPED
      [INFO] All Fedora Clients ................................ SKIPPED
      [INFO] Fedora Admin Client (Swing) ....................... SKIPPED
      [INFO] Fedora Messaging Client Library ................... SKIPPED
      [INFO] Fedora Security Modules ........................... SKIPPED
      [INFO] Fedora Security PDP ............................... SKIPPED
      [INFO] Fedora JAAS Authentication ........................ SKIPPED
      [INFO] Fedora Security PEP ............................... SKIPPED
      [INFO] Fedora HTTP-sourced Authentication ................ SKIPPED
      [INFO] All Fedora Webapps ................................ SKIPPED
      [INFO] Fedora Webapp ..................................... SKIPPED
      [INFO] Fedora Webapp - Demo Content ...................... SKIPPED
      [INFO] Fedora Webapp - Formatting Objects Processor ...... SKIPPED
      [INFO] Fedora Webapp - Saxon XSLT Processor .............. SKIPPED
      [INFO] Fedora Webapp - Image Manipulation ................ SKIPPED
      [INFO] Fedora Installer .................................. SKIPPED
      [INFO] Fedora Integration Test ........................... SKIPPED
      [INFO] Fedora Integration Test - Basic Tests and Resources SKIPPED
      [INFO] Fedora Integration Test - Configuration A ......... SKIPPED
      [INFO] Fedora Integration Test - Configuration B ......... SKIPPED
      [INFO] Fedora Integration Test - Configuration C ......... SKIPPED
      [INFO] Fedora Integration Test - Configuration Q ......... SKIPPED
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD FAILURE
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 2.922s
      [INFO] Finished at: Fri Aug 08 09:18:20 CEST 2014
      [INFO] Final Memory: 21M/430M
      [INFO] ------------------------------------------------------------------------
      [ERROR] Failed to execute goal on project fcrepo-common: Could not resolve dependencies for project org.fcrepo:fcrepo-common:jar:3.7.2-SNAPSHOT: Failed to collect dependencies for [commons-codec:commons-codec:jar:1.7 (compile), org.apache.httpcomponents:httpclient:jar:4.2.5 (compile), org.apache.httpcomponents:httpmime:jar:4.2.5 (compile), javax.xml:jaxrpc-api:jar:1.1 (compile), org.fcrepo:mulgara-core:jar:2.1.13 (compile), org.jboss.security:jboss-sunxacml:jar:2.0.9.Final (compile), wsdl4j:wsdl4j:jar:1.6.2 (compile), org.slf4j:slf4j-api:jar:1.7.2 (compile), org.slf4j:log4j-over-slf4j:jar:1.7.2 (runtime), org.slf4j:jcl-over-slf4j:jar:1.7.2 (runtime), dom4j:dom4j:jar:1.6.1 (compile), org.fcrepo:saxon:jar:9.0 (compile), javax.servlet:servlet-api:jar:2.4 (provided), joda-time:joda-time:jar:1.5.2 (compile), commons-pool:commons-pool:jar:1.6 (compile), commons-io:commons-io:jar:2.4 (compile), junit:junit:jar:4.10 (test)]: Failed to read artifact descriptor for org.fcrepo:mulgara-core:jar:2.1.13: Could not transfer artifact org.fcrepo:mulgara-core:pom:2.1.13 from/to duraspace-releases (https://m2.duraspace.org/content/repositories/releases): peer not authenticated -> [Help 1]
      org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal on project fcrepo-common: Could not resolve dependencies for project org.fcrepo:fcrepo-common:jar:3.7.2-SNAPSHOT: Failed to collect dependencies for [commons-codec:commons-codec:jar:1.7 (compile), org.apache.httpcomponents:httpclient:jar:4.2.5 (compile), org.apache.httpcomponents:httpmime:jar:4.2.5 (compile), javax.xml:jaxrpc-api:jar:1.1 (compile), org.fcrepo:mulgara-core:jar:2.1.13 (compile), org.jboss.security:jboss-sunxacml:jar:2.0.9.Final (compile), wsdl4j:wsdl4j:jar:1.6.2 (compile), org.slf4j:slf4j-api:jar:1.7.2 (compile), org.slf4j:log4j-over-slf4j:jar:1.7.2 (runtime), org.slf4j:jcl-over-slf4j:jar:1.7.2 (runtime), dom4j:dom4j:jar:1.6.1 (compile), org.fcrepo:saxon:jar:9.0 (compile), javax.servlet:servlet-api:jar:2.4 (provided), joda-time:joda-time:jar:1.5.2 (compile), commons-pool:commons-pool:jar:1.6 (compile), commons-io:commons-io:jar:2.4 (compile), junit:junit:jar:4.10 (test)]
      at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDependencies(LifecycleDependencyResolver.java:210)
      at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.resolveProjectDependencies(LifecycleDependencyResolver.java:117)
      at org.apache.maven.lifecycle.internal.MojoExecutor.ensureDependenciesAreResolved(MojoExecutor.java:258)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:201)
      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: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.project.DependencyResolutionException: Could not resolve dependencies for project org.fcrepo:fcrepo-common:jar:3.7.2-SNAPSHOT: Failed to collect dependencies for [commons-codec:commons-codec:jar:1.7 (compile), org.apache.httpcomponents:httpclient:jar:4.2.5 (compile), org.apache.httpcomponents:httpmime:jar:4.2.5 (compile), javax.xml:jaxrpc-api:jar:1.1 (compile), org.fcrepo:mulgara-core:jar:2.1.13 (compile), org.jboss.security:jboss-sunxacml:jar:2.0.9.Final (compile), wsdl4j:wsdl4j:jar:1.6.2 (compile), org.slf4j:slf4j-api:jar:1.7.2 (compile), org.slf4j:log4j-over-slf4j:jar:1.7.2 (runtime), org.slf4j:jcl-over-slf4j:jar:1.7.2 (runtime), dom4j:dom4j:jar:1.6.1 (compile), org.fcrepo:saxon:jar:9.0 (compile), javax.servlet:servlet-api:jar:2.4 (provided), joda-time:joda-time:jar:1.5.2 (compile), commons-pool:commons-pool:jar:1.6 (compile), commons-io:commons-io:jar:2.4 (compile), junit:junit:jar:4.10 (test)]
      at org.apache.maven.project.DefaultProjectDependenciesResolver.resolve(DefaultProjectDependenciesResolver.java:158)
      at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDependencies(LifecycleDependencyResolver.java:185)
      ... 22 more
      Caused by: org.sonatype.aether.collection.DependencyCollectionException: Failed to collect dependencies for [commons-codec:commons-codec:jar:1.7 (compile), org.apache.httpcomponents:httpclient:jar:4.2.5 (compile), org.apache.httpcomponents:httpmime:jar:4.2.5 (compile), javax.xml:jaxrpc-api:jar:1.1 (compile), org.fcrepo:mulgara-core:jar:2.1.13 (compile), org.jboss.security:jboss-sunxacml:jar:2.0.9.Final (compile), wsdl4j:wsdl4j:jar:1.6.2 (compile), org.slf4j:slf4j-api:jar:1.7.2 (compile), org.slf4j:log4j-over-slf4j:jar:1.7.2 (runtime), org.slf4j:jcl-over-slf4j:jar:1.7.2 (runtime), dom4j:dom4j:jar:1.6.1 (compile), org.fcrepo:saxon:jar:9.0 (compile), javax.servlet:servlet-api:jar:2.4 (provided), joda-time:joda-time:jar:1.5.2 (compile), commons-pool:commons-pool:jar:1.6 (compile), commons-io:commons-io:jar:2.4 (compile), junit:junit:jar:4.10 (test)]
      at org.sonatype.aether.impl.internal.DefaultDependencyCollector.collectDependencies(DefaultDependencyCollector.java:258)
      at org.sonatype.aether.impl.internal.DefaultRepositorySystem.collectDependencies(DefaultRepositorySystem.java:308)
      at org.apache.maven.project.DefaultProjectDependenciesResolver.resolve(DefaultProjectDependenciesResolver.java:150)
      ... 23 more
      Caused by: org.sonatype.aether.resolution.ArtifactDescriptorException: Failed to read artifact descriptor for org.fcrepo:mulgara-core:jar:2.1.13
      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.DefaultDependencyCollector.process(DefaultDependencyCollector.java:412)
      at org.sonatype.aether.impl.internal.DefaultDependencyCollector.collectDependencies(DefaultDependencyCollector.java:240)
      ... 25 more
      Caused by: org.sonatype.aether.resolution.ArtifactResolutionException: Could not transfer artifact org.fcrepo:mulgara-core:pom:2.1.13 from/to duraspace-releases (https://m2.duraspace.org/content/repositories/releases): 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)
      ... 28 more
      Caused by: org.sonatype.aether.transfer.ArtifactTransferException: Could not transfer artifact org.fcrepo:mulgara-core:pom:2.1.13 from/to duraspace-releases (https://m2.duraspace.org/content/repositories/releases): 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:939)
      at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$GetTask.run(WagonRepositoryConnector.java:669)
      at org.sonatype.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:60)
      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:744)
      Caused by: org.apache.maven.wagon.TransferFailedException: peer not authenticated
      at org.apache.maven.wagon.providers.http.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.connectSocket(SSLSocketFactory.java:437)
      at org.apache.maven.wagon.providers.http.ConfigurableSSLSocketFactoryDecorator.connectSocket(ConfigurableSSLSocketFactoryDecorator.java:64)
      at org.apache.maven.wagon.providers.http.httpclient.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:180)
      at org.apache.maven.wagon.providers.http.httpclient.impl.conn.ManagedClientConnectionImpl.open(ManagedClientConnectionImpl.java:294)
      at org.apache.maven.wagon.providers.http.httpclient.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:643)
      at org.apache.maven.wagon.providers.http.httpclient.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:479)
      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.providers.http.AbstractHttpClientWagon.execute(AbstractHttpClientWagon.java:746)
      at org.apache.maven.wagon.providers.http.AbstractHttpClientWagon.fillInputData(AbstractHttpClientWagon.java:886)
      ... 8 more

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                sprater Scott Prater
                Reporter:
                claussni Ralf Claussnitzer
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: