购买Spring Data book并尝试在mS上“安装”示例代码并具有以下内容:
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
//这是Maven输出
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] Spring Data Book
[INFO] Spring Data Book - JPA
[INFO] Spring Data Book - MongoDB
[INFO] Spring Data Book - Querydsl
[INFO] Spring Data Book - Neo4J
[INFO] Spring Data Book - JDBC
[INFO] Spring Data Book - Redis
[INFO] Spring Data Book - GemFire
[INFO] Spring Data Book - REST exporter
[INFO]
[INFO]
[INFO] Building Spring Data Book 1.0.0.BUILD-SNAPSHOT
[INFO]
[INFO] Installing C:\spring-data-book\pom.xml to C:\Users\A27L4PT\.m2\repository\com\oreilly\springdata\spring-data-book\1.0.0.BUILD-SNAPSHOT\spring-data-book-1.0.0.BUILD-SNAPSHOT.pom
[INFO]
[INFO]
[INFO] Building Spring Data Book - JPA 1.0.0.BUILD-SNAPSHOT
[INFO
[WARNING] The POM for org.apache.maven.plugins:maven-surefire-plugin:jar:2.1.6 is missing, no dependency information available
[INFO]
[INFO] Reactor Summary:
[INFO]
[INFO] Spring Data Book .................................. SUCCESS [3.292s]
[INFO] Spring Data Book - JPA ............................ FAILURE [0.074s]
[INFO] Spring Data Book - MongoDB ........................ SKIPPED
[INFO] Spring Data Book - Querydsl ....................... SKIPPED
[INFO] Spring Data Book - Neo4J .......................... SKIPPED
[INFO] Spring Data Book - JDBC ........................... SKIPPED
[INFO] Spring Data Book - Redis .......................... SKIPPED
[INFO] Spring Data Book - GemFire ........................ SKIPPED
[INFO] Spring Data Book - REST exporter .................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.592s
[INFO] Finished at: Mon Feb 17 11:34:55 EST 2014
[INFO] Final Memory: 5M/15M
[INFO] ------------------------------------------------------------------------
[ERROR] Plugin org.apache.maven.plugins:maven-surefire-plugin:2.1.6 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-surefire-plugin:jar:2.1.6: Failure to find org.apache.maven.plugins:maven-surefire-plugin:pom:2.1.6 in http://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [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]
答案 0 :(得分:0)
为您的依赖项添加surefire。
<dependency>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.16</version>
</dependency>
此版本可能有误。在http://mvnrepository.com/artifact/org.apache.maven.plugins/maven-surefire-plugin
上找不到2.1.6答案 1 :(得分:0)
显然,其中一个源文件中存在拼写错误。搜索所有pom.xml文件中的“2.16”并在验证您正在处理surefire插件版本后,将其更改为“2.1.6”,即截至今天为the latest valid version。
如果在pom文件中找不到对此版本的任何引用,则将插件管理部分添加到根pom.xml:
<build>
...
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.1.6</version>
</plugin>
</plugins>
</pluginManagement>
...
</build>