Fix jacoco reports for yang parser and pgsql schema generator
Yang parser and pgsql schema generator jacoco report generation fixed
Issue-ID: SMO-154
Change-Id: I25c3ba220d090c185652e31b2d8ed17ca34402b6
Signed-off-by: aravind.est <aravindhan.a@est.tech>
diff --git a/pgsql-schema-generator/pom.xml b/pgsql-schema-generator/pom.xml
index 4dfd924..48fa2cf 100644
--- a/pgsql-schema-generator/pom.xml
+++ b/pgsql-schema-generator/pom.xml
@@ -156,6 +156,50 @@
</execution>
</executions>
</plugin>
+ <plugin>
+ <groupId>org.jacoco</groupId>
+ <artifactId>jacoco-maven-plugin</artifactId>
+ <version>${version.jacoco-maven.plugin}</version>
+ <configuration>
+ <append>true</append>
+ </configuration>
+ <executions>
+ <execution>
+ <id>jacoco-check</id>
+ <goals>
+ <goal>check</goal>
+ </goals>
+ <phase>test</phase>
+ <configuration>
+ <rules>
+ <rule implementation="org.jacoco.maven.RuleConfiguration">
+ <element>BUNDLE</element>
+ <limits>
+ <limit implementation="org.jacoco.report.check.Limit">
+ <counter>INSTRUCTION</counter>
+ <value>COVEREDRATIO</value>
+ <minimum>${jacoco-maven-plugin.coveredratio.minimum}</minimum>
+ </limit>
+ </limits>
+ </rule>
+ </rules>
+ </configuration>
+ </execution>
+ <execution>
+ <id>prepare-unit-tests</id>
+ <goals>
+ <goal>prepare-agent</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>report</id>
+ <phase>verify</phase>
+ <goals>
+ <goal>report</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</build>
diff --git a/yang-parser/pom.xml b/yang-parser/pom.xml
index 165322d..25c1274 100644
--- a/yang-parser/pom.xml
+++ b/yang-parser/pom.xml
@@ -193,37 +193,53 @@
</execution>
</executions>
</plugin>
+ <plugin>
+ <groupId>org.jacoco</groupId>
+ <artifactId>jacoco-maven-plugin</artifactId>
+ <version>${version.jacoco-maven.plugin}</version>
+ <configuration>
+ <append>true</append>
+ </configuration>
+ <executions>
+ <execution>
+ <id>jacoco-check</id>
+ <goals>
+ <goal>check</goal>
+ </goals>
+ <phase>test</phase>
+ <configuration>
+ <rules>
+ <rule implementation="org.jacoco.maven.RuleConfiguration">
+ <element>BUNDLE</element>
+ <limits>
+ <limit implementation="org.jacoco.report.check.Limit">
+ <counter>INSTRUCTION</counter>
+ <value>COVEREDRATIO</value>
+ <minimum>${jacoco-maven-plugin.coveredratio.minimum}</minimum>
+ </limit>
+ </limits>
+ </rule>
+ </rules>
+ </configuration>
+ </execution>
+ <execution>
+ <id>prepare-unit-tests</id>
+ <goals>
+ <goal>prepare-agent</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>report</id>
+ <phase>verify</phase>
+ <goals>
+ <goal>report</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
- <pluginManagement>
- <plugins>
- <plugin>
- <groupId>org.jacoco</groupId>
- <artifactId>jacoco-maven-plugin</artifactId>
- <version>0.8.4</version>
- <executions>
- <execution>
- <id>prepare-unit-tests</id>
- <goals>
- <goal>prepare-agent</goal>
- </goals>
- </execution>
- <execution>
- <id>report</id>
- <phase>test</phase>
- <goals>
- <goal>report</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <outputDirectory>${project.build.directory}/coverage-reports/jacoco</outputDirectory>
- </configuration>
- </plugin>
- </plugins>
- </pluginManagement>
</build>
-
<dependencies>
<dependency>
<groupId>junit</groupId>