首页 > 解决方案 > Neo4j 无法在新的 Ubuntu 18 桌面上构建

问题描述

我已经在 VBox 虚拟机中安装了 Ubuntu 18.04.2 Desktop AMDx64 的全新副本(WSL 上发生了同样的问题,并且没有安装 ubuntu 的 VM) - 安装了 git、maven、openjdk-8-jdk -将 java 版本更改为 1.8。 0_222(Neo4j 似乎还不完全支持更高版本的 JDK?)使用 update-alternatives -cd 进入目录并mvn clean install

但是,它无法编译并给我这个错误:

[信息] 构建失败
[信息] ------------------------------------------ ------------------------------
[INFO] 总时间:30.098 s
[INFO] 完成于:2019-08-05T06: 53:55Z
[信息] ----------------------------------------- ----------------------------
[错误] 无法执行目标 org.neo4j.build.plugins:licensing-maven-plugin:1.7 .7:在项目 neo4j-annotation-processors 上检查(列出所有许可证):无法读取许可要求文件:licensing/licensing-requirements-base.xml:无法将 org.linuxstuff.mojo.licensing.model.CoalescedLicense 构造为它没有无参数构造函数:无法构造 org.linuxstuff.mojo.licensing.model.CoalescedLicense,因为它没有无参数构造函数
[错误] ---- 调试信息 ----
[错误] 消息:无法构造 org.linuxstuff.mojo.licensing.model.CoalescedLicense,因为它没有无参数构造函数
[错误] 原因异常:com.thoughtworks.xstream.converters.reflection.ObjectAccessException
[错误] 原因-message:无法构造 org.linuxstuff.mojo.licensing.model.CoalescedLicense,因为它没有无参数构造函数
[错误] 类:org.linuxstuff.mojo.licensing.model.CoalescedLicense
[错误] 所需类型:org .linuxstuff.mojo.licensing.model.CoalescedLicense
[错误] 转换器类型:com.thoughtworks.xstream.converters.reflection.ReflectionConverter
[错误] 路径:/licensing-requirements/coalesced-licenses/license
[错误] 行号:81
[错误] 类 [1]:java.util.HashSet
[错误] 转换器类型 [1]:com.thoughtworks.xstream.converters.collections.CollectionConverter
[错误] 类 [2]:org .linuxstuff.mojo.licensing.model.LicensingRequirements
[错误] 版本:空
[错误] -----------------------------
[ERROR] -> [Help 1]
[ERROR]
[ERROR] 要查看错误的完整堆栈跟踪,请使用 -e 开关重新运行 Maven。
[错误] 使用 -X 开关重新运行 Maven 以启用完整的调试日志记录。
[ERROR]
[ERROR] 有关错误和可能的解决方案的更多信息,请阅读以下文章:
[ERROR] [Help 1]http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR]
[ERROR] 纠正问题后,您可以使用命令
[ERROR] mvn -rf :neo4j-annotation-processors 恢复构建

由于这只是在编辑代码之前的健全性检查,因此编译原始源代码应该没有任何问题。即使按照 Neo4j git repo 的确切说明,任何人都可能找到问题所在? https://github.com/neo4j/neo4j

标签: javamavenneo4j

解决方案


推荐阅读