summaryrefslogtreecommitdiffstats
path: root/pom.xml
diff options
context:
space:
mode:
authorMatthieu Geerebaert <matthieu.geerebaert@orange.com>2018-04-10 13:05:41 +0000
committerGerrit Code Review <gerrit@onap.org>2018-04-10 13:05:41 +0000
commitbebc9bf71e5e7a33693cbaef9400e38b6a9aba4d (patch)
treecf39315dd512434d714968997051dec43b635ad3 /pom.xml
parent9cc8a3384146721ac1b129e1d9854d23d9c65f69 (diff)
parent6817f5b502e38c46a9eaa107e00fc912d521695a (diff)
Merge "Add files for build and docker"
Diffstat (limited to 'pom.xml')
-rw-r--r--pom.xml97
1 files changed, 81 insertions, 16 deletions
diff --git a/pom.xml b/pom.xml
index d03e11e..a85cb4c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -35,6 +35,7 @@
<relativePath /> <!-- lookup parent from repository -->
</parent>
+
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
@@ -43,6 +44,13 @@
<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>
</properties>
<repositories>
@@ -55,28 +63,15 @@
<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>
- <distributionManagement>
- <repository>
- <id>ecomp-releases</id>
- <name>Release Repository</name>
- <url>${nexusproxy}/${releaseNexusPath}</url>
- </repository>
- <snapshotRepository>
- <id>ecomp-snapshots</id>
- <name>Snapshot Repository</name>
- <url>${nexusproxy}/${snapshotNexusPath}</url>
- </snapshotRepository>
- </distributionManagement>
-
<licenses>
<license>
<name>Apache2</name>
@@ -133,6 +128,11 @@
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.mariadb.jdbc</groupId>
+ <artifactId>mariadb-java-client</artifactId>
+ <version>1.1.7</version>
+ </dependency>
<!-- swagger -->
@@ -172,7 +172,7 @@
<scope>test</scope>
</dependency>
- <!-- test h2 -->
+ <!-- test h2 -->
<dependency>
<groupId>com.h2database</groupId>
@@ -280,4 +280,69 @@
</plugin>
</plugins>
</build>
+
+
+
+ <profiles>
+ <profile>
+ <id>docker</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>io.fabric8</groupId>
+ <artifactId>docker-maven-plugin</artifactId>
+ <version>0.19.1</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>
+ </build>
+ </image>
+ </images>
+ </configuration>
+ <executions>
+ <execution>
+ <id>clean-images</id>
+ <phase>pre-clean</phase>
+ <goals>
+ <goal>remove</goal>
+ </goals>
+ <configuration>
+ <removeAll>true</removeAll>
+ <image>nbi</image>
+ </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>