Browse Source

打包时跳过集成测试

dev-mcp
wanghanlin 4 weeks ago
parent
commit
fa109685d9
  1. 17
      pom.xml

17
pom.xml

@ -175,6 +175,15 @@
</resource>
</resources>
<plugins>
<!-- 默认跳过集成测试(所有测试均为 @SpringBootTest,需要 DB 和 API Key) -->
<!-- 需要运行测试时显式指定:mvn test -DskipTests=false -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skipTests>true</skipTests>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
@ -191,7 +200,8 @@
<!-- ==================== 前端 SDK 构建(client/ → static/sdk/) ==================== -->
<!-- 使用 frontend-maven-plugin 自动安装 Node.js 并编译前端 SDK -->
<!-- 跳过前端构建:mvn compile -Dskip.frontend=true -->
<!-- 统一绑定到 prepare-package 阶段,mvn compile 不触发,mvn package/install 才构建 -->
<!-- 跳过前端构建:mvn package -Dskip.frontend=true -->
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
@ -204,6 +214,7 @@
<!-- 第一步:安装 Node.js(仅首次,后续复用 node_modules 缓存) -->
<execution>
<id>install-node-and-npm</id>
<phase>prepare-package</phase>
<goals>
<goal>install-node-and-npm</goal>
</goals>
@ -214,6 +225,7 @@
<!-- 第二步:npm install 安装依赖 -->
<execution>
<id>npm-install</id>
<phase>prepare-package</phase>
<goals>
<goal>npm</goal>
</goals>
@ -224,6 +236,7 @@
<!-- 第三步:npm run build 编译 SDK -->
<execution>
<id>npm-build</id>
<phase>prepare-package</phase>
<goals>
<goal>npm</goal>
</goals>
@ -241,7 +254,7 @@
<executions>
<execution>
<id>copy-sdk-to-static</id>
<phase>process-resources</phase>
<phase>prepare-package</phase>
<goals>
<goal>copy-resources</goal>
</goals>

Loading…
Cancel
Save