java - Maven 没有用我的 jdk 打包项目

标签 java maven

我从源代码构建了我的 jdk-11 (11.0.12) 版本。我检查了 Intellj 以前项目的 jdk,一切都编译并启动没有错误,

        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <configuration>
                <source>11</source>
                <target>11</target>
                <encoding>${sourceEncoding}</encoding>
            </configuration>
        </plugin>

但是当我使用 maven-compiler-plugin 并尝试命令时:他告诉我 package war-file

Maven 3.3.1+ requires JDK 1.7+. Please set appropriate JDK

其他 jdk(例如 corretto-11)工作没有问题。 什么问题?

我的 java 版本(我自己构建了 JDK)

openjdk version "11.0.12-internal" 2021-07-20 OpenJDK Runtime Environment (fastdebug build 11.0.12-internal+0-adhoc.Eugene.jdk11u-c354f2ee0de8) 
OpenJDK 64-Bit Server VM (fastdebug build 11.0.12-internal+0-adhoc.Eugene.jdk11u-c354f2ee0de8, mixed mode

最佳答案

这是 IntelliJ IDEA 中的错误。他们将在 2021.2 版本中修复它

关于java - Maven 没有用我的 jdk 打包项目,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67581059/

相关文章:

java - 每次我单击按钮时都会在 Firebase 中创建节点

maven - 如何将Maven插件添加到Grails 2.2应用程序?

SVN 修订号和时间戳

java - 更改代码时 Maven 出现问题?

java - log4j 属性错误

java - Java 中的 Desktop.getDesktop.open() 失败

Java PostMethod 与 xml

java - 将基于 Guice 的项目迁移到 Dagger

java - Intellij IDEA : synchronization of updatings in the pom-file and external libraries

java - 组织.hibernate.HibernateException : Access to DialectResolutionInfo cannot be null when 'hibernate.dialect' not set