I am attaching the pom.xml that we have used to generate jacoco-it.exec and
also the index.html file generated after executing the above command(sonar
step).

On Tue, Nov 25, 2014 at 1:53 PM, <[email protected]> wrote:

> Hi Team,
>
> We are not able to get IT code coverage using Jacoco.
>
> IT coverage is shown as 0.0% in sonar dashboard.
>
> As a first step we have generated jacoco-it.exec file and executed the
> below command to get the coverage on sonar dashboard.
>
> mvn
> -Dsonar.jacoco.itReportPath="E:\BuildAgent\work\b8f0a63c1c75b440\services\branches\phase_1_iteration_3\target\jacoco-it.exec"
> sonar:sonar -Dsonar.dynamicAnalysis=reuseReports
>
>
> Please note that it is a multi module project and we need IT coverage for
> a particular module.
>
> Kindly help us in resolving this issue and let me know if any further
> information is needed.
>
> Thanks,
> Sri Priyanka
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "JaCoCo and EclEmma Users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/jacoco/3VzuqP4EHTs/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jacoco/41285386-475f-4ec1-b925-e3969fc4d503%40googlegroups.com
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"JaCoCo and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/CANbHXxAvgpAoEjufaOO3Kvqdr3jK4Ld-x%2BxtJKAf6uOOaVB_vQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
<project xmlns="http://maven.apache.org/POM/4.0.0"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd";>
	<modelVersion>4.0.0</modelVersion>
	<groupId>com.adidas.sef</groupId>
	<artifactId>services</artifactId>
	<version>0.0.1-SNAPSHOT</version>
	<packaging>ejb</packaging>
	<name>Services</name>
	<description>
		This project contains the business logic for System excellence foundation services. 
		This would be reused for both SOAP and REST services in future. 
	</description>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<infiniSpanVersion>6.0.2.Final</infiniSpanVersion>
		<jbossToolsVersion>6.2.0-redhat-1</jbossToolsVersion>
		<commonUtilsVersion>0.0.1-SNAPSHOT</commonUtilsVersion>
		<cmdbjpaEntitiesVersion>0.0.2-SNAPSHOT</cmdbjpaEntitiesVersion>
		<hibernateJpaVersion>1.0.0.Final</hibernateJpaVersion>
		<mavenCompilerPluginVersion>3.0</mavenCompilerPluginVersion>
		<mavenJavaVersion>1.7</mavenJavaVersion>
		<hibernateCoreVersion>4.3.6.Final</hibernateCoreVersion>
		<mockitoVersion>1.9.5</mockitoVersion>
		<powermockVersion>1.5.6</powermockVersion>
		<junitVersion>4.11</junitVersion>
		<apacheCommonsVersion>3.3.2</apacheCommonsVersion>
		<apacheCollectionsVersion>4.0</apacheCollectionsVersion>
		<mavenSurefirePluginVersion>2.17</mavenSurefirePluginVersion>
		<securityClientAPIVersion>1.1.6</securityClientAPIVersion>
		<slf4jApiVersion>1.7.7</slf4jApiVersion>
		<javaxInjectVersion>1</javaxInjectVersion>
		<arquillianTransactionVersion>1.0.0.Alpha3</arquillianTransactionVersion>
		<!-- JBOSS versions -->
		<version.jboss.as>7.2.0.Final</version.jboss.as>
		<version.jboss.msc>1.0.4.GA</version.jboss.msc>
		<!-- maven-compiler-plugin -->
		<!-- EJB plugin versions -->
		<version.ejb.plugin.source>2.3</version.ejb.plugin.source>
		<version.ejb.plugin.target>3.1</version.ejb.plugin.target>
		<jaxb2.maven.version>1.6</jaxb2.maven.version>
		<version.shrinkwrap.resolver>2.2.0-alpha-2</version.shrinkwrap.resolver>
		<mavenFailSafePluginVersion>2.17</mavenFailSafePluginVersion>
		<junitParamsVersion>1.0.3</junitParamsVersion>
		<jacocoMavenPluginVersion>0.6.3.201306030806</jacocoMavenPluginVersion>
	</properties>
	<repositories>
		<!-- START: Artifactory repository location: Artifactory is the internal 
			Adidas Maven repository and all internal dependencies like common.jar, entities.jar 
			& services.jar will be available only through this. -->
		<repository>
			<id>deheremap6392.emea.adsint.biz</id>
			<name>deheremap6392.emea.adsint.biz-releases</name>
			<url>http://10.127.22.46:8082/artifactory/SystemsExcellenceRepo</url>
		</repository>
		<!-- END: Artifactory repository location -->
		<repository>
			<id>jboss-public-repository-group</id>
			<name>JBoss Public Repository Group</name>
			<url>http://repository.jboss.org/nexus/content/groups/public/</url>
			<layout>default</layout>
			<releases>
				<enabled>true</enabled>
				<updatePolicy>never</updatePolicy>
			</releases>
		</repository>
	</repositories>
	<build>
		<!-- Ignore Editability Configuration files while building JAR -->
		<resources>
			<resource>
				<directory>src/main/resources</directory>
				<excludes>
					<exclude>*Article.properties</exclude>
					<exclude>*Model.properties</exclude>
				</excludes>
			</resource>
		</resources>

		<plugins>
			<!-- Maven Sure fire plugin ${mavenSurefirePluginVersion} =2.17 used for 
				JUnit Test Cases -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>${mavenSurefirePluginVersion}</version>
			</plugin>

			<!-- Maven fail safe plugin ${mavenFailSafePluginVersion} =2.17 used for 
				Integration Test Cases -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-failsafe-plugin</artifactId>
				<version>${mavenFailSafePluginVersion}</version>
				<executions>
					<execution>
						<id>integration-test</id>
						<goals>
							<goal>integration-test</goal>
							<goal>verify</goal>
						</goals>
						<configuration>
							<!-- Sets the VM argument line used when integration tests are run. -->
							<argLine>${failsafeArgLine}</argLine>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.jacoco</groupId>
				<artifactId>jacoco-maven-plugin</artifactId>
				<version>${jacocoMavenPluginVersion}</version>
				<executions>
					<!-- The Executions required by unit tests are omitted. -->
					<!-- Prepares the property pointing to the JaCoCo runtime agent which 
						is passed as VM argument when Maven the Failsafe plugin is executed. -->
					<execution>
						<id>pre-integration-test</id>
						<phase>pre-integration-test</phase>
						<goals>
							<goal>prepare-agent</goal>
						</goals>
						<configuration>
							<!-- Sets the path to the file which contains the execution data. -->
							<destFile>${project.build.directory}\jacoco-it.exec</destFile>
							<!-- Sets the name of the property containing the settings for JaCoCo 
								runtime agent. -->
							<propertyName>failsafeArgLine</propertyName>
						</configuration>
					</execution>
					<!-- Ensures that the code coverage report for integration tests after 
						integration tests have been run. -->
					<execution>
						<id>post-integration-test</id>
						<phase>post-integration-test</phase>
						<goals>
							<goal>report</goal>
						</goals>
						<configuration>
							<!-- Sets the path to the file which contains the execution data. -->
							<dataFile>${project.build.directory}\jacoco-it.exec</dataFile>
							<!-- Sets the output directory for the code coverage report. -->
							<outputDirectory>${project.reporting.outputDirectory}\jacoco-it</outputDirectory>
						</configuration>
					</execution>
				</executions>
			</plugin>

			<!-- This plugin is used to use the Java jdk compiler version 1.7 during 
				build -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>${mavenCompilerPluginVersion}</version>
				<configuration>
					<source>${mavenJavaVersion}</source>
					<target>${mavenJavaVersion}</target>
				</configuration>
			</plugin>
			<plugin>
				<!-- must include ejb-plugin to change the EJB version from 2.3 to 3.1 -->
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-ejb-plugin</artifactId>
				<version>${version.ejb.plugin.source}</version>
				<configuration>
					<ejbVersion>${version.ejb.plugin.target}</ejbVersion>
					<source>${mavenJavaVersion}</source>
					<target>${mavenJavaVersion}</target>
					<generateClient>true</generateClient>
					<clientIncludes>
						<clientInclude>**/ServiceAccess.class</clientInclude>
					</clientIncludes>
					<archive>
						<addMavenDescriptor>false</addMavenDescriptor>
						<manifestEntries>
							<Dependencies>org.jboss.msc,
								org.jboss.as.clustering.singleton
							</Dependencies>
						</manifestEntries>
					</archive>
				</configuration>
			</plugin>

			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>jaxb2-maven-plugin</artifactId>
				<version>${jaxb2.maven.version}</version>
				<executions>
					<execution>
						<id>services-schemas</id>
						<goals>
							<goal>xjc</goal>
						</goals>
						<configuration>
							<clearOutputDir>false</clearOutputDir>
							<schemaDirectory>${project.basedir}/src/main/resources/META-INF</schemaDirectory>
							<outputDirectory>${project.basedir}/src/main/java</outputDirectory>
							<extension>true</extension>
						</configuration>

					</execution>
				</executions>
			</plugin>

		</plugins>
	</build>
	<dependencyManagement>
		<dependencies>
			<!-- JBoss distributes a complete set of Java EE 6 APIs including a Bill 
				of Materials (BOM). A BOM specifies the versions of a "stack" (or a collection) 
				of artifacts. We use this here so that we always get the correct versions 
				of artifacts. Here we use the jboss-javaee-6.0-with-tools stack (you can 
				read this as the JBoss stack of the Java EE 6 APIs, with some extras tools 
				for your project, such as Arquillian for testing) and the jboss-javaee-6.0-with-hibernate 
				stack you can read this as the JBoss stack of the Java EE 6 APIs, with extras 
				from the Hibernate family of projects) -->
			<dependency>
				<groupId>org.jboss.bom.eap</groupId>
				<artifactId>jboss-javaee-6.0-with-tools</artifactId>
				<version>${jbossToolsVersion}</version>
				<type>pom</type>
				<scope>import</scope>
			</dependency>
		</dependencies>
	</dependencyManagement>
	<dependencies>
		<!-- First declare the APIs we depend on and need for compilation. All 
			of them are provided by JBoss EAP 6 -->

		<!-- Import the CDI API, we use provided scope as the API is included in 
			JBoss EAP 6 -->
		<dependency>
			<groupId>javax.enterprise</groupId>
			<artifactId>cdi-api</artifactId>
			<scope>provided</scope>
		</dependency>

		<!-- Import the Common Annotations API (JSR-250), we use provided scope 
			as the API is included in JBoss EAP 6 -->
		<dependency>
			<groupId>org.jboss.spec.javax.annotation</groupId>
			<artifactId>jboss-annotations-api_1.1_spec</artifactId>
			<scope>provided</scope>
		</dependency>

		<!-- Import the JPA API, we did not use provided scope as the API is not 
			included the latest version 2.1 in JBoss EAP 6 -->
		<dependency>
			<groupId>org.hibernate.javax.persistence</groupId>
			<artifactId>hibernate-jpa-2.1-api</artifactId>
			<version>${hibernateJpaVersion}</version>
		</dependency>


		<!-- Import the EJB API, we use provided scope as the API is included in 
			JBoss EAP 6 -->
		<dependency>
			<groupId>org.jboss.spec.javax.ejb</groupId>
			<artifactId>jboss-ejb-api_3.1_spec</artifactId>
			<scope>provided</scope>
		</dependency>

		<!-- Arquillian allows you to test enterprise code such as EJBs and Transactional(JTA) 
			JPA from JUnit/TestNG -->
		<dependency>
			<groupId>org.jboss.arquillian.junit</groupId>
			<artifactId>arquillian-junit-container</artifactId>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>org.jboss.arquillian.protocol</groupId>
			<artifactId>arquillian-protocol-servlet</artifactId>
			<scope>test</scope>
		</dependency>

		<!-- This is a dependency for Reference Data Cache implementation -->
		<dependency>
			<groupId>org.infinispan</groupId>
			<artifactId>infinispan-core</artifactId>
			<version>${infiniSpanVersion}</version>
		</dependency>

		<!-- In Reference Data CacheNeeded for connecting to remote infinispan 
			server -->
		<dependency>
			<groupId>org.infinispan</groupId>
			<artifactId>infinispan-client-hotrod</artifactId>
			<version>${infiniSpanVersion}</version>
		</dependency>

		<dependency>
			<groupId>org.hibernate</groupId>
			<artifactId>hibernate-core</artifactId>
			<version>${hibernateCoreVersion}</version>
		</dependency>
		<!-- Mockito will be the mocking framework used along with Junit. -->
		<!-- PowerMock enhances Mockito for static / final class mocking -->
		<dependency>
			<groupId>org.mockito</groupId>
			<artifactId>mockito-all</artifactId>
			<version>${mockitoVersion}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.powermock</groupId>
			<artifactId>powermock-module-junit4</artifactId>
			<version>${powermockVersion}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.powermock</groupId>
			<artifactId>powermock-api-mockito</artifactId>
			<version>${powermockVersion}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.powermock</groupId>
			<artifactId>powermock-core</artifactId>
			<version>${powermockVersion}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.powermock</groupId>
			<artifactId>powermock-reflect</artifactId>
			<version>${powermockVersion}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>${junitVersion}</version><!--$NO-MVN-MAN-VER$ -->
			<scope>test</scope>
		</dependency>
		<!-- slf4j-api is used logging -->
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-api</artifactId>
			<version>${slf4jApiVersion}</version>
		</dependency>
		<!-- Used for injecting the classes -->
		<dependency>
			<groupId>javax.inject</groupId>
			<artifactId>javax.inject</artifactId>
			<version>${javaxInjectVersion}</version><!--$NO-MVN-MAN-VER$ -->
		</dependency>

		<!--This is security client API which will be taken from artifacts START -->
		<dependency>
			<groupId>com.adidas.security.api</groupId>
			<artifactId>SecurityClientAPI</artifactId>
			<version>${securityClientAPIVersion}</version>
			<exclusions>
				<exclusion>
					<groupId>org.sonatype.gossip</groupId>
					<artifactId>gossip</artifactId>
				</exclusion>
			</exclusions>
		</dependency>
		<!-- This is the internal dependency will be available in Artifactory repository. 
			Artifactory is the internal Adidas Maven repository -->
		<dependency>
			<groupId>com.adidas.sef</groupId>
			<artifactId>common</artifactId>
			<version>${commonUtilsVersion}</version>
		</dependency>
		<!-- This is the internal dependency will be available in Artifactory repository. 
			Artifactory is the internal Adidas Maven repository -->
		<dependency>
			<groupId>com.adidas.sef</groupId>
			<artifactId>entities</artifactId>
			<version>${cmdbjpaEntitiesVersion}</version>
		</dependency>
		<dependency>
			<groupId>org.jboss.arquillian.extension</groupId>
			<artifactId>arquillian-transaction-jta</artifactId>
			<version>${arquillianTransactionVersion}</version>
		</dependency>

		<dependency>
			<groupId>org.jboss.msc</groupId>
			<artifactId>jboss-msc</artifactId>
			<version>${version.jboss.msc}</version>
		</dependency>
		<dependency>
			<groupId>org.jboss.as</groupId>
			<artifactId>jboss-as-clustering-singleton</artifactId>
			<version>${version.jboss.as}</version>
		</dependency>
		<dependency>
			<groupId>org.jboss.shrinkwrap.resolver</groupId>
			<artifactId>shrinkwrap-resolver-impl-maven</artifactId>
			<version>${version.shrinkwrap.resolver}</version>
		</dependency>

		<!-- JUnitParams is for Parameterised JUnit which allows "parametrised, 
			non-parametrised methods in single class" and "parameterised JUnit for multiple 
			methods in single class" -->
		<dependency>
			<groupId>pl.pragmatists</groupId>
			<artifactId>JUnitParams</artifactId>
			<version>${junitParamsVersion}</version>
			<scope>test</scope>
		</dependency>

	</dependencies>
	<profiles>
		<profile>
			<!-- An optional Arquillian testing profile that executes tests in your 
				JBoss AS instance -->
			<!-- This profile will start a new JBoss AS instance, and execute the 
				test, shutting it down when done -->
			<!-- Run with: mvn clean test -Parq-jbossas-managed -->
			<id>arq-jbossas-managed</id>
			<dependencies>
				<dependency>
					<groupId>org.jboss.as</groupId>
					<artifactId>jboss-as-arquillian-container-managed</artifactId>
					<scope>test</scope>
				</dependency>
				<dependency>
					<groupId>org.jboss.shrinkwrap.resolver</groupId>
					<artifactId>shrinkwrap-resolver-impl-maven</artifactId>
					<scope>test</scope>
				</dependency>
			</dependencies>
		</profile>
		<profile>
			<!-- An optional Arquillian testing profile that executes tests in a remote 
				JBoss AS instance -->
			<!-- Run with: mvn clean test -Parq-jbossas-remote -->
			<id>arq-jbossas-remote</id>
			<dependencies>
				<dependency>
					<groupId>org.jboss.as</groupId>
					<artifactId>jboss-as-arquillian-container-remote</artifactId>
					<scope>test</scope>
				</dependency>
				<dependency>
					<groupId>org.jboss.shrinkwrap.resolver</groupId>
					<artifactId>shrinkwrap-resolver-impl-maven</artifactId>
					<scope>test</scope>
				</dependency>
			</dependencies>
		</profile>
		<profile>
			<!-- The default profile skips all integration tests and runs Junit tests -->
			<id>default</id>
			<activation>
				<activeByDefault>true</activeByDefault>
			</activation>
			<build>
				<plugins>
					<plugin>
						<artifactId>maven-failsafe-plugin</artifactId>
						<version>${mavenFailSafePluginVersion}</version>
						<configuration>
							<skipITs>true</skipITs>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>
</project>

Reply via email to