gpt4 book ai didi

Java/Maven 混淆 'Unsupported major.minor version 51.0'

转载 作者:搜寻专家 更新时间:2023-11-01 02:44:17 24 4
gpt4 key购买 nike

<分区>

我正在尝试下载并安装这个 Maven 插件:

https://github.com/mirkonasato/graphipedia

我在目录中cd并运行

mvn clean install

我今天在 Mac 上用 homebrew 安装了 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 应用程序的 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>

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com