我正在使用SAML One Login Toolkit并从GitHub here获得最新的主分支并使用Eclipse Oxygen。它应该手动解析所有maven依赖项,但遗憾的是它不是。我试图多次删除.m2存储库,但这对我没有帮助。我也试过maven force update。我收到以下错误
Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T21:41:47+05:00)
Maven home: C:\Users\nyousaf\Downloads\java-saml-2.2.0\java-saml-2.2.0\core\EMBEDDED
[INFO] Scanning for projects...
[DEBUG] Extension realms for project com.onelogin:java-saml-core:jar:2.2.0: (none)
[DEBUG] Looking up lifecyle mappings for packaging jar from ClassRealm[plexus.core, parent: null]
[DEBUG] Extension realms for project com.onelogin:java-saml-toolkit:pom:2.2.0: (none)
[DEBUG] Looking up lifecyle mappings for packaging pom from ClassRealm[plexus.core, parent: null]
[DEBUG] === REACTOR BUILD PLAN ================================================
[DEBUG] Project: com.onelogin:java-saml-core:jar:2.2.0
[DEBUG] Tasks: [compile]
[DEBUG] Style: Regular
[DEBUG] =======================================================================
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building OneLogin java-saml Toolkit Core 2.2.0
[INFO] ------------------------------------------------------------------------
[DEBUG] Lifecycle default -> [validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy]
[DEBUG] Lifecycle clean -> [pre-clean, clean, post-clean]
[DEBUG] Lifecycle site -> [pre-site, site, post-site, site-deploy]
[WARNING] The POM for org.jacoco:jacoco-maven-plugin:jar:0.7.7.201606060606 is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.187 s
[INFO] Finished at: 2017-11-01T13:33:47+05:00
[INFO] Final Memory: 6M/123M
[INFO] ------------------------------------------------------------------------
[ERROR] Plugin org.jacoco:jacoco-maven-plugin:0.7.7.201606060606 or one of its dependencies could not be resolved: Cannot access central (http://repo1.maven.org/maven2) in offline mode and the artifact org.jacoco:jacoco-maven-plugin:jar:0.7.7.201606060606 has not been downloaded from it before. -> [Help 1]
org.apache.maven.plugin.PluginResolutionException: Plugin org.jacoco:jacoco-maven-plugin:0.7.7.201606060606 or one of its dependencies could not be resolved: Cannot access central (http://repo1.maven.org/maven2) in offline mode and the artifact org.jacoco:jacoco-maven-plugin:jar:0.7.7.201606060606 has not been downloaded from it before.
at org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver.resolve(DefaultPluginDependenciesResolver.java:128)
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getPluginDescriptor(DefaultMavenPluginManager.java:179)
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getMojoDescriptor(DefaultMavenPluginManager.java:284)
at org.apache.maven.plugin.DefaultBuildPluginManager.getMojoDescriptor(DefaultBuildPluginManager.java:241)
at org.apache.maven.lifecycle.internal.DefaultLifecycleMappingDelegate.calculateLifecycleMappings(DefaultLifecycleMappingDelegate.java:110)
at org.apache.maven.lifecycle.internal.DefaultLifecycleExecutionPlanCalculator.calculateLifecycleMappings(DefaultLifecycleExecutionPlanCalculator.java:266)
at org.apache.maven.lifecycle.internal.DefaultLifecycleExecutionPlanCalculator.calculateMojoExecutions(DefaultLifecycleExecutionPlanCalculator.java:217)
at org.apache.maven.lifecycle.internal.DefaultLifecycleExecutionPlanCalculator.calculateExecutionPlan(DefaultLifecycleExecutionPlanCalculator.java:127)
at org.apache.maven.lifecycle.internal.DefaultLifecycleExecutionPlanCalculator.calculateExecutionPlan(DefaultLifecycleExecutionPlanCalculator.java:145)
at org.apache.maven.lifecycle.internal.builder.BuilderCommon.resolveBuildPlan(BuilderCommon.java:96)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:109)
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:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
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:498)
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.eclipse.aether.resolution.ArtifactResolutionException: Cannot access central (http://repo1.maven.org/maven2) in offline mode and the artifact org.jacoco:jacoco-maven-plugin:jar:0.7.7.201606060606 has not been downloaded from it before.
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:444)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:246)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:223)
at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:294)
at org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver.resolve(DefaultPluginDependenciesResolver.java:124)
... 27 more
Caused by: org.eclipse.aether.transfer.ArtifactNotFoundException: Cannot access central (http://repo1.maven.org/maven2) in offline mode and the artifact org.jacoco:jacoco-maven-plugin:jar:0.7.7.201606060606 has not been downloaded from it before.
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:391)
... 31 more
Caused by: org.eclipse.aether.transfer.RepositoryOfflineException: Cannot access central (http://repo1.maven.org/maven2) in offline mode
at org.eclipse.aether.internal.impl.DefaultOfflineController.checkOffline(DefaultOfflineController.java:72)
at org.eclipse.aether.internal.impl.Utils.checkOffline(Utils.java:115)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:387)
... 31 more
答案 0 :(得分:0)
如果您在公司代理后面并且未配置maven代理,则会发生此错误。 使用this reference启用Maven中的代理设置
答案 1 :(得分:0)
我在 Intellij 中遇到了同样的问题。通过添加这些 VM 参数,我能够成功构建
**-Dmaven.wagon.http.ssl.insecure=true -Dmaven.wagon.http.ssl.allowall=true**
在这些地方:
<块引用>设置 -> 构建工具 -> Maven -> 导入 -> 导入器的 VM 选项
<块引用>设置 -> 构建工具 -> Maven -> Runner -> VM 选项