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