maven工程单元覆盖率

pom.xml配置

				<plugin>
					<groupId>org.codehaus.mojo</groupId>
					<artifactId>cobertura-maven-plugin</artifactId>
					<executions>
						<execution>
							<goals>
								<goal>clean</goal>
							</goals>
						</execution>
					</executions>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-surefire-plugin</artifactId>
					<configuration>
						<systemProperties>
							<property>
								<name>net.sourceforge.cobertura.datafile</name>
								<value>target/cobertura/cobertura.ser</value>
							</property>
						</systemProperties>
					</configuration>
				</plugin>


命令:

mvn clean  install  cobertura:cobertura 



你可能感兴趣的:(maven工程单元覆盖率)