我正在尝试从以下位置运行picketlink快速入门:
https://github.com/jboss-developer/jboss-picketlink-quickstarts
进一步来说:
https://github.com/jboss-developer/jboss-picketlink-quickstarts/tree/master/picketlink-federation-saml-idp-basic
但是在每次尝试安装Maven依赖项时,我都会遇到下一个错误:
Could not find artifact org.picketlink.distribution:picketlink-jbas7:jar:2.8.0.Beta1-SNAPSHOT
这是我
$ mvn clean package jboss-as:deploy
之后的完整日志[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building PicketLink Quickstart: picketlink-federation-saml-idp-basic 2.8.0.Beta1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for org.picketlink.distribution:picketlink-jbas7:jar:2.8.0.Beta1-SNAPSHOT is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.650 s
[INFO] Finished at: 2015-10-17T01:39:15-05:00
[INFO] Final Memory: 6M/80M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project picketlink-federation-saml-idp-basic: Could not resolve dependencies for project org.picketlink.quickstarts:picketlink-federation-saml-idp-basic:war:2.8.0.Beta1-SNAPSHOT: Could not find artifact org.picketlink.distribution:picketlink-jbas7:jar:2.8.0.Beta1-SNAPSHOT -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[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
我已经看到您可能需要在您的maven文件夹中添加settings.xml,但是我不知道该文件的制作方法或内容。
最佳答案
正如您已经说过的那样,maven告诉您org.picketlink.distribution:picketlink-jbas7:jar:2.8.0.Beta1-SNAPSHOT
依赖项丢失了,我相信这是因为您以前没有安装它。
如我所见,jboss-picketlink-quickstarts
是一堆具有父级pom.xml
的项目,您可以在其中找到作为模块的项目:
<module>picketlink-federation-saml-idp-basic</module>
因此,您必须克隆整个
jboss-picketlink-quickstarts
项目并从父项目运行mvn install
。这将带您所有需要解析到本地Maven存储库(通常为
~/.m2/repository
)的依赖项。试试看,它将解决您的依赖性。有时,您必须使用
-U
调用maven来强制-SNAPSHOT
依赖性。希望能帮助到你!