fix(deploy): 在部署脚本中使用 -Dmaven.test.skip=true 跳过测试
Some checks failed
Build and Deploy / deploy (push) Has been cancelled

由于 `-DskipTests` 仅跳过测试执行但不会跳过测试编译,在无网络环境中可能导致测试编译依赖无法解析而失败。改为 `-Dmaven.test.skip=true` 完全跳过测试阶段,确保在离线或受限环境下的构建稳定性。
This commit is contained in:
2026-06-03 22:42:41 +08:00
parent d95b0a63dd
commit e99c0806de
2 changed files with 1 additions and 10 deletions

View File

@@ -329,7 +329,7 @@ deploy_backend() {
log " Maven 构建..."
mkdir -p "$MAVEN_REPO" && chmod -R 777 "$MAVEN_REPO" 2>/dev/null || true
if ! $MVN_EXEC clean package -DskipTests -pl yudao-server -am -T 1C \
if ! $MVN_EXEC clean package -Dmaven.test.skip=true -pl yudao-server -am -T 1C \
-Dmaven.repo.local="$MAVEN_REPO" >> "$BUILD_LOG" 2>&1; then
error "Maven 构建失败查看tail -100 $BUILD_LOG"
die "构建失败"

View File

@@ -271,15 +271,6 @@
<artifactId>spring-cloud-function-core</artifactId>
<groupId>org.springframework.cloud</groupId>
</exclusion>
<!-- 排除 BouncyCastle避免 Spring Boot 嵌套 JAR 导致 JCE 签名校验失败 -->
<exclusion>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk18on</artifactId>
</exclusion>
<exclusion>
<groupId>org.bouncycastle</groupId>
<artifactId>bcpkix-jdk18on</artifactId>
</exclusion>
</exclusions>
</dependency>