blob: 7ae99ae49c0ee8b881c59402948e8953143ef183 [file] [log] [blame]
Dan Timoney31172d62020-06-05 15:46:39 -04001<?xml version="1.0" encoding="UTF-8"?>
Dan Timoney5312a482020-08-21 10:23:45 -04002<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">
Dan Timoney31172d62020-06-05 15:46:39 -04003 <modelVersion>4.0.0</modelVersion>
4
5 <parent>
6 <groupId>org.onap.ccsdk.parent</groupId>
7 <artifactId>spring-boot-starter-parent</artifactId>
Dan Timoneyf8e7ad32021-02-22 14:56:15 -05008 <version>2.1.1</version>
Dan Timoney31172d62020-06-05 15:46:39 -04009 <relativePath/>
10 </parent>
11
12 <groupId>org.onap.ccsdk.apps</groupId>
13 <artifactId>sliboot</artifactId>
Dan Timoney9ba68b22021-03-22 09:52:43 -040014 <version>1.1.2-SNAPSHOT</version>
Dan Timoney31172d62020-06-05 15:46:39 -040015 <packaging>jar</packaging>
16
17 <name>ccsdk-apps :: sliboot :: ${project.artifactId}</name>
18
19 <properties>
Dan Timoney2e0a5282020-10-27 16:43:47 -040020 <start-class>org.onap.ccsdk.apps.ms.sliboot.SlibootApp</start-class>
Dan Timoney31172d62020-06-05 15:46:39 -040021 <shiro.version>1.5.0</shiro.version>
22 <aaf-shiro-bundle.version>2.1.13</aaf-shiro-bundle.version>
Dan Timoney177eccd2021-02-24 11:22:32 -050023 <base.image.name>onap/ccsdk-alpine-j11-image</base.image.name>
24 <base.image.version>1.1.1</base.image.version>
Dan Timoney31172d62020-06-05 15:46:39 -040025 <image.name>onap/ccsdk-sliboot-alpine-image</image.name>
26 <ccsdk.project.version>${project.version}</ccsdk.project.version>
Dan Timoney58373932020-12-15 15:19:00 -050027 <ccsdk.distribution.version>1.1.0</ccsdk.distribution.version>
Dan Timoney31172d62020-06-05 15:46:39 -040028 <ccsdk.build.timestamp>${maven.build.timestamp}</ccsdk.build.timestamp>
29 <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
Dan Timoney2e0a5282020-10-27 16:43:47 -040030 <ccsdk.sliboot.jar>${project.artifactId}-${project.version}-exec.jar</ccsdk.sliboot.jar>
Dan Timoney31172d62020-06-05 15:46:39 -040031 <docker.push.phase>deploy</docker.push.phase>
32 <docker.verbose>true</docker.verbose>
Dan Timoneyb84d3992020-11-16 14:58:31 -050033 <docker.autoCreateCustomNetworks>true</docker.autoCreateCustomNetworks>
Dan Timoney177eccd2021-02-24 11:22:32 -050034 <java.home>/opt/java/openjdk</java.home>
35 <java.security.dir>${java.home}/lib/security</java.security.dir>
Dan Timoney31172d62020-06-05 15:46:39 -040036 </properties>
37
38 <dependencies>
39 <dependency>
40 <groupId>io.swagger</groupId>
41 <artifactId>swagger-annotations</artifactId>
42 </dependency>
43 <dependency>
44 <groupId>org.apache.shiro</groupId>
45 <artifactId>shiro-spring-boot-web-starter</artifactId>
46 <version>${shiro.version}</version>
47 <exclusions>
48 <exclusion>
49 <groupId>org.springframework.boot</groupId>
50 <artifactId>spring-boot-starter-logging</artifactId>
51 </exclusion>
52 </exclusions>
53 </dependency>
54 <dependency>
55 <groupId>org.springframework.boot</groupId>
56 <artifactId>spring-boot-starter-log4j2</artifactId>
57 </dependency>
58 <dependency>
Dan Timoneyefc72592020-09-03 11:28:18 -040059 <groupId>org.springframework.boot</groupId>
60 <artifactId>spring-boot-starter-validation</artifactId>
61 </dependency>
62 <dependency>
Dan Timoney31172d62020-06-05 15:46:39 -040063 <groupId>org.onap.aaf.cadi</groupId>
64 <artifactId>aaf-cadi-shiro</artifactId>
65 <version>${aaf-shiro-bundle.version}</version>
66 </dependency>
67
68 <dependency>
69 <groupId>org.springframework.boot</groupId>
70 <artifactId>spring-boot-starter-test</artifactId>
71 <scope>test</scope>
72 </dependency>
73 <dependency>
74 <groupId>org.springframework.boot</groupId>
75 <artifactId>spring-boot-starter-data-jpa</artifactId>
76 </dependency>
77 <dependency>
78 <groupId>io.springfox</groupId>
79 <artifactId>springfox-swagger2</artifactId>
80 <version>2.9.2</version>
81 </dependency>
82 <dependency>
83 <groupId>io.springfox</groupId>
84 <artifactId>springfox-swagger-ui</artifactId>
85 <version>2.9.2</version>
86 </dependency>
87 <dependency>
Dan Timoneyf3430362020-06-09 12:42:46 -040088 <groupId>${project.groupId}</groupId>
89 <artifactId>services</artifactId>
90 <version>${project.version}</version>
91 </dependency>
92 <dependency>
Dan Timoney31172d62020-06-05 15:46:39 -040093 <groupId>org.onap.ccsdk.sli.core</groupId>
94 <artifactId>dblib-provider</artifactId>
95 <version>${ccsdk.sli.core.version}</version>
96 </dependency>
97 <dependency>
98 <groupId>org.onap.ccsdk.sli.core</groupId>
99 <artifactId>sli-common</artifactId>
100 <version>${ccsdk.sli.core.version}</version>
101 </dependency>
102 <dependency>
103 <groupId>org.onap.ccsdk.sli.core</groupId>
104 <artifactId>sli-provider-base</artifactId>
105 <version>${ccsdk.sli.core.version}</version>
106 </dependency>
107 <dependency>
Dan Timoney31172d62020-06-05 15:46:39 -0400108 <groupId>org.onap.ccsdk.sli.core</groupId>
Dan Timoneyddeeff82021-03-12 16:01:34 -0500109 <artifactId>sliapi-model-swagger</artifactId>
110 <version>${ccsdk.sli.core.version}</version>
111 <type>yaml</type>
112 </dependency>
113 <dependency>
114 <groupId>org.onap.ccsdk.sli.core</groupId>
Dan Timoney31172d62020-06-05 15:46:39 -0400115 <artifactId>sliPluginUtils-provider</artifactId>
116 <version>${ccsdk.sli.core.version}</version>
117 </dependency>
118 <dependency>
119 <groupId>org.onap.ccsdk.sli.plugins</groupId>
120 <artifactId>restapi-call-node-provider</artifactId>
121 <version>${ccsdk.sli.plugins.version}</version>
122 </dependency>
123 <dependency>
124 <groupId>org.onap.ccsdk.sli.plugins</groupId>
125 <artifactId>properties-node-provider</artifactId>
126 <version>${ccsdk.sli.plugins.version}</version>
127 </dependency>
Singal, Kapil (ks220y)d70bd722021-06-17 16:06:17 -0400128 <dependency>
129 <groupId>org.onap.logging-analytics</groupId>
130 <artifactId>logging-filter-spring</artifactId>
131 <version>1.6.6</version>
132 </dependency>
133 <dependency>
134 <groupId>com.google.code.gson</groupId>
135 <artifactId>gson</artifactId>
136 </dependency>
137 <dependency>
138 <groupId>org.apache.derby</groupId>
139 <artifactId>derby</artifactId>
140 <scope>test</scope>
141 </dependency>
142 <dependency>
143 <groupId>org.mariadb.jdbc</groupId>
144 <artifactId>mariadb-java-client</artifactId>
145 </dependency>
146 <dependency>
147 <groupId>junit</groupId>
148 <artifactId>junit</artifactId>
149 <scope>test</scope>
150 </dependency>
151 <dependency>
152 <groupId>javax.ws.rs</groupId>
153 <artifactId>javax.ws.rs-api</artifactId>
154 </dependency>
Dan Timoney31172d62020-06-05 15:46:39 -0400155 <!-- this jersey jar is needed for rest api call node to function properly -->
156 <dependency>
157 <groupId>org.glassfish.jersey.inject</groupId>
158 <artifactId>jersey-hk2</artifactId>
159 </dependency>
160 </dependencies>
161
162 <build>
163 <plugins>
164 <plugin>
165 <groupId>org.codehaus.groovy.maven</groupId>
166 <artifactId>gmaven-plugin</artifactId>
167 <executions>
168 <execution>
169 <phase>validate</phase>
170 <goals>
171 <goal>execute</goal>
172 </goals>
173 <configuration>
174 <source>${basedir}/TagVersion.groovy</source>
175 </configuration>
176 </execution>
177 </executions>
178 </plugin>
179
180 <plugin>
181 <groupId>org.apache.maven.plugins</groupId>
182 <artifactId>maven-dependency-plugin</artifactId>
183 <version>2.10</version>
184
185 <executions>
186 <execution>
Singal, Kapil (ks220y)d70bd722021-06-17 16:06:17 -0400187 <id>copy-sliapi-model-swagger</id>
Dan Timoney31172d62020-06-05 15:46:39 -0400188 <phase>initialize</phase>
189 <goals>
Dan Timoneyddeeff82021-03-12 16:01:34 -0500190 <goal>copy-dependencies</goal>
Dan Timoney31172d62020-06-05 15:46:39 -0400191 </goals>
192 <configuration>
Dan Timoneyddeeff82021-03-12 16:01:34 -0500193 <outputDirectory>${project.build.directory}/yaml</outputDirectory>
194 <useRepositoryLayout>false</useRepositoryLayout>
195 <includeTypes>yaml</includeTypes>
196 <stripVersion>true</stripVersion>
Dan Timoney31172d62020-06-05 15:46:39 -0400197 </configuration>
198 </execution>
Dan Timoneyb84d3992020-11-16 14:58:31 -0500199 <execution>
200 <id>copy-dependencies</id>
201 <goals>
202 <goal>copy-dependencies</goal>
203 </goals>
204 <phase>prepare-package</phase>
205 <configuration>
206 <excludeTransitive>true</excludeTransitive>
Dan Timoneyddeeff82021-03-12 16:01:34 -0500207 <excludeTypes>yaml</excludeTypes>
Dan Timoneyb84d3992020-11-16 14:58:31 -0500208 <outputDirectory>${project.build.directory}/docker-stage/opt/onap/ccsdk/lib</outputDirectory>
209 <overWriteReleases>false</overWriteReleases>
210 <overWriteSnapshots>true</overWriteSnapshots>
211 <overWriteIfNewer>true</overWriteIfNewer>
212 <useRepositoryLayout>false</useRepositoryLayout>
213 <addParentPoms>false</addParentPoms>
214 <copyPom>false</copyPom>
215 </configuration>
216 </execution>
217 <execution>
218 <id>unpack dgs</id>
219 <phase>generate-sources</phase>
220 <goals>
221 <goal>unpack</goal>
222 </goals>
223 <configuration>
224 <outputDirectory>${basedir}/target/docker-stage/opt/onap/ccsdk</outputDirectory>
225 <artifactItems>
226 <artifactItem>
227 <groupId>org.onap.ccsdk.distribution</groupId>
228 <artifactId>platform-logic-installer</artifactId>
Dan Timoney58373932020-12-15 15:19:00 -0500229 <version>${ccsdk.distribution.version}</version>
Dan Timoneyb84d3992020-11-16 14:58:31 -0500230 <type>zip</type>
231 </artifactItem>
232 </artifactItems>
233 </configuration>
234 </execution>
Dan Timoney31172d62020-06-05 15:46:39 -0400235 </executions>
236 </plugin>
237 <plugin>
238 <groupId>io.swagger</groupId>
239 <artifactId>swagger-codegen-maven-plugin</artifactId>
240 <version>2.3.1</version>
241 <executions>
242 <execution>
Dan Timoney50d4d552020-11-10 12:55:43 -0500243 <phase>generate-sources</phase>
Dan Timoney31172d62020-06-05 15:46:39 -0400244 <goals>
245 <goal>generate</goal>
246 </goals>
247 <configuration>
248 <output>target/generated-sources</output>
Dan Timoneyddeeff82021-03-12 16:01:34 -0500249 <inputSpec>${project.build.directory}/yaml/sliapi-model-swagger.yaml</inputSpec>
Dan Timoney31172d62020-06-05 15:46:39 -0400250 <language>spring</language>
251 <apiPackage>org.onap.ccsdk.apps.ms.sliboot.swagger</apiPackage>
252 <modelPackage>org.onap.ccsdk.apps.ms.sliboot.swagger.model</modelPackage>
253 <invokerPackage>org.onap.ccsdk.apps.ms.sliboot.swagger</invokerPackage>
254 <generateApis>true</generateApis>
255 <generateApiTests>true</generateApiTests>
256 <ignoreFileOverride>${project.basedir}/.swagger-codegen-ignore</ignoreFileOverride>
257 <withXml>true</withXml>
Dan Timoney385874a2020-06-26 15:56:48 -0400258 <templateDirectory>${project.basedir}/src/main/templates</templateDirectory>
Dan Timoney31172d62020-06-05 15:46:39 -0400259 <configOptions>
260 <java8>true</java8>
261 <springBootVersion>2.2.4-RELEASE</springBootVersion>
262 </configOptions>
263 </configuration>
264 </execution>
265 </executions>
266 </plugin>
267 <plugin>
268 <groupId>org.springframework.boot</groupId>
269 <artifactId>spring-boot-maven-plugin</artifactId>
Dan Timoney2e0a5282020-10-27 16:43:47 -0400270 <configuration>
271 <classifier>exec</classifier>
272 </configuration>
Dan Timoney31172d62020-06-05 15:46:39 -0400273 <executions>
274 <execution>
275 <goals>
276 <goal>repackage</goal>
277 </goals>
278 </execution>
279 </executions>
280 </plugin>
Dan Timoneyb84d3992020-11-16 14:58:31 -0500281 <plugin>
282 <groupId>org.apache.maven.plugins</groupId>
283 <artifactId>maven-surefire-plugin</artifactId>
284 <version>2.19.1</version>
285 <configuration>
286 <forkMode>always</forkMode>
287 <environmentVariables>
288 <SDNC_CONFIG_DIR>${basedir}/src/test/resources</SDNC_CONFIG_DIR>
289 <SVCLOGIC_PROPERTIES>${basedir}/src/test/resources/svclogic.properties</SVCLOGIC_PROPERTIES>
290 </environmentVariables>
291 </configuration>
292 </plugin>
293 <plugin>
294 <groupId>org.apache.maven.plugins</groupId>
295 <artifactId>maven-failsafe-plugin</artifactId>
296 <executions>
Singal, Kapil (ks220y)d70bd722021-06-17 16:06:17 -0400297 <execution>
298 <goals>
299 <goal>integration-test</goal>
300 <goal>verify</goal>
301 </goals>
302 </execution>
Dan Timoneyb84d3992020-11-16 14:58:31 -0500303 </executions>
304 <configuration>
Singal, Kapil (ks220y)d70bd722021-06-17 16:06:17 -0400305 <skipITs>true</skipITs>
Dan Timoneyb84d3992020-11-16 14:58:31 -0500306 </configuration>
Singal, Kapil (ks220y)d70bd722021-06-17 16:06:17 -0400307 </plugin>
308 <plugin>
Dan Timoneyb84d3992020-11-16 14:58:31 -0500309 <artifactId>maven-resources-plugin</artifactId>
310 <version>2.6</version>
311 <executions>
312 <execution>
313 <id>copy-dockerfile</id>
314 <goals>
315 <goal>copy-resources</goal>
316 </goals><!-- here the phase you need -->
317 <phase>initialize</phase>
318 <configuration>
319 <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
320 <resources>
321 <resource>
322 <directory>src/main/docker</directory>
323 <includes>
324 <include>Dockerfile</include>
325 </includes>
326 <filtering>true</filtering>
327 </resource>
328 </resources>
329 </configuration>
330 </execution>
331 <execution>
332 <id>copy-config</id>
333 <goals>
334 <goal>copy-resources</goal>
335 </goals><!-- here the phase you need -->
336 <phase>generate-resources</phase>
337 <configuration>
338 <outputDirectory>${basedir}/target/docker-stage/opt/onap/ccsdk/config</outputDirectory>
339 <resources>
340 <resource>
341 <directory>src/main/resources</directory>
342 <includes>
343 <include>*.properties</include>
344 <include>*.props</include>
345 <include>*.sql</include>
346 </includes>
347 <filtering>true</filtering>
348 </resource>
349 <resource>
350 <directory>src/main/resources</directory>
351 <includes>
352 <include>*.keyfile</include>
353 <include>*.jks</include>
354 <include>*.p12</include>
355 </includes>
356 <filtering>false</filtering>
357 </resource>
358 </resources>
359 </configuration>
360 </execution>
361 <execution>
362 <id>copy-script</id>
363 <goals>
364 <goal>copy-resources</goal>
365 </goals><!-- here the phase you need -->
366 <phase>generate-resources</phase>
367 <configuration>
368 <outputDirectory>${basedir}/target/docker-stage/opt/onap/ccsdk/bin</outputDirectory>
369 <resources>
370 <resource>
371 <directory>src/main/resources</directory>
372 <includes>
373 <include>*.sh</include>
374 </includes>
375 <filtering>true</filtering>
376 </resource>
377 </resources>
378 </configuration>
379 </execution>
380 <execution>
381 <id>copy-jar</id>
382 <goals>
383 <goal>copy-resources</goal>
384 </goals><!-- here the phase you need -->
385 <phase>package</phase>
386 <configuration>
387 <outputDirectory>${basedir}/target/docker-stage/opt/onap/ccsdk/lib</outputDirectory>
388 <resources>
389 <resource>
390 <directory>${basedir}/target</directory>
391 <includes>
392 <include>${ccsdk.sliboot.jar}</include>
393 </includes>
394 <filtering>false</filtering>
395 </resource>
396 </resources>
397 </configuration>
398 </execution>
399 </executions>
400 </plugin>
Dan Timoney31172d62020-06-05 15:46:39 -0400401
402 </plugins>
403 </build>
404
405 <profiles>
406 <profile>
407 <id>docker</id>
408 <build>
409 <plugins>
410 <plugin>
411 <groupId>org.apache.maven.plugins</groupId>
Dan Timoneyb84d3992020-11-16 14:58:31 -0500412 <artifactId>maven-failsafe-plugin</artifactId>
Dan Timoney31172d62020-06-05 15:46:39 -0400413 <executions>
Singal, Kapil (ks220y)d70bd722021-06-17 16:06:17 -0400414 <execution>
415 <goals>
416 <goal>integration-test</goal>
417 <goal>verify</goal>
418 </goals>
419 </execution>
Dan Timoney31172d62020-06-05 15:46:39 -0400420 </executions>
Dan Timoneyb84d3992020-11-16 14:58:31 -0500421 <configuration>
Singal, Kapil (ks220y)d70bd722021-06-17 16:06:17 -0400422 <skipITs>false</skipITs>
423 <environmentVariables>
424 <SLIBOOT_PORT>${sliboot.port}</SLIBOOT_PORT>
425 </environmentVariables>
Dan Timoneyb84d3992020-11-16 14:58:31 -0500426 </configuration>
Singal, Kapil (ks220y)d70bd722021-06-17 16:06:17 -0400427 </plugin>
Dan Timoney31172d62020-06-05 15:46:39 -0400428 <plugin>
429 <groupId>io.fabric8</groupId>
430 <artifactId>docker-maven-plugin</artifactId>
431 <version>0.28.0</version>
432 <inherited>false</inherited>
433 <configuration>
434 <images>
435 <image>
436 <name>${image.name}</name>
437 <build>
438 <cleanup>try</cleanup>
439 <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
440 <dockerFile>Dockerfile</dockerFile>
441 <tags>
442 <tag>${project.docker.latestminortag.version}</tag>
443 <tag>${project.docker.latestfulltag.version}</tag>
444 <tag>${project.docker.latesttagtimestamp.version}</tag>
445 </tags>
446 </build>
447 </image>
448 </images>
449 </configuration>
450 <executions>
451 <execution>
452 <id>generate-images</id>
453 <phase>package</phase>
454 <goals>
455 <goal>build</goal>
456 </goals>
457 </execution>
Dan Timoneyb84d3992020-11-16 14:58:31 -0500458 <execution>
459 <id>start-it-instance</id>
460 <phase>pre-integration-test</phase>
461 <goals>
462 <goal>start</goal>
463 </goals>
464 <configuration>
465 <images>
466 <image>
467 <name>mariadb:10.5</name>
468 <alias>slibootdb</alias>
469 <run>
470 <env>
471 <MYSQL_ROOT_PASSWORD>itsASecret</MYSQL_ROOT_PASSWORD>
472 <MYSQL_USER>sli</MYSQL_USER>
473 <MYSQL_PASSWORD>abc123</MYSQL_PASSWORD>
474 <MYSQL_DATABASE>sdnctl</MYSQL_DATABASE>
475 </env>
476 <network>
477 <mode>custom</mode>
478 <name>onap</name>
479 <alias>dbhost</alias>
480 </network>
481 <ports>
482 <port>slibootdb.port:3306</port>
483 </ports>
484 <log>
485 <enabled>true</enabled>
486 </log>
487 </run>
488 </image>
489 <image>
490 <name>${image.name}:${project.docker.latesttagtimestamp.version}</name>
491 <alias>sliboot-container</alias>
492 <run>
493 <env>
494 <MYSQL_USER>sli</MYSQL_USER>
495 <MYSQL_PASSWORD>abc123</MYSQL_PASSWORD>
496 <MYSQL_DATABASE>sdnctl</MYSQL_DATABASE>
497 <SDNC_CONFIG_DIR>/opt/onap/ccsdk/config</SDNC_CONFIG_DIR>
498 </env>
499 <dependsOn>
500 <container>slibootdb</container>
501 </dependsOn>
502 <network>
503 <mode>custom</mode>
504 <name>onap</name>
505 <alias>sliboot</alias>
506 </network>
507 <ports>
508 <port>sliboot.port:8080</port>
509 </ports>
510 <wait>
511 <log>Started SlibootApp</log>
512 <time>120000</time>
513 </wait>
514 <log>
515 <enabled>true</enabled>
516 </log>
517 </run>
518 </image>
519 </images>
520 </configuration>
521 </execution>
522 <execution>
523 <id>stop-it-instance</id>
524 <phase>post-integration-test</phase>
525 <goals>
526 <goal>stop</goal>
527 </goals>
528 </execution>
Dan Timoney31172d62020-06-05 15:46:39 -0400529 <execution>
530 <id>push-images</id>
531 <phase>${docker.push.phase}</phase>
532 <goals>
533 <goal>build</goal>
534 <goal>push</goal>
535 </goals>
536 </execution>
537 </executions>
538 </plugin>
Dan Timoney31172d62020-06-05 15:46:39 -0400539 </plugins>
540 </build>
541 </profile>
542 </profiles>
543</project>