2
我刚刚从2012年5月22日下载了neo4j-1.8-M02源文件,发现pom.xml与2周前不同。而现在,我得到了以下错误。Neo4j 1.8 M02:使用“找不到符号”的Maven编译错误
任何建议,将不胜感激。 J.T.
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler- plugin:2.3.2:compile (compile-neo4j-kernel) on project neo4j-kernel: Compilation failure: Compilation failure:
[ERROR] /home/pt/Downloads/neo4j-community-081282a/kernel/src/main/java/org/neo4j/helpers/Specifications.java:[54,15] cannot find symbol
[ERROR] symbol : method and(java.lang.Iterable<java.lang.Object>)
[ERROR] location: class org.neo4j.helpers.Specifications
[ERROR] /home/pt/Downloads/neo4j-community-081282a/kernel/src/main/java/org/neo4j/helpers/Specifications.java:[64,15] cannot find symbol
的pom.xml
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<executions>
<execution>
<id>default-compile</id>
<configuration>
<compilerArgument>-proc:none</compilerArgument>
<includes>
<include>org/neo4j/kernel/impl/annotations/**</include>
</includes>
</configuration>
</execution>
<execution>
<id>compile-neo4j-kernel</id>
<phase>compile</phase>
<goals>
<goal>compile</goal>
</goals>
</execution>
</executions>
</plugin>
....
import org.neo4j.helpers.Service;
<group>
<title>Helpers</title>
<packages>org.neo4j.helpers:org.neo4j.helpers.*</packages>
</group
嗨,彼得,非常感谢你的回答。在尝试在家中安装neo4j时,我遇到了这个问题,而由于JDK的不同,我在办公室没有这个问题。谢谢。 – ptee
OpenJDK 1.6 SDK(6b24-1.11.1-4ubuntu2)仍然不能编译neo4j,类似的错误。 https://help.ubuntu.com/community/Java#Oracle_.28Sun.29_Java_6上的说明对我在Ubuntu上切换到Oracle JDK有帮助。切换后,'mvn compile'似乎可以正常工作。 – jwhitlock
太棒了!另外,我认为OpenJDK现在正在https://github.com/neo4j/neo4j/pull/350 –