我已经从GitHub下载了tonr2和spaklr2示例中的tonr2 Maven项目。
在下载完所有jar文件之后,我一直在pom.xml中得到一条错误消息。
<parent>
<groupId>org.springframework.security.oauth</groupId>
<artifactId>spring-security-oauth-parent</artifactId>
<version>2.0.8.BUILD-SNAPSHOT</version>
<relativePath>../../..</relativePath>
</parent>它在下面的依赖项中显示了一个错误。
<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
运行命令之后
mvn install -P bootstrap我发现了下一个错误:
[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发布于 2015-10-13 15:16:55
要构建春季-安全-oauth项目,首先需要运行以下命令:
mvn clean install -P bootstrap -DskipTests=true您可以直接在命令行上运行它(这是一个简单的解决方案)。
如果要在Eclipse中直接执行此操作,则需要创建自定义Maven构建。进入"Run > Run配置.“。双击"Maven Build“创建一个新的自定义Maven构建。给它一个名称,选择基本目录到您要构建的项目的工作目录,选择目标“清洁安装”和概要文件“引导”。
完成第一个构建后,在Eclipse中更新Maven项目,您将不再有任何错误。
https://stackoverflow.com/questions/33106084
复制相似问题