我正在尝试下载并安装这个 Maven 插件:
https://github.com/mirkonasato/graphipedia
我cd
在目录中运行
mvn clean install
我今天在 Mac 上用自制软件安装了 mvn,所以它应该是最新的。我得到的错误是:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project graphipedia-dataimport: Compilation failure
[ERROR] error: Exception thrown while constructing Processor object: org/neo4j/kernel/impl/annotations/ServiceProcessor : Unsupported major.minor version 51.0
我用谷歌搜索了这个错误,发现有几个人说,原因可能是旧的 Java 版本。所以我检查了我的系统偏好设置,上面写着 Java 7。
但我并不真正相信这一点并跑了
mvn --version
这给了我这个输出
Apache Maven 3.2.3 (33f8c3e1027c3ddde99d3cdebad2656a31e8fdf4; 2014-08-11T22:58:10+02:00)
Maven home: /usr/local/Cellar/maven/3.2.3/libexec
Java version: 1.6.0_65, vendor: Apple Inc.
Java home: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
Default locale: de_DE, platform encoding: MacRoman
OS name: "mac os x", version: "10.9.5", arch: "x86_64", family: "mac"
我很困惑。为什么Java v. 1.6 在这里?我该如何解决这个问题?我只想使用这个不错的 java 应用程序。
哦,Graphipedia App 中的 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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.graphipedia</groupId>
<artifactId>graphipedia-parent</artifactId>
<version>0.1.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>Graphipedia Parent</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<neo4j.version>2.0.0</neo4j.version>
</properties>
<modules>
<module>graphipedia-dataimport</module>
</modules>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.codehaus.woodstox</groupId>
<artifactId>woodstox-core-asl</artifactId>
<version>4.1.4</version>
</dependency>
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-kernel</artifactId>
<version>${neo4j.version}</version>
</dependency>
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-lucene-index</artifactId>
<version>${neo4j.version}</version>
</dependency>
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-graph-algo</artifactId>
<version>${neo4j.version}</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.10</version>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
</plugins>
</build>
</project>