dylan-tao / nacos-plus

Nacos support the database type: OpenGauss、GaussDB、DM、MariaDB、PostgreSQL、Oracle、SQLServer
Apache License 2.0
233 stars 19 forks source link

🙋 jdk17打包:打包失败 #78

Closed swazer closed 1 month ago

swazer commented 2 months ago

您使用的版本?例如:2.3.2.4 | Your usage version? PS:2.3.2.4

2.3.2.6版本

您做了什么操作?| What did you do?

通过zulu-jdk17进行编译打包,命令 mvn -Prelease-nacos -Dmaven.test.skip=true clean install -U

预期行为 | Expected behavior

实际行为 | Actual behavior

无法成功打包

问题重现步骤 | Steps to reproduce the problem

修改pom配置17</java.version>,执行打包命令 [INFO] nacos-address 2.3.2 ................................ SUCCESS [ 1.044 s] [INFO] nacos-client 2.3.2 ................................. FAILURE [ 1.242 s] [INFO] nacos-plugin-default-impl 2.3.2 .................... SKIPPED [INFO] nacos-default-auth-plugin 2.3.2 .................... SKIPPED ... [ERROR] Failed to execute goal org.apache.maven.plugins:maven-shade-plugin:3.2.4:shade (default) on project nacos-client: Error creating shaded jar: Unsupported class file major version 61 -> [Help 1]

dylan-tao commented 1 month ago

请修改根目录pom.xml里的1.8修改为17,并额外添加17</maven.compiler.release>

 <java.version>1.8</java.version>
 <maven.compiler.source>${java.version}</maven.compiler.source>
 <maven.compiler.target>${java.version}</maven.compiler.target>
 <maven.compiler.release>${java.version}</maven.compiler.release>