实践maven-antrun-extended-plugin Posted on 2018-11-13 | In 工具 | Visitors 12345678910111213141516171819202122232425262728293031323334353637<!-- 用mvn ant生成格式更友好的report --> <plugin> <groupId>org.jvnet.maven-antrun-extended-plugin</groupId> <artifactId>maven-antrun-extended-plugin</artifactId> <version>1.43</version> <executions> <execution> <id>test-reports</id> <phase>test</phase> <configuration> <tasks> <junitreport todir="${basedir}/target/surefire-reports"> <fileset dir="${basedir}/target/surefire-reports"> <include name="**/*.xml" /> </fileset> <report format="frames" todir="${basedir}/target/surefire-reports" /> </junitreport> </tasks> </configuration> <goals> <goal>run</goal> </goals> </execution> </executions> <dependencies> <dependency> <groupId>org.apache.ant</groupId> <artifactId>ant-junit</artifactId> <version>1.8.0</version> </dependency> <dependency> <groupId>org.apache.ant</groupId> <artifactId>ant-trax</artifactId> <version>1.8.0</version> </dependency> </dependencies> </plugin> mvn test