我依赖
<dependency>
<groupId>org.jboss</groupId>
<artifactId>jboss-serialization</artifactId>
<version>1.0.4.Final</version>
</dependency>
( 编辑:版本字符串错误,我在这里发布了正确的字符串。我已使用错误的版本更新了帖子,并且我添加了一个带有解释的答案。)
以下是有关工件的信息的链接: https://maven-repository.com/artifact/org.jboss/jboss-serialization/1.0.4.FINAL
我在Archiva中设置了存储库,但是当解决方案失败时,我将存储库添加到pom中以进行测试:
<repository>
<id>jboss-releases</id>
<url>https://repository.jboss.org/nexus/content/repositories/releases/</url>
</repository>
我仍然收到错误&#34;无法解决依赖...&#34;。 AFAIK我从这个仓库下载了其他工件,我可以用我的浏览器下载jar / pom。是什么给了??
堆栈追踪:
[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
答案 0 :(得分:0)
这是因为自签名证书导致的ssl错误。一种选择是在您的存储库网址中使用http
而不是https
。
如果您想使用https,这可能会对您有所帮助:Problems using Maven and SSL behind proxy
答案 1 :(得分:0)
Whoopsie!我犯了一个愚蠢的错误。
我发布了从链接页面复制的依赖项部分。但我的父母POM中有另一个版本标签!它是1.0.4- 最终,但版本区分大小写,应该是1.0.4- FINAL 。
现在有效。我的坏!