0

I have a dependency on

<dependency>
  <groupId>org.jboss</groupId>
  <artifactId>jboss-serialization</artifactId>
  <version>1.0.4.Final</version>
</dependency>

( Version string was wrong and I posted the right one here. I've updated the post with the wrong version and I'm adding an answer with an explanation.)

Here is a link with infos about the artifact: https://mvnrepository.com/artifact/org.jboss/jboss-serialization/1.0.4.FINAL

I have the repository set-up in Archiva, but when the resolution failed, I added the repo to the pom for testing purposes:

  <repository>
    <id>jboss-releases</id>
    <url>https://repository.jboss.org/nexus/content/repositories/releases/</url>
  </repository>

Still I get an error "Could not resolve dependency...". AFAIK I have downloaded other artifacts from this repo and I can download the jar/pom with my browser. What gives??

Stack Trace:

[INFO] ------------------------------------------------------------------------
[INFO] Building project3 EJB module 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
Downloading: http://repository.jboss.org/nexus/content/repositories/releases/org/jboss/jboss-serialization/1.0.4.Final/jboss-serialization-1.0.4.Final.pom
Downloading: http://svn.redacted.xyz:8080/repository/internal/org/jboss/jboss-serialization/1.0.4.Final/jboss-serialization-1.0.4.Final.pom
Downloading: http://repo.maven.apache.org/maven2/org/jboss/jboss-serialization/1.0.4.Final/jboss-serialization-1.0.4.Final.pom
[WARNING] The POM for org.jboss:jboss-serialization:jar:1.0.4.Final is missing, no dependency information available
Downloading: http://repository.jboss.org/nexus/content/repositories/releases/org/jboss/jboss-serialization/1.0.4.Final/jboss-serialization-1.0.4.Final.jar
Downloading: http://svn.redacted.xyz:8080/repository/internal/org/jboss/jboss-serialization/1.0.4.Final/jboss-serialization-1.0.4.Final.jar
Downloading: http://repo.maven.apache.org/maven2/org/jboss/jboss-serialization/1.0.4.Final/jboss-serialization-1.0.4.Final.jar
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] project3 EJB module ................................. FAILURE [8.361s]
[INFO] project3 Web module ................................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 9.063s
[INFO] Finished at: Fri Jan 29 12:02:09 CET 2016
[INFO] Final Memory: 14M/225M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project project3-ejb: Could not resolve dependencies for project xyz.redacted:project3-ejb:ejb:1.0-SNAPSHOT: Could not find artifact org.jboss:jboss-serialization:jar:1.0.4.Final in jboss-releases (http://repository.jboss.org/nexus/content/repositories/releases/) -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal on project project3-ejb: Could not resolve dependencies for project xyz.redacted:project3-ejb:ejb:1.0-SNAPSHOT: Could not find artifact org.jboss:jboss-serialization:jar:1.0.4.Final in jboss-releases (http://repository.jboss.org/nexus/content/repositories/releases/)
        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:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        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: org.apache.maven.project.DependencyResolutionException: Could not resolve dependencies for project xyz.redacted:project3-ejb:ejb:1.0-SNAPSHOT: Could not find artifact org.jboss:jboss-serialization:jar:1.0.4.Final in jboss-releases (http://repository.jboss.org/nexus/content/repositories/releases/)
        at org.apache.maven.project.DefaultProjectDependenciesResolver.resolve(DefaultProjectDependenciesResolver.java:189)
        at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDependencies(LifecycleDependencyResolver.java:185)
        ... 22 more
Caused by: org.sonatype.aether.resolution.DependencyResolutionException: Could not find artifact org.jboss:jboss-serialization:jar:1.0.4.Final in jboss-releases (http://repository.jboss.org/nexus/content/repositories/releases/)
        at org.sonatype.aether.impl.internal.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:375)
        at org.apache.maven.project.DefaultProjectDependenciesResolver.resolve(DefaultProjectDependenciesResolver.java:183)
        ... 23 more
Caused by: org.sonatype.aether.resolution.ArtifactResolutionException: Could not find artifact org.jboss:jboss-serialization:jar:1.0.4.Final in jboss-releases (http://repository.jboss.org/nexus/content/repositories/releases/)
        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.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:358)
        ... 24 more
Caused by: org.sonatype.aether.transfer.ArtifactNotFoundException: Could not find artifact org.jboss:jboss-serialization:jar:1.0.4.Final in jboss-releases (http://repository.jboss.org/nexus/content/repositories/releases/)
        at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:947)
        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)
        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)
[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/DependencyResolutionException
Zoe
  • 27,060
  • 21
  • 118
  • 148
Benjamin Maurer
  • 3,602
  • 5
  • 28
  • 49
  • It is usually a good idea to include the complete stacktrace of an error. Which in this case would have included `unable to find valid certification path to requested target` – sinclair Jan 29 '16 at 10:28

2 Answers2

0

This results from a ssl error because of a self-signed certificate. One option would be to use http instead of https in your repository url.

If you want to use https this might help you: Problems using Maven and SSL behind proxy

Community
  • 1
  • 1
sinclair
  • 2,812
  • 4
  • 24
  • 53
0

Whoopsie! I made a stupid mistake.

I posted the dependency section I copied from the linked page. But I had another version tag in my parent-POM! It was 1.0.4-Final, but the version is case-sensitive and it should be 1.0.4-FINAL.

It works now. My bad!

Benjamin Maurer
  • 3,602
  • 5
  • 28
  • 49