blob: b1879e548e3179cf6e7cb62b98efe568182d17fa [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 Timoney58373932020-12-15 15:19:00 -05008 <version>2.1.0</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 Timoney6306b592020-09-10 14:56:52 -040014 <version>1.1.0-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>
23 <base.image.name>onap/ccsdk-alpine-image</base.image.name>
Dan Timoney2e0a5282020-10-27 16:43:47 -040024 <base.image.version>1.1-STAGING-latest</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 Timoney31172d62020-06-05 15:46:39 -040034 </properties>
35
36 <dependencies>
37 <dependency>
38 <groupId>io.swagger</groupId>
39 <artifactId>swagger-annotations</artifactId>
40 </dependency>
41 <dependency>
42 <groupId>org.apache.shiro</groupId>
43 <artifactId>shiro-spring-boot-web-starter</artifactId>
44 <version>${shiro.version}</version>
45 <exclusions>
46 <exclusion>
47 <groupId>org.springframework.boot</groupId>
48 <artifactId>spring-boot-starter-logging</artifactId>
49 </exclusion>
50 </exclusions>
51 </dependency>
52 <dependency>
53 <groupId>org.springframework.boot</groupId>
54 <artifactId>spring-boot-starter-log4j2</artifactId>
55 </dependency>
56 <dependency>
Dan Timoneyefc72592020-09-03 11:28:18 -040057 <groupId>org.springframework.boot</groupId>
58 <artifactId>spring-boot-starter-validation</artifactId>
59 </dependency>
60 <dependency>
Dan Timoney31172d62020-06-05 15:46:39 -040061 <groupId>org.onap.aaf.cadi</groupId>
62 <artifactId>aaf-cadi-shiro</artifactId>
63 <version>${aaf-shiro-bundle.version}</version>
64 </dependency>
65
66 <dependency>
67 <groupId>org.springframework.boot</groupId>
68 <artifactId>spring-boot-starter-test</artifactId>
69 <scope>test</scope>
70 </dependency>
71 <dependency>
72 <groupId>org.springframework.boot</groupId>
73 <artifactId>spring-boot-starter-data-jpa</artifactId>
74 </dependency>
75 <dependency>
76 <groupId>io.springfox</groupId>
77 <artifactId>springfox-swagger2</artifactId>
78 <version>2.9.2</version>
79 </dependency>
80 <dependency>
81 <groupId>io.springfox</groupId>
82 <artifactId>springfox-swagger-ui</artifactId>
83 <version>2.9.2</version>
84 </dependency>
85 <dependency>
Dan Timoneyf3430362020-06-09 12:42:46 -040086 <groupId>${project.groupId}</groupId>
87 <artifactId>services</artifactId>
88 <version>${project.version}</version>
89 </dependency>
90 <dependency>
Dan Timoney31172d62020-06-05 15:46:39 -040091 <groupId>org.onap.ccsdk.sli.core</groupId>
92 <artifactId>dblib-provider</artifactId>
93 <version>${ccsdk.sli.core.version}</version>
94 </dependency>
95 <dependency>
96 <groupId>org.onap.ccsdk.sli.core</groupId>
97 <artifactId>sli-common</artifactId>
98 <version>${ccsdk.sli.core.version}</version>
99 </dependency>
100 <dependency>
101 <groupId>org.onap.ccsdk.sli.core</groupId>
102 <artifactId>sli-provider-base</artifactId>
103 <version>${ccsdk.sli.core.version}</version>
104 </dependency>
105 <dependency>
106 <groupId>com.google.code.gson</groupId>
107 <artifactId>gson</artifactId>
108 </dependency>
109 <dependency>
110 <groupId>org.apache.derby</groupId>
111 <artifactId>derby</artifactId>
112 <scope>test</scope>
113 </dependency>
114 <dependency>
115 <groupId>org.mariadb.jdbc</groupId>
116 <artifactId>mariadb-java-client</artifactId>
117 </dependency>
118 <dependency>
119 <groupId>junit</groupId>
120 <artifactId>junit</artifactId>
121 <scope>test</scope>
122 </dependency>
123 <dependency>
124 <groupId>org.onap.logging-analytics</groupId>
125 <artifactId>logging-filter-spring</artifactId>
126 <version>1.6.6</version>
127 </dependency>
128 <dependency>
129 <groupId>javax.ws.rs</groupId>
130 <artifactId>javax.ws.rs-api</artifactId>
131 </dependency>
132 <dependency>
133 <groupId>org.onap.ccsdk.sli.core</groupId>
134 <artifactId>sliPluginUtils-provider</artifactId>
135 <version>${ccsdk.sli.core.version}</version>
136 </dependency>
137 <dependency>
138 <groupId>org.onap.ccsdk.sli.plugins</groupId>
139 <artifactId>restapi-call-node-provider</artifactId>
140 <version>${ccsdk.sli.plugins.version}</version>
141 </dependency>
142 <dependency>
143 <groupId>org.onap.ccsdk.sli.plugins</groupId>
144 <artifactId>properties-node-provider</artifactId>
145 <version>${ccsdk.sli.plugins.version}</version>
146 </dependency>
147 <!-- this jersey jar is needed for rest api call node to function properly -->
148 <dependency>
149 <groupId>org.glassfish.jersey.inject</groupId>
150 <artifactId>jersey-hk2</artifactId>
151 </dependency>
152 </dependencies>
153
154 <build>
155 <plugins>
156 <plugin>
157 <groupId>org.codehaus.groovy.maven</groupId>
158 <artifactId>gmaven-plugin</artifactId>
159 <executions>
160 <execution>
161 <phase>validate</phase>
162 <goals>
163 <goal>execute</goal>
164 </goals>
165 <configuration>
166 <source>${basedir}/TagVersion.groovy</source>
167 </configuration>
168 </execution>
169 </executions>
170 </plugin>
171
172 <plugin>
173 <groupId>org.apache.maven.plugins</groupId>
174 <artifactId>maven-dependency-plugin</artifactId>
175 <version>2.10</version>
176
177 <executions>
178 <execution>
179 <id>get-sliapi-yaml</id>
180 <phase>initialize</phase>
181 <goals>
182 <goal>copy</goal>
183 </goals>
184 <configuration>
185 <artifactItems>
186 <artifactItem>
187 <groupId>org.onap.ccsdk.sli.core</groupId>
188 <artifactId>sliapi-model-swagger</artifactId>
189 <version>${ccsdk.sli.core.version}</version>
190 <type>yaml</type>
191 <outputDirectory>${project.build.directory}/yaml</outputDirectory>
192 <destFileName>sliapi.yaml</destFileName>
193 </artifactItem>
194 </artifactItems>
195 </configuration>
196 </execution>
Dan Timoneyb84d3992020-11-16 14:58:31 -0500197 <execution>
198 <id>copy-dependencies</id>
199 <goals>
200 <goal>copy-dependencies</goal>
201 </goals>
202 <phase>prepare-package</phase>
203 <configuration>
204 <excludeTransitive>true</excludeTransitive>
205 <outputDirectory>${project.build.directory}/docker-stage/opt/onap/ccsdk/lib</outputDirectory>
206 <overWriteReleases>false</overWriteReleases>
207 <overWriteSnapshots>true</overWriteSnapshots>
208 <overWriteIfNewer>true</overWriteIfNewer>
209 <useRepositoryLayout>false</useRepositoryLayout>
210 <addParentPoms>false</addParentPoms>
211 <copyPom>false</copyPom>
212 </configuration>
213 </execution>
214 <execution>
215 <id>unpack dgs</id>
216 <phase>generate-sources</phase>
217 <goals>
218 <goal>unpack</goal>
219 </goals>
220 <configuration>
221 <outputDirectory>${basedir}/target/docker-stage/opt/onap/ccsdk</outputDirectory>
222 <artifactItems>
223 <artifactItem>
224 <groupId>org.onap.ccsdk.distribution</groupId>
225 <artifactId>platform-logic-installer</artifactId>
Dan Timoney58373932020-12-15 15:19:00 -0500226 <version>${ccsdk.distribution.version}</version>
Dan Timoneyb84d3992020-11-16 14:58:31 -0500227 <type>zip</type>
228 </artifactItem>
229 </artifactItems>
230 </configuration>
231 </execution>
Dan Timoney31172d62020-06-05 15:46:39 -0400232 </executions>
233 </plugin>
234 <plugin>
235 <groupId>io.swagger</groupId>
236 <artifactId>swagger-codegen-maven-plugin</artifactId>
237 <version>2.3.1</version>
238 <executions>
239 <execution>
Dan Timoney50d4d552020-11-10 12:55:43 -0500240 <phase>generate-sources</phase>
Dan Timoney31172d62020-06-05 15:46:39 -0400241 <goals>
242 <goal>generate</goal>
243 </goals>
244 <configuration>
245 <output>target/generated-sources</output>
246 <inputSpec>${project.build.directory}/yaml/sliapi.yaml</inputSpec>
247 <language>spring</language>
248 <apiPackage>org.onap.ccsdk.apps.ms.sliboot.swagger</apiPackage>
249 <modelPackage>org.onap.ccsdk.apps.ms.sliboot.swagger.model</modelPackage>
250 <invokerPackage>org.onap.ccsdk.apps.ms.sliboot.swagger</invokerPackage>
251 <generateApis>true</generateApis>
252 <generateApiTests>true</generateApiTests>
253 <ignoreFileOverride>${project.basedir}/.swagger-codegen-ignore</ignoreFileOverride>
254 <withXml>true</withXml>
Dan Timoney385874a2020-06-26 15:56:48 -0400255 <templateDirectory>${project.basedir}/src/main/templates</templateDirectory>
Dan Timoney31172d62020-06-05 15:46:39 -0400256 <configOptions>
257 <java8>true</java8>
258 <springBootVersion>2.2.4-RELEASE</springBootVersion>
259 </configOptions>
260 </configuration>
261 </execution>
262 </executions>
263 </plugin>
264 <plugin>
265 <groupId>org.springframework.boot</groupId>
266 <artifactId>spring-boot-maven-plugin</artifactId>
Dan Timoney2e0a5282020-10-27 16:43:47 -0400267 <configuration>
268 <classifier>exec</classifier>
269 </configuration>
Dan Timoney31172d62020-06-05 15:46:39 -0400270 <executions>
271 <execution>
272 <goals>
273 <goal>repackage</goal>
274 </goals>
275 </execution>
276 </executions>
277 </plugin>
Dan Timoneyb84d3992020-11-16 14:58:31 -0500278 <plugin>
279 <groupId>org.apache.maven.plugins</groupId>
280 <artifactId>maven-surefire-plugin</artifactId>
281 <version>2.19.1</version>
282 <configuration>
283 <forkMode>always</forkMode>
284 <environmentVariables>
285 <SDNC_CONFIG_DIR>${basedir}/src/test/resources</SDNC_CONFIG_DIR>
286 <SVCLOGIC_PROPERTIES>${basedir}/src/test/resources/svclogic.properties</SVCLOGIC_PROPERTIES>
287 </environmentVariables>
288 </configuration>
289 </plugin>
290 <plugin>
291 <groupId>org.apache.maven.plugins</groupId>
292 <artifactId>maven-failsafe-plugin</artifactId>
293 <executions>
294 <execution>
295 <goals>
296 <goal>integration-test</goal>
297 <goal>verify</goal>
298 </goals>
299 </execution>
300 </executions>
301 <configuration>
302 <skipITs>true</skipITs>
303 </configuration>
304 </plugin>
305 <plugin>
306 <artifactId>maven-resources-plugin</artifactId>
307 <version>2.6</version>
308 <executions>
309 <execution>
310 <id>copy-dockerfile</id>
311 <goals>
312 <goal>copy-resources</goal>
313 </goals><!-- here the phase you need -->
314 <phase>initialize</phase>
315 <configuration>
316 <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
317 <resources>
318 <resource>
319 <directory>src/main/docker</directory>
320 <includes>
321 <include>Dockerfile</include>
322 </includes>
323 <filtering>true</filtering>
324 </resource>
325 </resources>
326 </configuration>
327 </execution>
328 <execution>
329 <id>copy-config</id>
330 <goals>
331 <goal>copy-resources</goal>
332 </goals><!-- here the phase you need -->
333 <phase>generate-resources</phase>
334 <configuration>
335 <outputDirectory>${basedir}/target/docker-stage/opt/onap/ccsdk/config</outputDirectory>
336 <resources>
337 <resource>
338 <directory>src/main/resources</directory>
339 <includes>
340 <include>*.properties</include>
341 <include>*.props</include>
342 <include>*.sql</include>
343 </includes>
344 <filtering>true</filtering>
345 </resource>
346 <resource>
347 <directory>src/main/resources</directory>
348 <includes>
349 <include>*.keyfile</include>
350 <include>*.jks</include>
351 <include>*.p12</include>
352 </includes>
353 <filtering>false</filtering>
354 </resource>
355 </resources>
356 </configuration>
357 </execution>
358 <execution>
359 <id>copy-script</id>
360 <goals>
361 <goal>copy-resources</goal>
362 </goals><!-- here the phase you need -->
363 <phase>generate-resources</phase>
364 <configuration>
365 <outputDirectory>${basedir}/target/docker-stage/opt/onap/ccsdk/bin</outputDirectory>
366 <resources>
367 <resource>
368 <directory>src/main/resources</directory>
369 <includes>
370 <include>*.sh</include>
371 </includes>
372 <filtering>true</filtering>
373 </resource>
374 </resources>
375 </configuration>
376 </execution>
377 <execution>
378 <id>copy-jar</id>
379 <goals>
380 <goal>copy-resources</goal>
381 </goals><!-- here the phase you need -->
382 <phase>package</phase>
383 <configuration>
384 <outputDirectory>${basedir}/target/docker-stage/opt/onap/ccsdk/lib</outputDirectory>
385 <resources>
386 <resource>
387 <directory>${basedir}/target</directory>
388 <includes>
389 <include>${ccsdk.sliboot.jar}</include>
390 </includes>
391 <filtering>false</filtering>
392 </resource>
393 </resources>
394 </configuration>
395 </execution>
396 </executions>
397 </plugin>
Dan Timoney31172d62020-06-05 15:46:39 -0400398
399 </plugins>
400 </build>
401
402 <profiles>
403 <profile>
404 <id>docker</id>
405 <build>
406 <plugins>
407 <plugin>
408 <groupId>org.apache.maven.plugins</groupId>
Dan Timoneyb84d3992020-11-16 14:58:31 -0500409 <artifactId>maven-failsafe-plugin</artifactId>
Dan Timoney31172d62020-06-05 15:46:39 -0400410 <executions>
Dan Timoneyb84d3992020-11-16 14:58:31 -0500411 <execution>
412 <goals>
413 <goal>integration-test</goal>
414 <goal>verify</goal>
415 </goals>
416 </execution>
Dan Timoney31172d62020-06-05 15:46:39 -0400417 </executions>
Dan Timoneyb84d3992020-11-16 14:58:31 -0500418 <configuration>
419 <skipITs>false</skipITs>
420 <environmentVariables>
421 <SLIBOOT_PORT>${sliboot.port}</SLIBOOT_PORT>
422 </environmentVariables>
423 </configuration>
424 </plugin>
Dan Timoney31172d62020-06-05 15:46:39 -0400425 <plugin>
426 <groupId>io.fabric8</groupId>
427 <artifactId>docker-maven-plugin</artifactId>
428 <version>0.28.0</version>
429 <inherited>false</inherited>
430 <configuration>
431 <images>
432 <image>
433 <name>${image.name}</name>
434 <build>
435 <cleanup>try</cleanup>
436 <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
437 <dockerFile>Dockerfile</dockerFile>
438 <tags>
439 <tag>${project.docker.latestminortag.version}</tag>
440 <tag>${project.docker.latestfulltag.version}</tag>
441 <tag>${project.docker.latesttagtimestamp.version}</tag>
442 </tags>
443 </build>
444 </image>
445 </images>
446 </configuration>
447 <executions>
448 <execution>
449 <id>generate-images</id>
450 <phase>package</phase>
451 <goals>
452 <goal>build</goal>
453 </goals>
454 </execution>
Dan Timoneyb84d3992020-11-16 14:58:31 -0500455
456 <execution>
457 <id>start-it-instance</id>
458 <phase>pre-integration-test</phase>
459 <goals>
460 <goal>start</goal>
461 </goals>
462 <configuration>
463 <images>
464 <image>
465 <name>mariadb:10.5</name>
466 <alias>slibootdb</alias>
467 <run>
468 <env>
469 <MYSQL_ROOT_PASSWORD>itsASecret</MYSQL_ROOT_PASSWORD>
470 <MYSQL_USER>sli</MYSQL_USER>
471 <MYSQL_PASSWORD>abc123</MYSQL_PASSWORD>
472 <MYSQL_DATABASE>sdnctl</MYSQL_DATABASE>
473 </env>
474 <network>
475 <mode>custom</mode>
476 <name>onap</name>
477 <alias>dbhost</alias>
478 </network>
479 <ports>
480 <port>slibootdb.port:3306</port>
481 </ports>
482 <log>
483 <enabled>true</enabled>
484 </log>
485 </run>
486 </image>
487 <image>
488 <name>${image.name}:${project.docker.latesttagtimestamp.version}</name>
489 <alias>sliboot-container</alias>
490 <run>
491 <env>
492 <MYSQL_USER>sli</MYSQL_USER>
493 <MYSQL_PASSWORD>abc123</MYSQL_PASSWORD>
494 <MYSQL_DATABASE>sdnctl</MYSQL_DATABASE>
495 <SDNC_CONFIG_DIR>/opt/onap/ccsdk/config</SDNC_CONFIG_DIR>
496 </env>
497 <dependsOn>
498 <container>slibootdb</container>
499 </dependsOn>
500 <network>
501 <mode>custom</mode>
502 <name>onap</name>
503 <alias>sliboot</alias>
504 </network>
505 <ports>
506 <port>sliboot.port:8080</port>
507 </ports>
508 <wait>
509 <log>Started SlibootApp</log>
510 <time>120000</time>
511 </wait>
512 <log>
513 <enabled>true</enabled>
514 </log>
515 </run>
516 </image>
517 </images>
518 </configuration>
519 </execution>
520 <execution>
521 <id>stop-it-instance</id>
522 <phase>post-integration-test</phase>
523 <goals>
524 <goal>stop</goal>
525 </goals>
526 </execution>
Dan Timoney31172d62020-06-05 15:46:39 -0400527 <execution>
528 <id>push-images</id>
529 <phase>${docker.push.phase}</phase>
530 <goals>
531 <goal>build</goal>
532 <goal>push</goal>
533 </goals>
534 </execution>
535 </executions>
536 </plugin>
Dan Timoneyb84d3992020-11-16 14:58:31 -0500537
Dan Timoney31172d62020-06-05 15:46:39 -0400538 </plugins>
539 </build>
540 </profile>
541 </profiles>
542</project>