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 –