1.IDEA中进入File ->Settings ->Maven ->Runner:
添加-Dmaven.multiModuleProjectDirectory=$M2_HOME
选择JDK
2.在pom.xml中加入
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skipTests>true</skipTests>
</configuration>
</plugin>