Few Sonar Fixes
[cps.git] / cps-parent / pom.xml
index ebd421b..9c1760c 100644 (file)
@@ -20,7 +20,7 @@
         <base.image>openjdk:11-jre-slim</base.image>
         <java.version>11</java.version>
         <jib-maven-plugin.version>2.6.0</jib-maven-plugin.version>
-        <minimum-coverage>0.20</minimum-coverage>
+        <minimum-coverage>0.35</minimum-coverage>
         <nexusproxy>https://nexus.onap.org</nexusproxy>
         <oparent.version>3.1.0</oparent.version>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
                 </pluginManagement>
             </build>
         </profile>
+        <profile>
+            <id>skip-db-tests</id>
+            <activation>
+                <!-- exclude module tests by default till Jenkins is configured to support test containers -->
+                <activeByDefault>true</activeByDefault>
+            </activation>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-surefire-plugin</artifactId>
+                        <configuration>
+                            <excludes>
+                                <exclude>**/spi/impl/*Test.java</exclude>
+                            </excludes>
+                        </configuration>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
     </profiles>
 
     <dependencyManagement>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-surefire-plugin</artifactId>
                 <configuration>
+                    <!--suppress UnresolvedMavenProperty -->
                     <argLine>${surefireArgLine}</argLine>
                     <useFile>false</useFile>
                     <includes>
                             <goal>check</goal>
                         </goals>
                         <configuration>
+                            <excludes>
+                                <exclude>org/onap/cps/rest/model/*</exclude>
+                            </excludes>
                             <dataFile>${project.build.directory}/code-coverage/jacoco-ut.exec</dataFile>
                             <rules>
                                 <rule>