Remove 'All rights reserved.' on apache 2 license
[externalapi/nbi.git] / pom.xml
diff --git a/pom.xml b/pom.xml
index 80f0002..9066b0f 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -1,8 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
 
-
-        Copyright (c) 2017 Orange.  All rights reserved.
+        Copyright (c) 2018 Orange
 
         Licensed under the Apache License, Version 2.0 (the "License");
         you may not use this file except in compliance with the License.
@@ -18,7 +17,7 @@
 
 -->
 <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">
+                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>
 
        <groupId>org.onap.externalapi-nbi</groupId>
@@ -26,7 +25,7 @@
        <version>1.0.0-SNAPSHOT</version>
        <packaging>jar</packaging>
 
-       <name>nbi-rest-services</name>
+       <name>externalapi-nbi</name>
 
        <parent>
                <groupId>org.springframework.boot</groupId>
@@ -35,7 +34,6 @@
                <relativePath /> <!-- lookup parent from repository -->
        </parent>
 
-
        <properties>
                <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
                <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
                <!--docker -->
                <docker.tag>${project.version}-${timestamp}</docker.tag>
                <docker.latest.tag>${project.version}-latest</docker.latest.tag>
+               <!--sonar -->
+            <sonar.language>java</sonar.language>
+            <sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
+            <sonar.surefire.reportsPath>${project.build.directory}/surefire-reports</sonar.surefire.reportsPath>
+            <sonar.jacoco.reportPath>${project.build.directory}/coverage-reports/jacoco.exec</sonar.jacoco.reportPath>
+            <sonar.jacoco.itReportPath>${project.build.directory}/coverage-reports/jacoco-it.exec</sonar.jacoco.itReportPath>
+            <sonar.jacoco.reportMissing.force.zero>true</sonar.jacoco.reportMissing.force.zero>
+            <sonar.projectVersion>${project.version}</sonar.projectVersion>
+               <sonar.coverage.exclusions>**/model/**/*</sonar.coverage.exclusions>
        </properties>
 
        <repositories>
 
                <!-- mysql -->
 
-               <dependency>
-                       <groupId>mysql</groupId>
-                       <artifactId>mysql-connector-java</artifactId>
-               </dependency>
                <dependency>
                        <groupId>org.mariadb.jdbc</groupId>
                        <artifactId>mariadb-java-client</artifactId>
                        <groupId>com.bazaarvoice.jolt</groupId>
                        <artifactId>jolt-core</artifactId>
                        <version>0.1.0</version>
+                       <exclusions>
+                               <exclusion>
+                                       <groupId>com.fasterxml.jackson.core</groupId>
+                                       <artifactId>jackson-databind</artifactId>
+                               </exclusion>
+                       </exclusions>
                </dependency>
 
                <dependency>
                        <scope>test</scope>
                </dependency>
 
-               <!-- test h2  -->
+               <!-- test h2 -->
 
                <dependency>
                        <groupId>com.h2database</groupId>
                                <configuration>
                                        <header>LICENSE.TXT</header>
                                        <includes>
-                                               <include>src/main/java/**</include>
-                                               <include>src/test/java/**</include>
+                                               <include>restclient/**</include>
+                                               <include>src/**</include>
                                                <include>pom.xml</include>
                                        </includes>
                                        <skipExistingHeaders>true</skipExistingHeaders>
                                        <skip>false</skip>
+                                       <mapping>
+                                               <http>SCRIPT_STYLE</http>
+                                       </mapping>
                                </configuration>
                                <executions>
                                        <execution>
                                        </execution>
                                </executions>
                        </plugin>
+                       <plugin>
+                               <groupId>org.codehaus.mojo</groupId>
+                               <artifactId>sonar-maven-plugin</artifactId>
+                               <version>3.2</version>
+                       </plugin>
+                       <plugin>
+                            <groupId>org.jacoco</groupId>
+                            <artifactId>jacoco-maven-plugin</artifactId>
+                            <version>0.8.1</version>
+                            <configuration>
+                                 <dumpOnExit>true</dumpOnExit>
+                                 <includes>
+                                       <include>org.onap.nbi.*</include>
+                                 </includes>
+                                 <excludes>
+                                       <exclude>**/model/**/*</exclude>
+                                 </excludes>        
+                            </configuration>
+                            <executions>
+                                 <execution>
+                                       <id>pre-unit-test</id>
+                                       <goals>
+                                            <goal>prepare-agent</goal>
+                                       </goals>
+                                       <configuration>
+                                            <destFile>${project.build.directory}/coverage-reports/jacoco.exec</destFile>
+                                            <!-- <append>true</append> -->
+                                       </configuration>
+                                 </execution>
+                                 <execution>
+                                       <id>pre-integration-test</id>
+                                       <phase>pre-integration-test</phase>
+                                       <goals>
+                                            <goal>prepare-agent</goal>
+                                       </goals>
+                                       <configuration>
+                                            <destFile>${project.build.directory}/coverage-reports/jacoco-it.exec</destFile>
+                                            <!-- <append>true</append> -->
+                                       </configuration>
+                                 </execution>
+                                 <execution>
+                                       <goals>
+                                            <goal>merge</goal>
+                                       </goals>
+                                       <phase>post-integration-test</phase>
+                                       <configuration>
+                                            <fileSets>
+                                                  <fileSet implementation="org.apache.maven.shared.model.fileset.FileSet">
+                                                      <directory>${project.build.directory}/coverage-reports</directory>
+                                                      <includes>
+                                                            <include>*.exec</include>
+                                                      </includes>
+                                                 </fileSet>
+                                            </fileSets>
+                                            <destFile>${project.build.directory}/jacoco-dev.exec</destFile>
+                                       </configuration>
+                                  </execution>
+                            </executions>
+                       </plugin>
+                       <plugin>
+                               <artifactId>maven-source-plugin</artifactId>
+                               <executions>
+                                       <execution>
+                                               <id>attach-sources</id>
+                                               <phase>deploy</phase>
+                                               <goals>
+                                                       <goal>jar-no-fork</goal>
+                                               </goals>
+                                       </execution>
+                               </executions>
+                       </plugin>
                </plugins>
        </build>
 
                                        <plugin>
                                                <groupId>io.fabric8</groupId>
                                                <artifactId>docker-maven-plugin</artifactId>
-                                               <version>0.19.1</version>
+                                               <version>0.25.0</version>
                                                <configuration>
                                                        <verbose>true</verbose>
                                                        <apiVersion>1.23</apiVersion>
                                                                                        <tag>${docker.latest.tag}</tag>
                                                                                </tags>
                                                                                <dockerFileDir>${project.basedir}</dockerFileDir>
+                                                                               <args>
+                                                                                       <PKG_FILENAME>${project.build.finalName}.${project.packaging}</PKG_FILENAME>
+                                                                               </args>
                                                                        </build>
                                                                </image>
                                                        </images>
                                                                        <goal>remove</goal>
                                                                </goals>
                                                                <configuration>
-                                                                       <removeAll>true</removeAll>
-                                                                       <image>nbi</image>
+                                                                       <removeMode>all</removeMode>
                                                                </configuration>
                                                        </execution>
                                                        <execution>