1 <?xml version="1.0" encoding="UTF-8"?>
3 * ============LICENSE_START=======================================================
4 * ONAP : DCAEGEN2/services/mapper
5 * ================================================================================
6 * Copyright 2018 TechMahindra
7 * Copyright (C) 2023 Deutsche Telekom AG. All rights reserved.
8 *=================================================================================
9 * Licensed under the Apache License, Version 2.0 (the "License");
10 * you may not use this file except in compliance with the License.
11 * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and * limitations under the License.
17 * ============LICENSE_END=========================================================
19 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
20 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
21 <modelVersion>4.0.0</modelVersion>
23 <groupId>org.onap.dcaegen2.services.mapper</groupId>
24 <artifactId>snmpmapper</artifactId>
25 <version>0.1.0-SNAPSHOT</version>
26 <packaging>jar</packaging>
28 <name>snmpmapper</name>
29 <description>saves mapping file to potsgresql database</description>
32 <groupId>org.onap.dcaegen2.services.mapper</groupId>
33 <artifactId>mapper</artifactId>
34 <version>1.5.0-SNAPSHOT</version>
38 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
39 <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
40 <java.version>11</java.version>
43 <docker.image.name>onap/org.onap.dcaegen2.services.mapper.snmpmapper</docker.image.name>
45 <!-- TEST SETTINGS -->
46 <surefire.redirectTestOutputToFile>true</surefire.redirectTestOutputToFile>
48 <!-- PLUGIN SETTINGS -->
49 <dependency.locations.enabled>false</dependency.locations.enabled>
51 <!-- NEXUS RELATED SETTINGS -->
52 <nexusproxy>https://nexus.onap.org</nexusproxy>
53 <snapshots.path>content/repositories/snapshots/</snapshots.path>
54 <releases.path>content/repositories/releases/</releases.path>
56 content/sites/site/org/onap/dcaegen2/services/mapper/${project.artifactId}/${project.version}
58 <maven.build.timestamp.format>yyyyMMdd'T'HHmmss</maven.build.timestamp.format>
62 <groupId>org.springframework.webflow</groupId>
63 <artifactId>spring-webflow</artifactId>
64 <version>2.5.0.RELEASE</version>
68 <groupId>org.springframework.boot</groupId>
69 <artifactId>spring-boot-starter-thymeleaf</artifactId>
70 <version>2.1.1.RELEASE</version>
73 <groupId>org.springframework.boot</groupId>
74 <artifactId>spring-boot-starter-web</artifactId>
75 <version>2.1.1.RELEASE</version>
79 <groupId>org.springframework.boot</groupId>
80 <artifactId>spring-boot-starter-test</artifactId>
81 <version>2.1.1.RELEASE</version>
85 <groupId>org.springframework.boot</groupId>
86 <artifactId>spring-boot-starter-data-jpa</artifactId>
87 <version>2.1.1.RELEASE</version>
90 <groupId>org.springframework</groupId>
91 <artifactId>spring-core</artifactId>
92 <version>5.1.3.RELEASE</version>
95 <groupId>org.springframework</groupId>
96 <artifactId>spring-expression</artifactId>
97 <version>5.1.3.RELEASE</version>
100 <groupId>org.postgresql</groupId>
101 <artifactId>postgresql</artifactId>
102 <scope>runtime</scope>
103 <version>42.5.1</version>
106 <groupId>org.springframework</groupId>
107 <artifactId>spring-jdbc</artifactId>
108 <version>5.1.3.RELEASE</version>
111 <groupId>javax.servlet</groupId>
112 <artifactId>servlet-api</artifactId>
113 <version>3.0-alpha-1</version>
116 <groupId>javax.servlet.jsp</groupId>
117 <artifactId>jsp-api</artifactId>
118 <version>2.2</version>
120 <!-- https://mvnrepository.com/artifact/commons-fileupload/commons-fileupload -->
122 <groupId>commons-fileupload</groupId>
123 <artifactId>commons-fileupload</artifactId>
124 <version>1.3.3</version>
134 <artifactId>maven-assembly-plugin</artifactId>
135 <version>3.1.0</version>
138 <groupId>com.spotify</groupId>
139 <artifactId>docker-maven-plugin</artifactId>
140 <version>1.0.0</version>
146 <groupId>org.springframework.boot</groupId>
147 <artifactId>spring-boot-maven-plugin</artifactId>
148 <version>2.1.1.RELEASE</version>
151 <groupId>org.springframework.boot</groupId>
152 <artifactId>spring-boot-maven-plugin</artifactId>
153 <version>2.1.1.RELEASE</version>
157 <goal>repackage</goal>
160 <mainClass>org.onap.dcaegen2.services.mapper.snmpmapper.SnmpmapperApplication</mainClass>
166 <artifactId>maven-jar-plugin</artifactId>
170 <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
173 <Implementation-Build-Version>${project.version}</Implementation-Build-Version>
180 <artifactId>maven-assembly-plugin</artifactId>
183 <descriptor>src/assembly/dep.xml</descriptor>
185 <attach>false</attach>
186 <appendAssemblyId>false</appendAssemblyId>
187 <updateOnly>true</updateOnly>
191 <id>make-assembly</id>
192 <phase>package</phase>
200 <!-- Spotify plugin to build and push docker image -->
203 <groupId>com.spotify</groupId>
204 <artifactId>docker-maven-plugin</artifactId>
205 <version>1.0.0</version>
207 <skipDockerBuild>false</skipDockerBuild>
208 <serverId>${onap.nexus.dockerregistry.daily}</serverId>
209 <imageName>${onap.nexus.dockerregistry.daily}/${docker.image.name}</imageName>
212 <tag>${project.version}-${maven.build.timestamp}Z</tag>
213 <tag>${project.version}</tag>
215 <baseImage>ubuntu:16.04</baseImage>
217 <HOSTALIASES>/etc/host.aliases</HOSTALIASES>
218 <HOME>/opt/app/SnmpMapper</HOME>
220 <workdir>/opt/app/SnmpMapper</workdir>
223 <targetPath>.</targetPath>
225 <directory>${project.build.directory}/${project.artifactId}-${project.version}</directory>
229 <run>chmod +x bin/run.sh</run>
231 <![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]]>
235 <expose>8080</expose>
237 <entryPoint>bin/run.sh</entryPoint>
243 <phase>package</phase>
249 <id>tag-and-push-image-latest</id>
250 <phase>deploy</phase>
255 <image>${docker.image.name}:latest</image>
256 <newName>${onap.nexus.dockerregistry.daily}/${docker.image.name}:latest</newName>
257 <pushImage>true</pushImage>
261 <id>tag-and-push-image-with-version</id>
262 <phase>deploy</phase>
267 <image>${docker.image.name}:latest</image>
268 <newName>${onap.nexus.dockerregistry.daily}/${docker.image.name}:${project.version}
270 <pushImage>true</pushImage>
274 <id>tag-and-push-image-with-version-and-date</id>
275 <phase>deploy</phase>
280 <image>${docker.image.name}:latest</image>
282 ${onap.nexus.dockerregistry.daily}/${docker.image.name}:${project.version}-${maven.build.timestamp}Z
284 <pushImage>true</pushImage>
290 <groupId>org.codehaus.mojo</groupId>
291 <artifactId>build-helper-maven-plugin</artifactId>
292 <version>1.9.1</version>
296 <phase>generate-sources</phase>
298 <goal>add-source</goal>
302 <source>src/gen/java</source>
306 <!-- <execution> <id>regex-property</id> <goals> <goal>regex-property</goal>
307 </goals> <configuration> <name>docker.version</name> <value>${project.version}</value>
308 <regex>(^[0-9]+.[0-9]+.[0-9]+$)</regex> <replacement>$1-STAGING</replacement>
309 <failIfNoMatch>false</failIfNoMatch> </configuration> </execution> -->
314 <!-- <finalName>snmpmapper</finalName> -->
320 <id>with-system-proxy</id>
324 <groupId>com.spotify</groupId>
325 <artifactId>docker-maven-plugin</artifactId>
328 <http_proxy>${env.http_proxy}</http_proxy>
342 <id>spring-releases</id>
343 <url>https://repo.spring.io/libs-release</url>
348 <id>spring-releases</id>
349 <url>https://repo.spring.io/libs-release</url>
351 </pluginRepositories>