Vaadin:无法建立在生产模式上
Vaadin: Can't build on production mode
我尝试将我的应用程序置于生产模式,我使用的是 vaadin flow 14.1.5,配置文件已经在 pom.xml。
pom.xml 上的生产概况是这样的:
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<jvmArguments>-Dvaadin.productionMode</jvmArguments>
</configuration>
</plugin>
<plugin>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-maven-plugin</artifactId>
<version>${vaadin.version}</version>
<executions>
<execution>
<goals>
<goal>prepare-frontend</goal>
<goal>build-frontend</goal>
</goals>
<phase>compile</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
但是当 运行 在终端上时:mvn clean package -P production
我知道了:
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6.437 s
[INFO] Finished at: 2020-04-25T00:22:09-04:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.vaadin:vaadin-maven-plugin:14.1.5:build-frontend (default) on project project-maya: Execution default of goal com.vaadin:vaadin-maven-plugin:14.1.5:build-frontend failed: Unsupported class file major version 58 -> [Help 1]
我目前正在测试,所以我不太关心 运行 开发模式,但我很快就会 运行 生产模式,我真的不知道是什么要解决此问题。
编辑:Vaadin 14.1.26 现已发布,其中包含无法使用 Java 14 (Flow issue #7918) 构建的修复.
这很可能是 Java 14 的问题。
Flow 版本 2.1.9 和 2.2.0.beta2 中有一个修复程序。
Vaadin 14.1.25 仍然使用 2.1.8,希望很快会有 2.1.9 的新版本。
Vaadin 14.2.0.beta1 使用 2.2.0.beta2,所以如果您愿意,可以尝试一下。
希望在您需要生产模式工作时,该修复程序可以在稳定版本中使用。
我尝试将我的应用程序置于生产模式,我使用的是 vaadin flow 14.1.5,配置文件已经在 pom.xml。
pom.xml 上的生产概况是这样的:
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<jvmArguments>-Dvaadin.productionMode</jvmArguments>
</configuration>
</plugin>
<plugin>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-maven-plugin</artifactId>
<version>${vaadin.version}</version>
<executions>
<execution>
<goals>
<goal>prepare-frontend</goal>
<goal>build-frontend</goal>
</goals>
<phase>compile</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
但是当 运行 在终端上时:mvn clean package -P production
我知道了:
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6.437 s
[INFO] Finished at: 2020-04-25T00:22:09-04:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.vaadin:vaadin-maven-plugin:14.1.5:build-frontend (default) on project project-maya: Execution default of goal com.vaadin:vaadin-maven-plugin:14.1.5:build-frontend failed: Unsupported class file major version 58 -> [Help 1]
我目前正在测试,所以我不太关心 运行 开发模式,但我很快就会 运行 生产模式,我真的不知道是什么要解决此问题。
编辑:Vaadin 14.1.26 现已发布,其中包含无法使用 Java 14 (Flow issue #7918) 构建的修复.
这很可能是 Java 14 的问题。
Flow 版本 2.1.9 和 2.2.0.beta2 中有一个修复程序。
Vaadin 14.1.25 仍然使用 2.1.8,希望很快会有 2.1.9 的新版本。
Vaadin 14.2.0.beta1 使用 2.2.0.beta2,所以如果您愿意,可以尝试一下。
希望在您需要生产模式工作时,该修复程序可以在稳定版本中使用。