You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Vaadin 23.2.11生产打包失败,提示需验证许可证

Vaadin 23生产打包许可证错误解决及部署指南

问题原因

即使未使用Vaadin付费组件(如Charts、TestBench),Vaadin Maven插件在生产构建时默认会触发许可证验证,若网络受限或无Pro许可证就会抛出该错误。

解决办法

1. 跳过许可证检查(推荐方案)

修改生产环境profile中的Vaadin Maven插件配置,添加skipLicenseCheck参数强制跳过验证:

<profile>
    <!-- Production mode is activated using -Pproduction -->
    <id>production</id>
    <properties>
        <vaadin.productionMode>true</vaadin.productionMode>
    </properties>
    <build>
        <plugins>
            <plugin>
                <groupId>com.vaadin</groupId>
                <artifactId>vaadin-maven-plugin</artifactId>
                <version>${vaadin.version}</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>build-frontend</goal>
                        </goals>
                        <phase>compile</phase>
                    </execution>
                </executions>
                <configuration>
                    <productionMode>true</productionMode>
                    <!-- 添加该行跳过许可证检查 -->
                    <skipLicenseCheck>true</skipLicenseCheck>
                </configuration>
            </plugin>
        </plugins>
    </build>
</profile>

2. 清理无关付费依赖

检查pom.xml中是否意外引入了Vaadin Pro组件依赖(如vaadin-charts、vaadin-testbench),若未使用请直接移除这些依赖项。

正确部署步骤

  1. 保存修改后的pom.xml,重新执行生产打包命令:
mvn clean package -Pproduction
  1. 打包完成后,将生成的产物部署到支持Java 17的服务器:
    • 若为war包:部署到Tomcat 10.x、Jetty 11.x等兼容Servlet 5.0+的容器
    • 若为jar包:直接通过java -jar target/[项目名].jar启动内嵌容器运行

内容的提问来源于stack exchange,提问作者user22537209

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.11 06:12:46