Spring Maven在调用mvn安装时只运行集成测试
我正在使用Spring Boot 2.4.0和Surefire和Failsafe,因此以下插件:Spring Maven在调用mvn安装时只运行集成测试,spring,spring-boot,maven,spring-test,Spring,Spring Boot,Maven,Spring Test,我正在使用Spring Boot 2.4.0和Surefire和Failsafe,因此以下插件: <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>11</source>
<target>11</target>
<annotationProcessorPaths>
<path>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct-processor</artifactId>
<version>${org.mapstruct.version}</version>
</path>
<!-- other annotation processors -->
</annotationProcessorPaths>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
org.springframework.boot
springbootmaven插件
org.apache.maven.plugins
maven编译器插件
3.8.1
11
11
org.mapstruct
mapstruct处理器
${org.mapstruct.version}
org.apache.maven.plugins
maven故障保护插件
集成测试
验证
我有单元测试(*Test.java
)和集成测试(*IT.java
)。但是运行mvn clean package
只需运行单元测试,我需要运行mvn clean instasll
来运行集成测试+单元测试
有什么建议吗?这是正确的?mvn包是集成测试阶段之前的一个阶段。请参阅:-如果您不想运行安装,mvn verify将是一个。您通常不需要
install
首选mvn verify
…注意:您也可以使用just或/11
而不是source
和target
。再次感谢,我将更改。mvn包是集成测试阶段之前的一个阶段。请参阅:-如果您不想运行安装,mvn verify将是一个。您通常不需要install
首选mvn verify
…注意:您也可以使用just或/11
而不是source
和target
。再次感谢,我将进行更改。