Difference between revisions of "Jenkins configuration tips"

From DarkWiki
Jump to: navigation, search
(Created page with "==Cobetura== In the ''Build'' section, you need to add the following goals and options: <code> clean install cobertura:cobertura -Dcobertura.report.format=xml </code> At t...")
(No difference)

Revision as of 07:54, 14 April 2016

Cobetura

In the Build section, you need to add the following goals and options:

clean install cobertura:cobertura -Dcobertura.report.format=xml

At the bottom, in the Publish Cobetura Coverage Report section, you need to have the following pattern configured:

**/target/site/cobertura/coverage.xml

Excluding classes from Cobetura reports

There are occasions when you want to exclude specific classes from Cobetura reports. This can be achieved by adding the following to your pom.xml file:

	<build>
		<plugins>

			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>cobertura-maven-plugin</artifactId>
				<version>${version.cobertura}</version>
				<configuration>
					<formats>
						<format>xml</format>
					</formats>
					<instrumentation>
						<excludes>
							<exclude>com/proconvey/common/hibernate/MoneyUserType.class</exclude>
						</excludes>
					</instrumentation>
				</configuration>
			</plugin>

		</plugins>

	</build>

	<reporting>
		<plugins>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>cobertura-maven-plugin</artifactId>
				<version>${version.cobertura}</version>
				<configuration>
					<formats>
						<format>xml</format>
					</formats>
				</configuration>
			</plugin>
		</plugins>
	</reporting>