首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >由于依赖关系错误,Oauth2示例无法工作

由于依赖关系错误,Oauth2示例无法工作
EN

Stack Overflow用户
提问于 2015-10-13 15:01:48
回答 1查看 2.1K关注 0票数 2

我已经从GitHub下载了tonr2spaklr2示例中的tonr2 Maven项目。

在下载完所有jar文件之后,我一直在pom.xml中得到一条错误消息。

代码语言:javascript
复制
<parent>
    <groupId>org.springframework.security.oauth</groupId>
    <artifactId>spring-security-oauth-parent</artifactId>
    <version>2.0.8.BUILD-SNAPSHOT</version>
    <relativePath>../../..</relativePath>
</parent>

它在下面的依赖项中显示了一个错误。

代码语言:javascript
复制
<dependency>
    <groupId>${project.groupId}</groupId>
    <artifactId>spring-security-oauth2</artifactId>
    <version>${project.version}</version>
</dependency>

错误是:

缺失伪影org.springframework.security.oauth:spring-security-oauth2:jar:2.0.8.BUILD-SNAPSHOT

运行命令之后

代码语言:javascript
复制
mvn install -P bootstrap

我发现了下一个错误:

代码语言:javascript
复制
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.
12.4:test (default-test) on project spring-security-oauth2: There are test failu
res.
[ERROR]
[ERROR] Please refer to C:\Users\a.bazaldua.cerda\Desktop\Oauth\spring-security-
oauth-master\spring-security-oauth2\target\surefire-reports for the individual t
est results.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[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 rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureExc
eption
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2015-10-13 15:16:55

要构建春季-安全-oauth项目,首先需要运行以下命令:

代码语言:javascript
复制
mvn clean install -P bootstrap -DskipTests=true

您可以直接在命令行上运行它(这是一个简单的解决方案)。

如果要在Eclipse中直接执行此操作,则需要创建自定义Maven构建。进入"Run > Run配置.“。双击"Maven Build“创建一个新的自定义Maven构建。给它一个名称,选择基本目录到您要构建的项目的工作目录,选择目标“清洁安装”和概要文件“引导”。

完成第一个构建后,在Eclipse中更新Maven项目,您将不再有任何错误。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/33106084

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档