且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Maven 编译 GWT &OpenJDK 11

更新时间:2023-09-13 23:43:28

GWT 2.8.2openjdk11 配合使用.这里 你可以看到 tbroyer gwt-maven-plugin 与 openjdk8openjdk11 使用最新的 GWT 版本(版本 2.8.2)和最新的开发提交(版本 HEAD-SNAPSHOT).

GWT 2.8.2 works with openjdk11. Here you can see that the tbroyer gwt-maven-plugin works with openjdk8 and openjdk11 using both last GWT release (version 2.8.2) and last development commit (version HEAD-SNAPSHOT).

所以,你真的应该升级到GWT 2.8.2.GWT 仅支持最新版本.通常版本之间的升级是微不足道的,因为多年来几乎没有进行 API 更改,只添加了错误修复和新的 Java 语言支持.这应该很容易.

So, you really should upgrade to GWT 2.8.2. GWT only support the last version. Usually upgrading between version is trivial because almost no API changes have been made for years and only bug fixes and new java language support has been added. It should be quite easy.

在您的情况下,这似乎是一个依赖项问题,可能是因为您的某些依赖项对旧版本的 GWT 本身有依赖性.为避免依赖冲突,建议使用 BOM 依赖.本教程包括对使用 GWT 的原因和方法的最低限度解释BOM 依赖.本质上,将它添加到您的根项目 pom.xml:

In your case, it seems to be a dependency problem, maybe because some of your dependencies have a dependency on the old version of GWT itself. To avoid dependencies conflicts it is recommended to use the BOM dependency. This tutorial includes a minimal explanation of why and how to use the GWT BOM dependency. Essentially, add this in your root project pom.xml:

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>com.google.gwt</groupId>
        <artifactId>gwt</artifactId>
        <version>2.8.2</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>