【问题标题】:Trying to interpret the message from maven-compiler-plugin试图解释来自 maven-compiler-plugin 的消息
【发布时间】:2020-01-30 21:50:26
【问题描述】:

我正在尝试使用 JDK 11 编译一个项目。为了破译该消息,我想知道 此错误消息中的字符串(默认编译)是什么意思?

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project nifi-properties: Compilation failure -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project nifi-properties: Compilation failure

我的 pm.xml 在这里

<modules>
    <module>nifi-properties</module>
</modules>
<properties>
    <maven.compiler.release>11</maven.compiler.release>
</properties>    
<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>3.8.1</version>
            <configuration>
                <release>11</release>                    
            </configuration>
        </plugin>
    </plugins>
</build> 

【问题讨论】:

  • 表示maven-compiler-task失败,因为源码中存在编译错误。
  • 看上下文。您应该在此消息之前有更多消息。

标签: maven maven-compiler-plugin


【解决方案1】:

所以我与我的同事交谈,他们注意到但我没有看到的一件事是在我试图创建为这个 Maven 作业的容器的 docker 映像中没有安装 JDK。有一个可用的 JRE,但没有 JDK。这方面的线索是错误消息的这一部分:

openjdk-11-jre-headless/now 11.0.2+9-3 amd64 [installed,local]

我应该在调试消息中看到 JDK,正确的调试日志会在后面

openjdk-11-jdk-headless/now 11.0.2+9-3 amd64 [installed,local]

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2014-03-10
    • 1970-01-01
    • 2014-02-23
    • 2016-09-17
    • 1970-01-01
    • 1970-01-01
    • 2013-01-14
    相关资源
    最近更新 更多