nbi doc update
[externalapi/nbi.git] / pom.xml
diff --git a/pom.xml b/pom.xml
index 6455a8f..3cdb75b 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -1,14 +1,31 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+        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.
+        You may obtain a copy of the License at
+
+            http://www.apache.org/licenses/LICENSE-2.0
+
+        Unless required by applicable law or agreed to in writing, software
+        distributed under the License is distributed on an "AS IS" BASIS,
+        WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+        See the License for the specific language governing permissions and
+        limitations under the License.
+
+-->
 <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.nbi</groupId>
+       <groupId>org.onap.externalapi-nbi</groupId>
        <artifactId>nbi-rest-services</artifactId>
        <version>1.0.0-SNAPSHOT</version>
        <packaging>jar</packaging>
 
-       <name>nbi-rest-services</name>
+       <name>externalapi-nbi</name>
 
        <parent>
                <groupId>org.springframework.boot</groupId>
                <releaseNexusPath>content/repositories/releases/</releaseNexusPath>
                <stagingNexusPath>content/repositories/staging/</stagingNexusPath>
                <java.version>1.8</java.version>
+               <docker.pull.registry>nexus3.onap.org:10001</docker.pull.registry>
+               <docker.push.registry>nexus3.onap.org:10003</docker.push.registry>
+               <timestamp>${maven.build.timestamp}</timestamp>
+               <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
+               <!--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>
                <repository>
                        <id>ecomp-snapshots</id>
                        <name>Snapshot Repository</name>
-                       <url>${nexusproxy}/${snapshotNexusPath}</url>
+                       <url>https://nexus.onap.org/content/repositories/releases/</url>
                </repository>
                <repository>
                        <id>ecomp-staging</id>
                        <name>Staging Repository</name>
-                       <url>${nexusproxy}/${stagingNexusPath}</url>
+                       <url>https://nexus.onap.org/content/repositories/staging/</url>
                </repository>
        </repositories>
 
                <dependency>
                        <groupId>org.springframework.boot</groupId>
                        <artifactId>spring-boot-starter-web</artifactId>
+                       <exclusions>
+                               <exclusion>
+                                       <groupId>ch.qos.logback</groupId>
+                                       <artifactId>logback-classic</artifactId>
+                               </exclusion>
+                       </exclusions>
+               </dependency>
+
+               <dependency>
+                       <groupId>ch.qos.logback</groupId>
+                       <artifactId>logback-classic</artifactId>
+                       <version>1.2.3</version>
                </dependency>
 
                <dependency>
                <!-- mysql -->
 
                <dependency>
-                       <groupId>mysql</groupId>
-                       <artifactId>mysql-connector-java</artifactId>
+                       <groupId>org.mariadb.jdbc</groupId>
+                       <artifactId>mariadb-java-client</artifactId>
+                       <version>1.1.7</version>
                </dependency>
 
                <!-- swagger -->
                        <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>
                                        </dependency>
                                </dependencies>
                        </plugin>
+                       <plugin>
+                               <groupId>com.mycila</groupId>
+                               <artifactId>license-maven-plugin</artifactId>
+                               <version>3.0</version>
+                               <configuration>
+                                       <header>LICENSE.TXT</header>
+                                       <includes>
+                                               <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>
+                                               <goals>
+                                                       <!-- Set goal to "format" to auto update license headers -->
+                                                       <goal>check</goal>
+                                               </goals>
+                                               <phase>process-sources</phase>
+                                       </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>
+
+
+
+       <profiles>
+               <profile>
+                       <id>docker</id>
+                       <build>
+                               <plugins>
+                                       <plugin>
+                                               <groupId>io.fabric8</groupId>
+                                               <artifactId>docker-maven-plugin</artifactId>
+                                               <version>0.25.0</version>
+                                               <configuration>
+                                                       <verbose>true</verbose>
+                                                       <apiVersion>1.23</apiVersion>
+                                                       <pullRegistry>${docker.pull.registry}</pullRegistry>
+                                                       <pushRegistry>${docker.push.registry}</pushRegistry>
+                                                       <images>
+                                                               <image>
+                                                                       <name>onap/externalapi/nbi</name>
+                                                                       <alias>onap/externalapi/nbi</alias>
+                                                                       <build>
+                                                                               <cleanup>true</cleanup>
+                                                                               <tags>
+                                                                                       <tag>${docker.tag}</tag>
+                                                                                       <tag>${docker.latest.tag}</tag>
+                                                                               </tags>
+                                                                               <dockerFileDir>${project.basedir}</dockerFileDir>
+                                                                               <args>
+                                                                                       <PKG_FILENAME>${project.build.finalName}.${project.packaging}</PKG_FILENAME>
+                                                                               </args>
+                                                                       </build>
+                                                               </image>
+                                                       </images>
+                                               </configuration>
+                                               <executions>
+                                                       <execution>
+                                                               <id>clean-images</id>
+                                                               <phase>pre-clean</phase>
+                                                               <goals>
+                                                                       <goal>remove</goal>
+                                                               </goals>
+                                                               <configuration>
+                                                                       <removeMode>all</removeMode>
+                                                               </configuration>
+                                                       </execution>
+                                                       <execution>
+                                                               <id>generate-images</id>
+                                                               <phase>package</phase>
+                                                               <goals>
+                                                                       <goal>build</goal>
+                                                               </goals>
+                                                       </execution>
+                                                       <execution>
+                                                               <id>push-images</id>
+                                                               <phase>deploy</phase>
+                                                               <goals>
+                                                                       <goal>push</goal>
+                                                               </goals>
+                                                       </execution>
+                                               </executions>
+                                       </plugin>
+                               </plugins>
+                       </build>
+               </profile>
+       </profiles>
+
 </project>