修改构建脚本

This commit is contained in:
2025-07-17 21:14:27 +08:00
parent be70b2c64e
commit 09dd9ac959
4 changed files with 6 additions and 6 deletions

View File

@ -1,5 +1,5 @@
FROM openjdk:8-jdk FROM openjdk:8-jdk
COPY target/*.jar sczx_web.jar COPY ruoyi-admin/target/*.jar sczx_web.jar
ENTRYPOINT ["java", "-jar", \ ENTRYPOINT ["java", "-jar", \
"-Xms128m", \ "-Xms128m", \

6
Jenkinsfile vendored
View File

@ -20,13 +20,13 @@ pipeline {
stage('Build with Maven') { stage('Build with Maven') {
steps { steps {
echo "🛠️ 正在使用 Maven 构建..." echo "🛠️ 正在使用 Maven 构建..."
sh 'mvn clean package -s settings.xml' sh 'mvn clean package -s settings.xml --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.compiler/java.util=ALL-UNNAMED'
} }
} }
stage('Check Jar File') { stage('Check Jar File') {
steps { steps {
sh 'ls -la target/' // 确保 jar 文件存在 sh 'ls -la ruoyi-admin/target/' // 确保 jar 文件存在
} }
} }
@ -59,7 +59,7 @@ pipeline {
--name \${CONTAINER_NAME} \ --name \${CONTAINER_NAME} \
--network sczx-net \ --network sczx-net \
-p 8098:8098 \ -p 8098:8098 \
-e JAVA_OPTS="-Xms256m -Xmx512m -Duser.timezone=Asia/Shanghai" \ -e JAVA_OPTS="-Xms256m -Xmx512m -Duser.timezone=Asia/Shanghai --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.compiler/java.util=ALL-UNNAMED" \
--restart always \ --restart always \
\${DOCKER_IMAGE} \${DOCKER_IMAGE}
""" """

View File

@ -227,7 +227,7 @@
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId> <artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version> <version>3.8.1</version>
<configuration> <configuration>
<source>${java.version}</source> <source>${java.version}</source>
<target>${java.version}</target> <target>${java.version}</target>

View File

@ -13,7 +13,7 @@
<properties> <properties>
<slf4j.version>1.7.7</slf4j.version> <slf4j.version>1.7.7</slf4j.version>
<lombok.version>1.18.4</lombok.version> <lombok.version>1.18.24</lombok.version>
</properties> </properties>
<description> <description>