实践maven-antrun-extended-plugin

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<!-- 用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