这是我的pom.xml文件,
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>neo4j.embedded.myserver</groupId>
<artifactId>myserver</artifactId>
<packaging>jar</packaging>
<properties>
<java.version>1.7</java.version>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
</properties>
<version>1.0-SNAPSHOT</version>
<name>myserver</name>
<url>http://maven.apache.org</url>
<dependencies>
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j</artifactId>
<version>2.2.4</version>
</dependency>
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-client</artifactId>
<version>1.8</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-client</artifactId>
<version>2.13</version>
</dependency>
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-kernel</artifactId>
<version>2.2.4</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-all</artifactId>
<version>1.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.graphaware.neo4j</groupId>
<artifactId>tests</artifactId>
<version>2.1.5.25</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-neo4j</artifactId>
<version>1.0.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20140107</version>
</dependency>
</dependencies>
</project>
我使用eclipse,使用run as→maven build,这是我的错误信息,
结果:
错误测试: nodeCreationWithLabel(neo4j.tests.Neo4jTest):org / neo4j / kernel / impl / util / function / Optionals $ LazyOptional nodeCreationWithLabel(neo4j.tests.Neo4jTest) compareProperties(neo4j.tests.Neo4jTest):org / neo4j / kernel / impl / cache / HPCSettingFunctions $ 4 compareProperties(neo4j.tests.Neo4jTest) compareNeo4jDatabase(neo4j.tests.Neo4jTest):org / neo4j / kernel / impl / cache / HPCSettingFunctions $ 4 compareNeo4jDatabase(neo4j.tests.Neo4jTest)
测试运行:6,失败:0,错误:6,跳过:0
[INFO] -------------------------------------------- ----------------------------
[INFO] BUILD FAILURE
[INFO] -------------------------------------------- ----------------------------
[INFO]总时间:2.838秒
[INFO]完成时间:2015-10-28T16:14:21 + 08:00
[INFO]最终记忆:11M / 28M
[INFO] -------------------------------------------- ----------------------------
[错误]无法在项目myserver上执行目标org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test(default-test):有测试失败。
[错误]
[错误]请参阅D:\ Eclipse \ workspace \ MyNeo4jSamples \ target \ surefire-reports了解各个测试结果。
[错误] - &gt; [帮助1]
[错误]
[错误]要查看错误的完整堆栈跟踪,请使用-e开关重新运行Maven。
[错误]使用-X开关重新运行Maven以启用完整的调试日志记录。
[错误]
[错误]有关错误和可能解决方案的更多信息,请阅读以下文章:
[错误] [帮助1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
答案 0 :(得分:1)
您正在使用Neo4j和GraphAware框架。
GraphAware框架版本与Neo4j版本相结合。
Neo4j - 2.2.4
GraphAware Framework - 2.1.5.25(这是问题)
您应该使用GraphAware Framework的2.2.4.34版本。