diff options
-rw-r--r-- | event-client-api/pom.xml | 9 | ||||
-rw-r--r-- | event-client-dmaap/pom.xml | 6 | ||||
-rw-r--r-- | event-client-kafka/pom.xml | 6 | ||||
-rw-r--r-- | event-client-rabbitmq/pom.xml | 79 | ||||
-rw-r--r-- | pom.xml | 50 |
5 files changed, 107 insertions, 43 deletions
diff --git a/event-client-api/pom.xml b/event-client-api/pom.xml index f1f42bf..dfda911 100644 --- a/event-client-api/pom.xml +++ b/event-client-api/pom.xml @@ -20,7 +20,8 @@ ============LICENSE_END========================================================= --> -<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"> +<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> @@ -32,4 +33,10 @@ <artifactId>event-client-api</artifactId> + <properties> + <!-- Minimum code coverage percentage. Please update this figure as coverage increases to prevent any drops in + coverage caused by new changes. Note that this figure cannot be lower than the ONAP requirement of 0.55 --> + <jacoco.line.coverage.limit>0.85</jacoco.line.coverage.limit> + </properties> + </project> diff --git a/event-client-dmaap/pom.xml b/event-client-dmaap/pom.xml index d9b6db9..8bb61cb 100644 --- a/event-client-dmaap/pom.xml +++ b/event-client-dmaap/pom.xml @@ -20,7 +20,8 @@ ============LICENSE_END========================================================= --> -<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"> +<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> @@ -35,6 +36,9 @@ <properties> <common.logging.version>1.2.2</common.logging.version> <dmaap.client.version>1.1.5</dmaap.client.version> + <!-- Minimum code coverage percentage. Please update this figure as coverage increases to prevent any drops in + coverage caused by new changes. Note that this figure cannot be lower than the ONAP requirement of 0.55 --> + <jacoco.line.coverage.limit>0.90</jacoco.line.coverage.limit> </properties> <dependencies> diff --git a/event-client-kafka/pom.xml b/event-client-kafka/pom.xml index b649117..b210b96 100644 --- a/event-client-kafka/pom.xml +++ b/event-client-kafka/pom.xml @@ -20,7 +20,8 @@ ============LICENSE_END========================================================= --> -<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"> +<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> @@ -34,6 +35,9 @@ <properties> <common.logging.version>1.2.2</common.logging.version> + <!-- Minimum code coverage percentage. Please update this figure as coverage increases to prevent any drops in + coverage caused by new changes. Note that this figure cannot be lower than the ONAP requirement of 0.55 --> + <jacoco.line.coverage.limit>0.90</jacoco.line.coverage.limit> </properties> <dependencies> diff --git a/event-client-rabbitmq/pom.xml b/event-client-rabbitmq/pom.xml index bd882e8..bbee653 100644 --- a/event-client-rabbitmq/pom.xml +++ b/event-client-rabbitmq/pom.xml @@ -20,42 +20,47 @@ ============LICENSE_END========================================================= --> -<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.onap.aai.event-client</groupId> - <artifactId>event-client</artifactId> - <version>1.4.1-SNAPSHOT</version> - </parent> - - <artifactId>event-client-rabbitmq</artifactId> - - <properties> - <common.logging.version>1.2.2</common.logging.version> - </properties> - - <dependencies> - <dependency> - <groupId>com.rabbitmq</groupId> - <artifactId>amqp-client</artifactId> - <version>5.4.3</version> - </dependency> - <dependency> - <groupId>org.onap.aai.logging-service</groupId> - <artifactId>common-logging</artifactId> - <version>${common.logging.version}</version> - </dependency> - <dependency> +<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>org.onap.aai.event-client</groupId> - <artifactId>event-client-api</artifactId> - <version>${project.parent.version}</version> - </dependency> - <dependency> - <groupId>org.mockito</groupId> - <artifactId>mockito-all</artifactId> - <version>1.10.19</version> - <scope>test</scope> - </dependency> - </dependencies> + <artifactId>event-client</artifactId> + <version>1.4.1-SNAPSHOT</version> + </parent> + + <artifactId>event-client-rabbitmq</artifactId> + + <properties> + <common.logging.version>1.2.2</common.logging.version> + <!-- Minimum code coverage percentage. Please update this figure as coverage increases to prevent any drops in + coverage caused by new changes. Note that this figure cannot be lower than the ONAP requirement of 0.55 --> + <jacoco.line.coverage.limit>0.64</jacoco.line.coverage.limit> + </properties> + + <dependencies> + <dependency> + <groupId>com.rabbitmq</groupId> + <artifactId>amqp-client</artifactId> + <version>5.4.3</version> + </dependency> + <dependency> + <groupId>org.onap.aai.logging-service</groupId> + <artifactId>common-logging</artifactId> + <version>${common.logging.version}</version> + </dependency> + <dependency> + <groupId>org.onap.aai.event-client</groupId> + <artifactId>event-client-api</artifactId> + <version>${project.parent.version}</version> + </dependency> + <dependency> + <groupId>org.mockito</groupId> + <artifactId>mockito-all</artifactId> + <version>1.10.19</version> + <scope>test</scope> + </dependency> + </dependencies> </project> @@ -21,7 +21,8 @@ ============LICENSE_END========================================================= --> -<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"> +<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> @@ -42,6 +43,10 @@ <maven.compiler.source>1.8</maven.compiler.source> <maven.compiler.target>1.8</maven.compiler.target> <sitePath>/content/sites/site/org/onap/aai/${project.artifactId}/${project.version}</sitePath> + <!-- Minimum code coverage percentage. Please update this figure as coverage increases to prevent any drops in + coverage caused by new changes. Note that this figure cannot be lower than the ONAP requirement of 0.55 --> + <jacoco.line.coverage.limit>0.90</jacoco.line.coverage.limit> + <jacoco.report.directory>${project.build.directory}/coverage-reports</jacoco.report.directory> </properties> <modules> @@ -131,20 +136,59 @@ <plugin> <groupId>org.jacoco</groupId> <artifactId>jacoco-maven-plugin</artifactId> + <version>0.7.9</version> <configuration> <dumpOnExit>true</dumpOnExit> </configuration> <executions> <execution> - <id>jacoco-initialize-unit-tests</id> + <id>pre-unit-test</id> <goals> <goal>prepare-agent</goal> </goals> <configuration> - <destFile>${project.build.directory}/coverage-reports/jacoco.exec</destFile> + <destFile>${jacoco.report.directory}/jacoco.exec</destFile> + <propertyName>surefireArgLine</propertyName> <!-- <append>true</append> --> </configuration> </execution> + <execution> + <id>post-unit-test</id> + <phase>test</phase> + <goals> + <goal>report</goal> + </goals> + <configuration> + <!-- Sets the path to the file which contains the execution data. --> + <dataFile>${jacoco.report.directory}/jacoco.exec</dataFile> + <!-- Sets the output directory for the code coverage report. --> + <outputDirectory>${jacoco.report.directory}/jacoco</outputDirectory> + </configuration> + </execution> + <execution> + <id>default-check</id> + <goals> + <goal>check</goal> + </goals> + <configuration> + <dataFile>${jacoco.report.directory}/jacoco.exec</dataFile> + <rules> + <!-- implementation is needed only for Maven 2 --> + <rule + implementation="org.jacoco.maven.RuleConfiguration"> + <element>BUNDLE</element> + <limits> + <limit + implementation="org.jacoco.report.check.Limit"> + <counter>LINE</counter> + <value>COVEREDRATIO</value> + <minimum>${jacoco.line.coverage.limit}</minimum> + </limit> + </limits> + </rule> + </rules> + </configuration> + </execution> </executions> </plugin> </plugins> |