Skip to content

Commit

Permalink
sonarqube code coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
Christopher Gross cogross committed Jul 28, 2023
1 parent 2fc7d38 commit 1077cab
Show file tree
Hide file tree
Showing 7 changed files with 234 additions and 7 deletions.
188 changes: 188 additions & 0 deletions coverage/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,188 @@
<?xml version="1.0" encoding="UTF-8"?>
<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>
<parent>
<groupId>gov.nsa.datawave</groupId>
<artifactId>datawave-parent</artifactId>
<version>5.9.0-SNAPSHOT</version>
</parent>
<artifactId>coverage</artifactId>
<name>Datawave Code Coverage Aggregate Report</name>
<properties>
<maven.deploy.skip>true</maven.deploy.skip>
</properties>
<dependencies>
<dependency>
<groupId>gov.nsa.datawave</groupId>
<artifactId>datawave-accumulo-extensions</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>gov.nsa.datawave</groupId>
<artifactId>datawave-common</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>gov.nsa.datawave</groupId>
<artifactId>datawave-core</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>gov.nsa.datawave</groupId>
<artifactId>datawave-data-dictionary-core</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>gov.nsa.datawave</groupId>
<artifactId>datawave-edge-dictionary-core</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>gov.nsa.datawave</groupId>
<artifactId>datawave-edge-dictionary-core</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>gov.nsa.datawave</groupId>
<artifactId>datawave-index-stats</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>gov.nsa.datawave</groupId>
<artifactId>datawave-ingest-core</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>gov.nsa.datawave</groupId>
<artifactId>datawave-ingest-csv</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>gov.nsa.datawave</groupId>
<artifactId>datawave-ingest-json</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>gov.nsa.datawave</groupId>
<artifactId>datawave-ingest-nyctlc</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>gov.nsa.datawave</groupId>
<artifactId>datawave-ingest-wikipedia</artifactId>
<version>5.9.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>gov.nsa.datawave</groupId>
<artifactId>datawave-metrics-core</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>gov.nsa.datawave</groupId>
<artifactId>datawave-ops-tools-config-compare</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>gov.nsa.datawave</groupId>
<artifactId>datawave-ops-tools-index-validation</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>gov.nsa.datawave</groupId>
<artifactId>datawave-query-core</artifactId>
<version>5.9.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>gov.nsa.datawave.webservices</groupId>
<artifactId>datawave-ws-accumulo</artifactId>
<version>5.9.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>gov.nsa.datawave.webservices</groupId>
<artifactId>datawave-ws-accumulo</artifactId>
<version>5.9.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>gov.nsa.datawave.webservices</groupId>
<artifactId>datawave-ws-atom</artifactId>
<version>5.9.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>gov.nsa.datawave.webservices</groupId>
<artifactId>datawave-ws-cached-results</artifactId>
<version>5.9.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>gov.nsa.datawave.webservices</groupId>
<artifactId>datawave-ws-client</artifactId>
<version>5.9.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>gov.nsa.datawave.webservices</groupId>
<artifactId>datawave-ws-common</artifactId>
<version>5.9.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>gov.nsa.datawave.webservices</groupId>
<artifactId>datawave-ws-common-util</artifactId>
<version>5.9.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>gov.nsa.datawave.webservices</groupId>
<artifactId>datawave-ws-dictionary</artifactId>
<version>5.9.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>gov.nsa.datawave.webservices</groupId>
<artifactId>datawave-ws-map-reduce</artifactId>
<version>5.9.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>gov.nsa.datawave.webservices</groupId>
<artifactId>datawave-ws-map-reduce-embedded</artifactId>
<version>5.9.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>gov.nsa.datawave.webservices</groupId>
<artifactId>datawave-ws-map-reduce-status</artifactId>
<version>5.9.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>gov.nsa.datawave.webservices</groupId>
<artifactId>datawave-ws-model</artifactId>
<version>5.9.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>gov.nsa.datawave.webservices</groupId>
<artifactId>datawave-ws-modification</artifactId>
<version>5.9.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>gov.nsa.datawave.webservices</groupId>
<artifactId>datawave-ws-query</artifactId>
<version>5.9.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>gov.nsa.datawave.webservices</groupId>
<artifactId>datawave-ws-security</artifactId>
<version>5.9.0-SNAPSHOT</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<executions>
<execution>
<id>report</id>
<goals>
<goal>report-aggregate</goal>
</goals>
<phase>verify</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
39 changes: 39 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
<module>common-test</module>
<module>web-services</module>
<module>warehouse</module>
<module>coverage</module>
</modules>
<scm>
<connection>scm:git:https://github.com/NationalSecurityAgency/datawave.git</connection>
Expand All @@ -28,6 +29,7 @@
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<sonar.coverage.jacoco.xmlReportPaths>${maven.multiModuleProjectDirectory}/coverage/target/site/jacoco-aggregate/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths>
<surefire.forkCount>1C</surefire.forkCount>
<version.accumulo>2.1.0</version.accumulo>
<version.arquillian>1.4.1.Final</version.arquillian>
Expand Down Expand Up @@ -1362,6 +1364,11 @@
<failOnError>false</failOnError>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
Expand Down Expand Up @@ -1569,11 +1576,21 @@
<artifactId>xmlbeans-maven-plugin</artifactId>
<version>2.3.3-threadsafe</version>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.6</version>
</plugin>
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>maven-jetty-plugin</artifactId>
<version>6.1.26</version>
</plugin>
<plugin>
<groupId>org.sonarsource.scanner.maven</groupId>
<artifactId>sonar-maven-plugin</artifactId>
<version>3.9.1.2184</version>
</plugin>
<plugin>
<groupId>pl.project13.maven</groupId>
<artifactId>git-commit-id-plugin</artifactId>
Expand Down Expand Up @@ -1646,6 +1663,28 @@
</plugins>
</build>
<profiles>
<profile>
<id>coverage</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<executions>
<execution>
<id>prepare-agent</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>autoformat</id>
<activation>
Expand Down
2 changes: 1 addition & 1 deletion warehouse/core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@
<threadCountMethods>1</threadCountMethods>
<threadCountSuites>0</threadCountSuites>
<argLine>-XX:+TieredCompilation -XX:TieredStopAtLevel=1 -Dfile.encoding=UTF8 -Duser.timezone=GMT -Xmx1024m -Dapple.awt.UIElement=true -Djava.security.krb5.realm= -Djava.security.krb5.kdc=
--add-opens java.xml/jdk.xml.internal=ALL-UNNAMED</argLine>
--add-opens java.xml/jdk.xml.internal=ALL-UNNAMED @{argLine}</argLine>
<redirectTestOutputToFile>true</redirectTestOutputToFile>
<runOrder>random</runOrder>
<!-- write temporary files to the target directory.
Expand Down
4 changes: 2 additions & 2 deletions warehouse/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@
<threadCountSuites>0</threadCountSuites>
<!-- BT_ROOT is for the tests that use basis tokenization -->
<argLine>-XX:+TieredCompilation -XX:TieredStopAtLevel=1 -DBT_ROOT=${env.BT_ROOT} -Dfile.encoding=UTF8 -Duser.timezone=GMT -Xmx2g -Djava.library.path=${env.HADOOP_HOME}/lib/native -Dapple.awt.UIElement=true -Djava.security.krb5.realm= -Djava.security.krb5.kdc=
--add-opens java.xml/jdk.xml.internal=ALL-UNNAMED</argLine>
--add-opens java.xml/jdk.xml.internal=ALL-UNNAMED @{argLine}</argLine>
<redirectTestOutputToFile>true</redirectTestOutputToFile>
<runOrder>${runOrder}</runOrder>
<environmentVariables>
Expand Down Expand Up @@ -526,7 +526,7 @@
<configuration combine.children="append">
<reuseForks>false</reuseForks>
<argLine>-XX:+TieredCompilation -XX:TieredStopAtLevel=1 -DBT_ROOT=${env.BT_ROOT} -Dfile.encoding=UTF8 -Duser.timezone=GMT -Xmx2g -Djava.library.path=${env.HADOOP_HOME}/lib/native -Dapple.awt.UIElement=true -Djava.security.krb5.realm= -Djava.security.krb5.kdc=
--add-opens java.xml/jdk.xml.internal=ALL-UNNAMED</argLine>
--add-opens java.xml/jdk.xml.internal=ALL-UNNAMED @{argLine}</argLine>
<groups>datawave.common.test.integration.IntegrationTest</groups>
<redirectTestOutputToFile>true</redirectTestOutputToFile>
<runOrder>${runOrder}</runOrder>
Expand Down
2 changes: 1 addition & 1 deletion web-services/map-reduce/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ another classloader.
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<argLine>-XX:+TieredCompilation -XX:TieredStopAtLevel=1 -Dfile.encoding=UTF8 -Duser.timezone=GMT -Xmx1024m -Dapple.awt.UIElement=true -Djava.security.krb5.realm= -Djava.security.krb5.kdc=
--add-opens java.xml/jdk.xml.internal=ALL-UNNAMED</argLine>
--add-opens java.xml/jdk.xml.internal=ALL-UNNAMED @{argLine}</argLine>
<!-- <forkMode>pertest</forkMode> -->
<reuseForks>false</reuseForks>
</configuration>
Expand Down
4 changes: 2 additions & 2 deletions web-services/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@
<threadCountMethods>1</threadCountMethods>
<threadCountSuites>0</threadCountSuites>
<argLine>-XX:+TieredCompilation -XX:TieredStopAtLevel=1 -Dfile.encoding=UTF8 -Duser.timezone=GMT -Xmx1024m -Dapple.awt.UIElement=true -Djava.security.krb5.realm= -Djava.security.krb5.kdc=
--add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED</argLine>
--add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED @{argLine}</argLine>
<redirectTestOutputToFile>true</redirectTestOutputToFile>
<runOrder>random</runOrder>
<!-- write temporary files to the target directory.
Expand Down Expand Up @@ -613,7 +613,7 @@
<configuration combine.children="append">
<reuseForks>false</reuseForks>
<argLine>-XX:+TieredCompilation -XX:TieredStopAtLevel=1 -DBT_ROOT=${env.BT_ROOT} -Dfile.encoding=UTF8 -Duser.timezone=GMT -Xmx2g -Djava.library.path=${env.HADOOP_HOME}/lib/native -Dapple.awt.UIElement=true -Djava.security.krb5.realm= -Djava.security.krb5.kdc=
--add-opens java.xml/jdk.xml.internal=ALL-UNNAMED</argLine>
--add-opens java.xml/jdk.xml.internal=ALL-UNNAMED @{argLine}</argLine>
<groups>datawave.common.test.integration.IntegrationTest</groups>
<redirectTestOutputToFile>true</redirectTestOutputToFile>
<runOrder>${runOrder}</runOrder>
Expand Down
2 changes: 1 addition & 1 deletion web-services/query/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@
<additionalClasspathElements>
<additionalClasspathElement>${basedir}/conf</additionalClasspathElement>
</additionalClasspathElements>
<argLine>--add-opens java.xml/jdk.xml.internal=ALL-UNNAMED</argLine>
<argLine>--add-opens java.xml/jdk.xml.internal=ALL-UNNAMED @{argLine}</argLine>
</configuration>
</plugin>
</plugins>
Expand Down

0 comments on commit 1077cab

Please sign in to comment.