<sonar.branch>${user.name}-private-view</sonar.branch>
<sonar.host.url>https://sonar.opendaylight.org/</sonar.host.url>
<!-- Sonar properties using jacoco to retrieve integration test results -->
+ <sonar-jacoco-listeners.version>2.4</sonar-jacoco-listeners.version>
<sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
<sonar.language>java</sonar.language>
+ <sonar.jacoco.reportPath>target/code-coverage/jacoco.exec</sonar.jacoco.reportPath>
+ <sonar.jacoco.itReportPath>target/code-coverage/jacoco-it.exec</sonar.jacoco.itReportPath>
<sonar.skippedModules>org.openflow.openflowj,net.sf.jung2,org.opendaylight.controller.protobuff.messages</sonar.skippedModules>
<spifly.version>1.0.0</spifly.version>
<spring-osgi.version>1.2.1</spring-osgi.version>
<spring-security-karaf.version>3.1.4.RELEASE</spring-security-karaf.version>
<spring-security.version>3.1.3.RELEASE</spring-security.version>
<spring.version>3.1.3.RELEASE</spring.version>
- <sonar.skippedModules>org.openflow.openflowj,net.sf.jung2</sonar.skippedModules>
<statistics.northbound.version>0.4.2-SNAPSHOT</statistics.northbound.version>
<statisticsmanager.implementation.version>0.4.2-SNAPSHOT</statisticsmanager.implementation.version>
<statisticsmanager.version>0.5.1-SNAPSHOT</statisticsmanager.version>
</dependencies>
</dependencyManagement>
+ <dependencies>
+ <!-- Sonar -->
+ <dependency>
+ <groupId>org.codehaus.sonar-plugins.java</groupId>
+ <artifactId>sonar-jacoco-listeners</artifactId>
+ <version>${sonar-jacoco-listeners.version}</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
<build>
<pluginManagement>
<plugins>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>${jacoco.version}</version>
+ <executions>
+ <execution>
+ <id>prepare-ut-agent</id>
+ <phase>process-test-classes</phase>
+ <goals>
+ <goal>prepare-agent</goal>
+ </goals>
+ <configuration>
+ <destFile>${sonar.jacoco.reportPath}</destFile>
+ <propertyName>jacoco.agent.ut.arg</propertyName>
+ </configuration>
+ </execution>
+ <execution>
+ <id>prepare-it-agent</id>
+ <phase>pre-integration-test</phase>
+ <goals>
+ <goal>prepare-agent</goal>
+ </goals>
+ <configuration>
+ <destFile>${sonar.jacoco.itReportPath}</destFile>
+ <propertyName>jacoco.agent.it.arg</propertyName>
+ </configuration>
+ </execution>
+ </executions>
</plugin>
<plugin>
<groupId>org.opendaylight.yangtools</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>${failsafe.version}</version>
<configuration>
- <argLine>${testvm.argLine}</argLine>
+ <argLine>${testvm.argLine} ${jacoco.agent.it.arg}</argLine>
<systemProperties>
<property>
<name>logback.configurationFile</name>
<value>logback.xml</value>
</property>
</systemProperties>
+ <!-- Specific to generate mapping between tests and covered code -->
+ <properties>
+ <property>
+ <name>listener</name>
+ <value>org.sonar.java.jacoco.JUnitListener</value>
+ </property>
+ </properties>
</configuration>
<executions>
<execution>
<artifactId>maven-surefire-plugin</artifactId>
<version>${surefire.version}</version>
<configuration>
- <argLine>${testvm.argLine}</argLine>
+ <argLine>${testvm.argLine} ${jacoco.agent.ut.arg}</argLine>
<systemProperties>
<property>
<name>logback.configurationFile</name>
<value>logback.xml</value>
</property>
</systemProperties>
+ <!-- Specific to generate mapping between tests and covered code -->
+ <properties>
+ <property>
+ <name>listener</name>
+ <value>org.sonar.java.jacoco.JUnitListener</value>
+ </property>
+ </properties>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
</plugin>
+ <plugin>
+ <groupId>org.jacoco</groupId>
+ <artifactId>jacoco-maven-plugin</artifactId>
+ </plugin>
</plugins>
</build>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
</plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <forkCount>1</forkCount>
- <reuseForks>false</reuseForks>
- <perCoreThreadCount>false</perCoreThreadCount>
- <threadCount>1</threadCount>
- </configuration>
- </plugin>
</plugins>
</build>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
</plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <forkCount>1</forkCount>
- <reuseForks>false</reuseForks>
- <perCoreThreadCount>false</perCoreThreadCount>
- <threadCount>1</threadCount>
- </configuration>
- </plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
</execution>
</executions>
</plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <redirectTestOutputToFile>true</redirectTestOutputToFile>
- <parallel>classes</parallel>
- <forkCount>1C</forkCount>
- <reuseForks>false</reuseForks>
- <perCoreThreadCount>true</perCoreThreadCount>
- <threadCount>2</threadCount>
- </configuration>
- </plugin>
<plugin>
<groupId>org.codehaus.groovy.maven</groupId>
<artifactId>gmaven-plugin</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <forkCount>1</forkCount>
- <reuseForks>false</reuseForks>
- <perCoreThreadCount>false</perCoreThreadCount>
- </configuration>
- <executions>
- <execution>
- <id>default-test</id>
- <configuration>
- <skip>true</skip>
- </configuration>
- </execution>
- <execution>
- <id>integration-tests</id>
- <goals>
- <goal>test</goal>
- </goals>
- <phase>integration-test</phase>
- <configuration>
- <includes>
- <include>**/org/opendaylight/controller/config/yangjmxgenerator/it/*.java</include>
- </includes>
- <skip>false</skip>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
</project>
</parent>
<artifactId>sal-binding-it</artifactId>
- <properties>
- <sonar.jacoco.itReportPath>../sal-binding-broker/target/jacoco-it.exec</sonar.jacoco.itReportPath>
- <!-- Sonar jacoco plugin to get integration test coverage info -->
- <sonar.jacoco.reportPath>../sal-binding-broker/target/jacoco.exec</sonar.jacoco.reportPath>
- </properties>
-
<dependencies>
<dependency>
<groupId>ch.qos.logback</groupId>
</lifecycleMappingMetadata>
</configuration>
</plugin>
- <plugin>
- <groupId>org.jacoco</groupId>
- <artifactId>jacoco-maven-plugin</artifactId>
- <version>${jacoco.version}</version>
- <configuration>
- <destFile>../sal-binding-broker/target/jacoco-it.exec</destFile>
- <includes>
- <include>org.opendaylight.controller.*</include>
- </includes>
- </configuration>
- <executions>
- <execution>
- <id>pre-test</id>
- <goals>
- <goal>prepare-agent</goal>
- </goals>
- </execution>
- <execution>
- <id>post-test</id>
- <configuration>
- <skip>true</skip>
- </configuration>
- </execution>
- </executions>
- </plugin>
</plugins>
</pluginManagement>
<plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <reuseForks>false</reuseForks>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.jacoco</groupId>
- <artifactId>jacoco-maven-plugin</artifactId>
- <configuration>
- <includes>
- <include>org.opendaylight.controller.*</include>
- </includes>
- </configuration>
- <executions>
- <execution>
- <id>pre-test</id>
- <goals>
- <goal>prepare-agent</goal>
- </goals>
- </execution>
- <execution>
- <id>post-test</id>
- <goals>
- <goal>report</goal>
- </goals>
- <phase>test</phase>
- </execution>
- </executions>
- </plugin>
<plugin>
<groupId>org.ops4j.pax.exam</groupId>
<artifactId>maven-paxexam-plugin</artifactId>
<build>
<plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <forkCount>1</forkCount>
- <reuseForks>false</reuseForks>
- <perCoreThreadCount>false</perCoreThreadCount>
- </configuration>
- <executions>
- <execution>
- <id>default-test</id>
- <configuration>
- <skip>true</skip>
- </configuration>
- </execution>
- <execution>
- <id>integration-tests</id>
- <goals>
- <goal>test</goal>
- </goals>
- <phase>integration-test</phase>
- <configuration>
- <skip>false</skip>
- <argLine>-Dlogback.configurationFile=${maven.test.dest}/logback.xml</argLine>
- </configuration>
- </execution>
- </executions>
- </plugin>
<plugin>
<groupId>org.ops4j.pax.exam</groupId>
<artifactId>maven-paxexam-plugin</artifactId>