Skip to content

Commit

Permalink
Added coverage to Maven build.
Browse files Browse the repository at this point in the history
  • Loading branch information
volsch committed Mar 19, 2019
1 parent d072191 commit dfcef4f
Show file tree
Hide file tree
Showing 8 changed files with 176 additions and 4 deletions.
4 changes: 4 additions & 0 deletions app/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,10 @@
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
</plugin>
</plugins>
</build>

Expand Down
6 changes: 5 additions & 1 deletion common/pom.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2004-2018, University of Oslo
~ Copyright (c) 2004-2019, University of Oslo
~ All rights reserved.
~
~ Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -87,6 +87,10 @@
<groupId>com.mysema.maven</groupId>
<artifactId>apt-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
4 changes: 4 additions & 0 deletions dhis/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@
<groupId>com.mysema.maven</groupId>
<artifactId>apt-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
11 changes: 10 additions & 1 deletion fhir-dstu3/pom.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2004-2018, University of Oslo
~ Copyright (c) 2004-2019, University of Oslo
~ All rights reserved.
~
~ Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -64,4 +64,13 @@
<artifactId>hapi-fhir-validation-resources-dstu3</artifactId>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
9 changes: 9 additions & 0 deletions fhir-r4/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,13 @@
<scope>test</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
6 changes: 5 additions & 1 deletion fhir/pom.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2004-2018, University of Oslo
~ Copyright (c) 2004-2019, University of Oslo
~ All rights reserved.
~
~ Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -179,6 +179,10 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
35 changes: 34 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
<module>fhir-dstu3</module>
<module>fhir-r4</module>
<module>app</module>
<module>summary</module>
</modules>

<properties>
Expand All @@ -65,8 +66,10 @@

<hapi-fhir.version>3.7.0</hapi-fhir.version>
<spring.cloud.version>2.0.1.RELEASE</spring.cloud.version>
<jacoco.version>0.8.2</jacoco.version>

<skipTests>false</skipTests>
<skipCoverage>true</skipCoverage>
</properties>

<scm>
Expand Down Expand Up @@ -201,11 +204,41 @@
<configuration>
<redirectTestOutputToFile>true</redirectTestOutputToFile>
<!-- since DHIS 2 has no time zone support but FHIR has, tests must be executed with a specific time zone -->
<argLine>-Duser.timezone=CET</argLine>
<argLine>-Duser.timezone=CET ${surefireArgLine}</argLine>
<!-- due to asynchronous jobs stack traces must not be trimmed in non test source -->
<trimStackTrace>false</trimStackTrace>
</configuration>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>${jacoco.version}</version>
<configuration>
<skip>${skipCoverage}</skip>
</configuration>
<executions>
<execution>
<id>prepare-unit</id>
<goals>
<goal>prepare-agent</goal>
</goals>
<configuration>
<includes>org/dhis2/fhir/adapter/**</includes>
<propertyName>surefireArgLine</propertyName>
</configuration>
</execution>
<execution>
<id>report</id>
<phase>prepare-package</phase>
<goals>
<goal>report</goal>
</goals>
<configuration>
<includes>org/dhis2/fhir/adapter/**</includes>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
</build>
Expand Down
105 changes: 105 additions & 0 deletions summary/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2004-2019, University of Oslo
~ All rights reserved.
~
~ Redistribution and use in source and binary forms, with or without
~ modification, are permitted provided that the following conditions are met:
~ Redistributions of source code must retain the above copyright notice, this
~ list of conditions and the following disclaimer.
~
~ Redistributions in binary form must reproduce the above copyright notice,
~ this list of conditions and the following disclaimer in the documentation
~ and/or other materials provided with the distribution.
~ Neither the name of the HISP project nor the names of its contributors may
~ be used to endorse or promote products derived from this software without
~ specific prior written permission.
~
~ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
~ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
~ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
~ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
~ ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
~ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
~ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
~ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
~ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
~ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-->

<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>

<artifactId>dhis2-fhir-adapter-summary</artifactId>
<packaging>jar</packaging>

<parent>
<groupId>org.dhis2.fhir.adapter</groupId>
<artifactId>dhis2-fhir-adapter</artifactId>
<version>1.1.0-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>

<name>dhis2-fhir-adapter-summary</name>
<description>
The summary of building the project.
</description>

<dependencies>
<dependency>
<groupId>org.dhis2.fhir.adapter</groupId>
<artifactId>dhis2-fhir-adapter-common</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.dhis2.fhir.adapter</groupId>
<artifactId>dhis2-fhir-adapter-dhis</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.dhis2.fhir.adapter</groupId>
<artifactId>dhis2-fhir-adapter-fhir</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.dhis2.fhir.adapter</groupId>
<artifactId>dhis2-fhir-adapter-fhir-dstu3</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.dhis2.fhir.adapter</groupId>
<artifactId>dhis2-fhir-adapter-fhir-r4</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.dhis2.fhir.adapter</groupId>
<artifactId>dhis2-fhir-adapter-app</artifactId>
<version>${project.version}</version>
<type>war</type>
<scope>compile</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<executions>
<execution>
<id>report</id>
<phase>verify</phase>
<goals>
<goal>report-aggregate</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

0 comments on commit dfcef4f

Please sign in to comment.