1 <?xml version="1.0" encoding="UTF-8"?>
2 <!-- * ============LICENSE_START=======================================================
3 * ONAP : DCAEGEN2/services/mapper * ================================================================================
4 * Copyright 2018 TechMahindra *=================================================================================
5 * Licensed under the Apache License, Version 2.0 (the "License"); * you may
6 not use this file except in compliance with the License. * You may obtain
7 a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 *
8 * Unless required by applicable law or agreed to in writing, software * distributed
9 under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES
10 OR CONDITIONS OF ANY KIND, either express or implied. * See the License for
11 the specific language governing permissions and * limitations under the License.
12 * ============LICENSE_END========================================================= -->
13 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
14 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
15 <modelVersion>4.0.0</modelVersion>
17 <groupId>org.onap.dcaegen2.services.mapper</groupId>
18 <artifactId>snmpmapper</artifactId>
19 <version>0.0.1-SNAPSHOT</version>
20 <packaging>jar</packaging>
22 <name>snmpmapper</name>
23 <description>saves mapping file to potsgresql database</description>
26 <groupId>org.onap.dcaegen2.services.mapper</groupId>
27 <artifactId>mapper</artifactId>
28 <version>0.0.1-SNAPSHOT</version>
32 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
33 <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
34 <java.version>8</java.version>
37 <docker.image.name>onap/org.onap.dcaegen2.services.mapper.snmpmapper</docker.image.name>
39 <!-- TEST SETTINGS -->
40 <surefire.redirectTestOutputToFile>true</surefire.redirectTestOutputToFile>
42 <!-- PLUGIN SETTINGS -->
43 <dependency.locations.enabled>false</dependency.locations.enabled>
45 <!-- NEXUS RELATED SETTINGS -->
46 <nexusproxy>https://nexus.onap.org</nexusproxy>
47 <snapshots.path>content/repositories/snapshots/</snapshots.path>
48 <releases.path>content/repositories/releases/</releases.path>
50 content/sites/site/org/onap/dcaegen2/services/mapper/${project.artifactId}/${project.version}
52 <maven.build.timestamp.format>yyyyMMdd'T'HHmmss</maven.build.timestamp.format>
56 <groupId>org.springframework.webflow</groupId>
57 <artifactId>spring-webflow</artifactId>
58 <version>2.5.0.RELEASE</version>
62 <groupId>org.springframework.boot</groupId>
63 <artifactId>spring-boot-starter-thymeleaf</artifactId>
64 <version>2.0.4.RELEASE</version>
67 <groupId>org.springframework.boot</groupId>
68 <artifactId>spring-boot-starter-web</artifactId>
69 <version>2.0.4.RELEASE</version>
73 <groupId>org.springframework.boot</groupId>
74 <artifactId>spring-boot-starter-test</artifactId>
75 <version>2.0.3.RELEASE</version>
79 <groupId>org.springframework.boot</groupId>
80 <artifactId>spring-boot-starter-data-jpa</artifactId>
81 <version>2.0.3.RELEASE</version>
84 <groupId>org.springframework</groupId>
85 <artifactId>spring-core</artifactId>
86 <version>5.0.5.RELEASE</version>
89 <groupId>org.springframework</groupId>
90 <artifactId>spring-expression</artifactId>
91 <version>5.0.9.RELEASE</version>
94 <groupId>org.postgresql</groupId>
95 <artifactId>postgresql</artifactId>
96 <scope>runtime</scope>
97 <version>42.2.4</version>
100 <groupId>org.springframework</groupId>
101 <artifactId>spring-jdbc</artifactId>
102 <version>4.3.11.RELEASE</version>
105 <groupId>javax.servlet</groupId>
106 <artifactId>servlet-api</artifactId>
107 <version>3.0-alpha-1</version>
110 <groupId>javax.servlet.jsp</groupId>
111 <artifactId>jsp-api</artifactId>
112 <version>2.1</version>
114 <!-- https://mvnrepository.com/artifact/commons-fileupload/commons-fileupload -->
116 <groupId>commons-fileupload</groupId>
117 <artifactId>commons-fileupload</artifactId>
118 <version>1.3.3</version>
128 <artifactId>maven-assembly-plugin</artifactId>
129 <version>3.1.0</version>
132 <groupId>com.spotify</groupId>
133 <artifactId>docker-maven-plugin</artifactId>
134 <version>1.0.0</version>
140 <groupId>org.springframework.boot</groupId>
141 <artifactId>spring-boot-maven-plugin</artifactId>
142 <version>2.0.0.RELEASE</version>
145 <groupId>org.springframework.boot</groupId>
146 <artifactId>spring-boot-maven-plugin</artifactId>
147 <version>2.0.0.RELEASE</version>
151 <goal>repackage</goal>
154 <mainClass>org.onap.dcaegen2.services.mapper.snmpmapper.SnmpmapperApplication</mainClass>
160 <artifactId>maven-jar-plugin</artifactId>
164 <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
167 <Implementation-Build-Version>${project.version}</Implementation-Build-Version>
174 <artifactId>maven-assembly-plugin</artifactId>
177 <descriptor>src/assembly/dep.xml</descriptor>
179 <attach>false</attach>
180 <appendAssemblyId>false</appendAssemblyId>
181 <updateOnly>true</updateOnly>
185 <id>make-assembly</id>
186 <phase>package</phase>
194 <!-- Spotify plugin to build and push docker image -->
197 <groupId>com.spotify</groupId>
198 <artifactId>docker-maven-plugin</artifactId>
199 <version>1.1.1</version>
201 <serverId>${onap.nexus.dockerregistry.daily}</serverId>
202 <imageName>${onap.nexus.dockerregistry.daily}/${docker.image.name}</imageName>
205 <tag>${project.version}-${maven.build.timestamp}Z</tag>
206 <tag>${project.version}</tag>
208 <baseImage>ubuntu:16.04</baseImage>
210 <HOSTALIASES>/etc/host.aliases</HOSTALIASES>
211 <HOME>/opt/app/SnmpMapper</HOME>
213 <workdir>/opt/app/SnmpMapper</workdir>
216 <targetPath>.</targetPath>
218 <directory>${project.build.directory}/${project.artifactId}-${project.version}</directory>
222 <run>chmod +x bin/run.sh</run>
224 <![CDATA[apt-get update && apt-get install -y curl && apt-get install -y openjdk-8-jdk && apt-get install -y vim && apt-get clean all]]>
228 <expose>8080</expose>
230 <entryPoint>bin/run.sh</entryPoint>
236 <phase>package</phase>
242 <id>tag-and-push-image-latest</id>
243 <phase>deploy</phase>
248 <image>${docker.image.name}:latest</image>
249 <newName>${onap.nexus.dockerregistry.daily}/${docker.image.name}:latest</newName>
250 <pushImage>true</pushImage>
254 <id>tag-and-push-image-with-version</id>
255 <phase>deploy</phase>
260 <image>${docker.image.name}:latest</image>
261 <newName>${onap.nexus.dockerregistry.daily}/${docker.image.name}:${project.version}
263 <pushImage>true</pushImage>
267 <id>tag-and-push-image-with-version-and-date</id>
268 <phase>deploy</phase>
273 <image>${docker.image.name}:latest</image>
275 ${onap.nexus.dockerregistry.daily}/${docker.image.name}:${project.version}-${maven.build.timestamp}Z
277 <pushImage>true</pushImage>
283 <groupId>org.codehaus.mojo</groupId>
284 <artifactId>build-helper-maven-plugin</artifactId>
285 <version>1.9.1</version>
289 <phase>generate-sources</phase>
291 <goal>add-source</goal>
295 <source>src/gen/java</source>
299 <!-- <execution> <id>regex-property</id> <goals> <goal>regex-property</goal>
300 </goals> <configuration> <name>docker.version</name> <value>${project.version}</value>
301 <regex>(^[0-9]+.[0-9]+.[0-9]+$)</regex> <replacement>$1-STAGING</replacement>
302 <failIfNoMatch>false</failIfNoMatch> </configuration> </execution> -->
307 <!-- <finalName>snmpmapper</finalName> -->
313 <id>with-system-proxy</id>
317 <groupId>com.spotify</groupId>
318 <artifactId>docker-maven-plugin</artifactId>
321 <http_proxy>${env.http_proxy}</http_proxy>
335 <id>spring-releases</id>
336 <url>https://repo.spring.io/libs-release</url>
341 <id>spring-releases</id>
342 <url>https://repo.spring.io/libs-release</url>
344 </pluginRepositories>