Maven package error export_dao\target\surefire-reports for the individual test results.

Error when packaging maven project:

Insert picture description here

the reason

  • This is because it will stop compiling when it encounters an error while testing the code.

Solution

Add the following code in pom.xml:

<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
                <testFailureIgnore>true</testFailureIgnore>
            </configuration>
        </plugin>
    </plugins>
</build>

Guess you like

Origin blog.csdn.net/qq_41209886/article/details/109262933