Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/spring/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Spring Maven在调用mvn安装时只运行集成测试_Spring_Spring Boot_Maven_Spring Test - Fatal编程技术网

Spring Maven在调用mvn安装时只运行集成测试

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>

我正在使用Spring Boot 2.4.0和Surefire和Failsafe,因此以下插件:

        <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
。再次感谢,我将进行更改。