我試圖下載並安裝此Maven插件:在目錄的Java/Maven的混亂 '不支持MAJOR.MINOR版本51.0'
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
我GOOGLE了這個錯誤,並發現一對夫婦的人說,原因可能是一個古老的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應用程序的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>
這個問題看起來很相似,可能會有所幫助。 http://stackoverflow.com/questions/18813828/why-maven-use-jdk-1-6-but-my-java-version-is-1-7 – Danny 2014-10-09 16:34:00
http://stackoverflow.com/questions/10382929/ unsupported-major-minor-version-51-0 – OhadR 2014-10-09 16:36:38