获取Maven编译错误无法执行目标org.apache.maven.plugins

时间:2020-05-20 09:15:30

标签: java maven ubuntu jenkins amazon-ec2

我从 jenkins 编译JAVA代码时遇到此错误。 从命令行执行此操作时不会出现这种情况。
在控制台和命令行Shell上为jenkins用户配置的JAVA和MAVEN的环境相同。

在EC2的UBUNTU上运行。

[ERROR] **Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.6.1:compile (default-compile) on project website-site: Compilation failure**

[ERROR] Picked up _JAVA_OPTIONS: -Xmx2048m

[ERROR] /var/lib/jenkins/workspace/Couchbase/site/src/main/java/com/couchbase/components/catalog/LogoGridComponent.java:[10,51] Bool is internal proprietary API and may be removed in a future release

[ERROR] 

[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.6.1:compile (default-compile) on project website-site: Compilation failure
Picked up _JAVA_OPTIONS: -Xmx2048m
/var/lib/jenkins/workspace/Couchbase/site/src/main/java/com/couchbase/components/catalog/LogoGridComponent.java:[10,51] Bool is internal proprietary API and may be removed in a future release

1 个答案:

答案 0 :(得分:0)

问题已为我解决。 由于它可以通过命令行正常运行,因此我增加了EC2实例的memory(ram)。 詹金斯(Jenkins)占用了大量内存,因此使编译崩溃。