blob: 51d9cecc54d93ab634376a52611c2f6d97a2449d [file] [log] [blame]
elinuxhenrikd661dbc2018-08-17 12:34:58 +02001<?xml version="1.0" encoding="UTF-8"?>
2<!--
3 ~ ============LICENSE_START=======================================================
elinuxhenrikf3945942018-09-14 15:49:10 +02004 ~ Copyright (C) 2018 NOKIA Intellectual Property, 2018 Nordix Foundation. All rights reserved.
5 ~ ================================================================================
elinuxhenrikd661dbc2018-08-17 12:34:58 +02006 ~ Licensed under the Apache License, Version 2.0 (the "License");
7 ~ you may not use this file except in compliance with the License.
8 ~ You may obtain a copy of the License at
9 ~
elinuxhenrikf3945942018-09-14 15:49:10 +020010 ~ http://www.apache.org/licenses/LICENSE-2.0
elinuxhenrikd661dbc2018-08-17 12:34:58 +020011 ~
12 ~ Unless required by applicable law or agreed to in writing, software
13 ~ distributed under the License is distributed on an "AS IS" BASIS,
14 ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 ~ See the License for the specific language governing permissions and
16 ~ limitations under the License.
17 ~ ============LICENSE_END=========================================================
18 -->
19<project xmlns="http://maven.apache.org/POM/4.0.0"
20 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
21 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
Vijay Venkatesh Kumar0ae7a7f2018-10-05 14:14:00 +020022 <modelVersion>4.0.0</modelVersion>
23
elinuxhenrikd661dbc2018-08-17 12:34:58 +020024 <parent>
elinuxhenrikd661dbc2018-08-17 12:34:58 +020025 <groupId>org.onap.dcaegen2.collectors</groupId>
elinuxhenrikf3945942018-09-14 15:49:10 +020026 <artifactId>datafile</artifactId>
Chengkai Yane0116a82018-11-07 23:22:59 +010027 <version>1.1.0-SNAPSHOT</version>
elinuxhenrikd661dbc2018-08-17 12:34:58 +020028 </parent>
elinuxhenrikd661dbc2018-08-17 12:34:58 +020029
elinuxhenrikd661dbc2018-08-17 12:34:58 +020030 <groupId>org.onap.dcaegen2.collectors.datafile</groupId>
elinuxhenrikf3945942018-09-14 15:49:10 +020031 <artifactId>datafile-app-server</artifactId>
elinuxhenrikd661dbc2018-08-17 12:34:58 +020032 <packaging>jar</packaging>
elinuxhenrikf3945942018-09-14 15:49:10 +020033
elinuxhenrikd661dbc2018-08-17 12:34:58 +020034 <properties>
elinuxhenrikf3945942018-09-14 15:49:10 +020035 <docker.image.name>onap/${project.groupId}.${project.artifactId}</docker.image.name>
elinuxhenrikd661dbc2018-08-17 12:34:58 +020036 <maven.build.timestamp.format>yyyyMMdd'T'HHmmss</maven.build.timestamp.format>
elinuxhenrikd661dbc2018-08-17 12:34:58 +020037 </properties>
elinuxhenrikf3945942018-09-14 15:49:10 +020038
elinuxhenrikd661dbc2018-08-17 12:34:58 +020039 <build>
elinuxhenrike0551f42018-09-18 14:39:34 +020040 <resources>
41 <resource>
42 <directory>src/main/resources</directory>
43 </resource>
44 </resources>
45
elinuxhenrikd661dbc2018-08-17 12:34:58 +020046 <plugins>
47 <plugin>
elinuxhenrikd661dbc2018-08-17 12:34:58 +020048 <groupId>org.springframework.boot</groupId>
49 <artifactId>spring-boot-maven-plugin</artifactId>
elinuxhenrikd661dbc2018-08-17 12:34:58 +020050 <configuration>
elinuxhenrike0551f42018-09-18 14:39:34 +020051 <finalName>${project.artifactId}</finalName>
elinuxhenrikd661dbc2018-08-17 12:34:58 +020052 <mainClass>org.onap.dcaegen2.collectors.datafile.MainApp</mainClass>
53 </configuration>
54 </plugin>
elinuxhenrikd661dbc2018-08-17 12:34:58 +020055 <plugin>
56 <groupId>com.spotify</groupId>
57 <artifactId>docker-maven-plugin</artifactId>
58 <configuration>
elinuxhenrikf3945942018-09-14 15:49:10 +020059 <serverId>${onap.nexus.dockerregistry.daily}</serverId>
60 <imageName>${docker.image.name}</imageName>
61 <imageTags>
62 <tag>latest</tag>
63 </imageTags>
elinuxhenrikd661dbc2018-08-17 12:34:58 +020064 <baseImage>openjdk:8-jre-alpine</baseImage>
elinuxhenrikd661dbc2018-08-17 12:34:58 +020065 <resources>
66 <resource>
elinuxhenrikd661dbc2018-08-17 12:34:58 +020067 <directory>${project.build.directory}</directory>
elinuxhenrike0551f42018-09-18 14:39:34 +020068 <include>${project.artifactId}.jar</include>
69 <targetPath>/target</targetPath>
elinuxhenrikd661dbc2018-08-17 12:34:58 +020070 </resource>
71 <resource>
72 <targetPath>/config</targetPath>
elinuxhenrikf3945942018-09-14 15:49:10 +020073 <directory>${project.basedir}/config</directory>
elinuxhenrikd661dbc2018-08-17 12:34:58 +020074 <include>*</include>
75 </resource>
76 </resources>
77 <exposes>
78 <expose>8100</expose>
79 <expose>8433</expose>
80 </exposes>
elinuxhenrike0551f42018-09-18 14:39:34 +020081 <cmd>["java", "-jar", "/target/${project.artifactId}.jar"]</cmd>
elinuxhenrikd661dbc2018-08-17 12:34:58 +020082 </configuration>
elinuxhenrikf3945942018-09-14 15:49:10 +020083 <executions>
84 <execution>
85 <id>build-image</id>
86 <phase>package</phase>
87 <goals>
88 <goal>build</goal>
89 </goals>
90 </execution>
91 <execution>
92 <id>tag-and-push-image-latest</id>
93 <phase>deploy</phase>
94 <goals>
95 <goal>tag</goal>
96 </goals>
97 <configuration>
98 <image>${docker.image.name}:latest</image>
99 <newName>${onap.nexus.dockerregistry.daily}/${docker.image.name}:latest</newName>
100 <pushImage>true</pushImage>
101 </configuration>
102 </execution>
103 <execution>
104 <id>tag-and-push-image-with-version</id>
105 <phase>deploy</phase>
106 <goals>
107 <goal>tag</goal>
108 </goals>
109 <configuration>
110 <image>${docker.image.name}:latest</image>
111 <newName>${onap.nexus.dockerregistry.daily}/${docker.image.name}:${project.version}</newName>
112 <pushImage>true</pushImage>
113 </configuration>
114 </execution>
115 <execution>
116 <id>tag-and-push-image-with-version-and-date</id>
117 <phase>deploy</phase>
118 <goals>
119 <goal>tag</goal>
120 </goals>
121 <configuration>
122 <image>${docker.image.name}:latest</image>
123 <newName>${onap.nexus.dockerregistry.daily}/${docker.image.name}:${project.version}-${maven.build.timestamp}Z</newName>
124 <pushImage>true</pushImage>
125 </configuration>
126 </execution>
127 </executions>
elinuxhenrikd661dbc2018-08-17 12:34:58 +0200128 </plugin>
129 </plugins>
130 </build>
elinuxhenrike0551f42018-09-18 14:39:34 +0200131
elinuxhenrikd661dbc2018-08-17 12:34:58 +0200132 <dependencies>
elinuxhenrikf3945942018-09-14 15:49:10 +0200133 <dependency>
134 <groupId>io.projectreactor</groupId>
135 <artifactId>reactor-core</artifactId>
136 </dependency>
elinuxhenrikd661dbc2018-08-17 12:34:58 +0200137 <dependency>
138 <groupId>org.springframework.boot</groupId>
139 <artifactId>spring-boot-starter-web</artifactId>
140 </dependency>
141 <dependency>
elinuxhenrikf3945942018-09-14 15:49:10 +0200142 <groupId>org.immutables</groupId>
143 <artifactId>value</artifactId>
144 </dependency>
145 <dependency>
146 <groupId>org.immutables</groupId>
147 <artifactId>gson</artifactId>
148 </dependency>
149 <dependency>
elinuxhenrikd661dbc2018-08-17 12:34:58 +0200150 <groupId>org.springframework.boot</groupId>
151 <artifactId>spring-boot-starter-webflux</artifactId>
152 </dependency>
153 <dependency>
elinuxhenrikf3945942018-09-14 15:49:10 +0200154 <groupId>commons-io</groupId>
155 <artifactId>commons-io</artifactId>
elinuxhenrikd661dbc2018-08-17 12:34:58 +0200156 </dependency>
157 <dependency>
158 <groupId>org.onap.dcaegen2.collectors.datafile</groupId>
elinuxhenrikf3945942018-09-14 15:49:10 +0200159 <artifactId>datafile-dmaap-client</artifactId>
160 <version>${project.parent.version}</version>
elinuxhenrikd661dbc2018-08-17 12:34:58 +0200161 </dependency>
162
163 <!--TESTS DEPENDENCIES -->
164 <dependency>
165 <groupId>io.projectreactor</groupId>
166 <artifactId>reactor-test</artifactId>
167 <scope>test</scope>
168 </dependency>
169 <dependency>
170 <groupId>org.junit.jupiter</groupId>
171 <artifactId>junit-jupiter-engine</artifactId>
172 <scope>test</scope>
173 </dependency>
174 <dependency>
elinuxhenrikd661dbc2018-08-17 12:34:58 +0200175 <groupId>org.springframework</groupId>
176 <artifactId>spring-test</artifactId>
177 <scope>test</scope>
178 </dependency>
179 <dependency>
180 <groupId>org.junit.platform</groupId>
181 <artifactId>junit-platform-launcher</artifactId>
elinuxhenrikf3945942018-09-14 15:49:10 +0200182 <scope>test</scope>
elinuxhenrikd661dbc2018-08-17 12:34:58 +0200183 </dependency>
184 <dependency>
185 <groupId>org.springframework.boot</groupId>
186 <artifactId>spring-boot-starter-test</artifactId>
187 <scope>test</scope>
188 </dependency>
189 <dependency>
190 <groupId>org.mockito</groupId>
191 <artifactId>mockito-core</artifactId>
192 <scope>test</scope>
193 </dependency>
194 <dependency>
195 <groupId>org.glassfish.jersey.connectors</groupId>
196 <artifactId>jersey-apache-connector</artifactId>
197 <scope>test</scope>
198 </dependency>
199 <dependency>
200 <groupId>org.testng</groupId>
201 <artifactId>testng</artifactId>
elinuxhenrikf3945942018-09-14 15:49:10 +0200202 <scope>test</scope>
elinuxhenrikd661dbc2018-08-17 12:34:58 +0200203 </dependency>
elinuxhenrikd661dbc2018-08-17 12:34:58 +0200204
205 <!--REQUIRED TO GENERATE DOCUMENTATION -->
206 <dependency>
207 <groupId>io.springfox</groupId>
208 <artifactId>springfox-swagger2</artifactId>
209 </dependency>
210 <dependency>
211 <groupId>io.springfox</groupId>
212 <artifactId>springfox-swagger-ui</artifactId>
213 </dependency>
214 </dependencies>
elinuxhenrikd661dbc2018-08-17 12:34:58 +0200215</project>