1 <?xml version="1.0" encoding="UTF-8"?>
2 <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">
3 <modelVersion>4.0.0</modelVersion>
6 <groupId>org.onap.ccsdk.parent</groupId>
7 <artifactId>spring-boot-starter-parent</artifactId>
8 <version>2.1.1</version>
12 <groupId>org.onap.ccsdk.apps</groupId>
13 <artifactId>sliboot</artifactId>
14 <version>1.1.0</version>
15 <packaging>jar</packaging>
17 <name>ccsdk-apps :: sliboot :: ${project.artifactId}</name>
20 <start-class>org.onap.ccsdk.apps.ms.sliboot.SlibootApp</start-class>
21 <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-j11-image</base.image.name>
24 <base.image.version>1.1.1</base.image.version>
25 <image.name>onap/ccsdk-sliboot-alpine-image</image.name>
26 <ccsdk.project.version>${project.version}</ccsdk.project.version>
27 <ccsdk.distribution.version>1.1.0</ccsdk.distribution.version>
28 <ccsdk.build.timestamp>${maven.build.timestamp}</ccsdk.build.timestamp>
29 <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
30 <ccsdk.sliboot.jar>${project.artifactId}-${project.version}-exec.jar</ccsdk.sliboot.jar>
31 <docker.push.phase>deploy</docker.push.phase>
32 <docker.verbose>true</docker.verbose>
33 <docker.autoCreateCustomNetworks>true</docker.autoCreateCustomNetworks>
34 <java.home>/opt/java/openjdk</java.home>
35 <java.security.dir>${java.home}/lib/security</java.security.dir>
40 <groupId>io.swagger</groupId>
41 <artifactId>swagger-annotations</artifactId>
44 <groupId>org.apache.shiro</groupId>
45 <artifactId>shiro-spring-boot-web-starter</artifactId>
46 <version>${shiro.version}</version>
49 <groupId>org.springframework.boot</groupId>
50 <artifactId>spring-boot-starter-logging</artifactId>
55 <groupId>org.springframework.boot</groupId>
56 <artifactId>spring-boot-starter-log4j2</artifactId>
59 <groupId>org.springframework.boot</groupId>
60 <artifactId>spring-boot-starter-validation</artifactId>
63 <groupId>org.onap.aaf.cadi</groupId>
64 <artifactId>aaf-cadi-shiro</artifactId>
65 <version>${aaf-shiro-bundle.version}</version>
69 <groupId>org.springframework.boot</groupId>
70 <artifactId>spring-boot-starter-test</artifactId>
74 <groupId>org.springframework.boot</groupId>
75 <artifactId>spring-boot-starter-data-jpa</artifactId>
78 <groupId>io.springfox</groupId>
79 <artifactId>springfox-swagger2</artifactId>
80 <version>2.9.2</version>
83 <groupId>io.springfox</groupId>
84 <artifactId>springfox-swagger-ui</artifactId>
85 <version>2.9.2</version>
88 <groupId>${project.groupId}</groupId>
89 <artifactId>services</artifactId>
90 <version>${project.version}</version>
93 <groupId>org.onap.ccsdk.sli.core</groupId>
94 <artifactId>dblib-provider</artifactId>
95 <version>${ccsdk.sli.core.version}</version>
98 <groupId>org.onap.ccsdk.sli.core</groupId>
99 <artifactId>sli-common</artifactId>
100 <version>${ccsdk.sli.core.version}</version>
103 <groupId>org.onap.ccsdk.sli.core</groupId>
104 <artifactId>sli-provider-base</artifactId>
105 <version>${ccsdk.sli.core.version}</version>
108 <groupId>com.google.code.gson</groupId>
109 <artifactId>gson</artifactId>
112 <groupId>org.apache.derby</groupId>
113 <artifactId>derby</artifactId>
117 <groupId>org.mariadb.jdbc</groupId>
118 <artifactId>mariadb-java-client</artifactId>
121 <groupId>junit</groupId>
122 <artifactId>junit</artifactId>
126 <groupId>org.onap.logging-analytics</groupId>
127 <artifactId>logging-filter-spring</artifactId>
128 <version>1.6.6</version>
131 <groupId>javax.ws.rs</groupId>
132 <artifactId>javax.ws.rs-api</artifactId>
135 <groupId>org.onap.ccsdk.sli.core</groupId>
136 <artifactId>sliPluginUtils-provider</artifactId>
137 <version>${ccsdk.sli.core.version}</version>
140 <groupId>org.onap.ccsdk.sli.plugins</groupId>
141 <artifactId>restapi-call-node-provider</artifactId>
142 <version>${ccsdk.sli.plugins.version}</version>
145 <groupId>org.onap.ccsdk.sli.plugins</groupId>
146 <artifactId>properties-node-provider</artifactId>
147 <version>${ccsdk.sli.plugins.version}</version>
149 <!-- this jersey jar is needed for rest api call node to function properly -->
151 <groupId>org.glassfish.jersey.inject</groupId>
152 <artifactId>jersey-hk2</artifactId>
159 <groupId>org.codehaus.groovy.maven</groupId>
160 <artifactId>gmaven-plugin</artifactId>
163 <phase>validate</phase>
168 <source>${basedir}/TagVersion.groovy</source>
175 <groupId>org.apache.maven.plugins</groupId>
176 <artifactId>maven-dependency-plugin</artifactId>
177 <version>2.10</version>
181 <id>get-sliapi-yaml</id>
182 <phase>initialize</phase>
189 <groupId>org.onap.ccsdk.sli.core</groupId>
190 <artifactId>sliapi-model-swagger</artifactId>
191 <version>${ccsdk.sli.core.version}</version>
193 <outputDirectory>${project.build.directory}/yaml</outputDirectory>
194 <destFileName>sliapi.yaml</destFileName>
200 <id>copy-dependencies</id>
202 <goal>copy-dependencies</goal>
204 <phase>prepare-package</phase>
206 <excludeTransitive>true</excludeTransitive>
207 <outputDirectory>${project.build.directory}/docker-stage/opt/onap/ccsdk/lib</outputDirectory>
208 <overWriteReleases>false</overWriteReleases>
209 <overWriteSnapshots>true</overWriteSnapshots>
210 <overWriteIfNewer>true</overWriteIfNewer>
211 <useRepositoryLayout>false</useRepositoryLayout>
212 <addParentPoms>false</addParentPoms>
213 <copyPom>false</copyPom>
218 <phase>generate-sources</phase>
223 <outputDirectory>${basedir}/target/docker-stage/opt/onap/ccsdk</outputDirectory>
226 <groupId>org.onap.ccsdk.distribution</groupId>
227 <artifactId>platform-logic-installer</artifactId>
228 <version>${ccsdk.distribution.version}</version>
237 <groupId>io.swagger</groupId>
238 <artifactId>swagger-codegen-maven-plugin</artifactId>
239 <version>2.3.1</version>
242 <phase>generate-sources</phase>
244 <goal>generate</goal>
247 <output>target/generated-sources</output>
248 <inputSpec>${project.build.directory}/yaml/sliapi.yaml</inputSpec>
249 <language>spring</language>
250 <apiPackage>org.onap.ccsdk.apps.ms.sliboot.swagger</apiPackage>
251 <modelPackage>org.onap.ccsdk.apps.ms.sliboot.swagger.model</modelPackage>
252 <invokerPackage>org.onap.ccsdk.apps.ms.sliboot.swagger</invokerPackage>
253 <generateApis>true</generateApis>
254 <generateApiTests>true</generateApiTests>
255 <ignoreFileOverride>${project.basedir}/.swagger-codegen-ignore</ignoreFileOverride>
256 <withXml>true</withXml>
257 <templateDirectory>${project.basedir}/src/main/templates</templateDirectory>
260 <springBootVersion>2.2.4-RELEASE</springBootVersion>
267 <groupId>org.springframework.boot</groupId>
268 <artifactId>spring-boot-maven-plugin</artifactId>
270 <classifier>exec</classifier>
275 <goal>repackage</goal>
281 <groupId>org.apache.maven.plugins</groupId>
282 <artifactId>maven-surefire-plugin</artifactId>
283 <version>2.19.1</version>
285 <forkMode>always</forkMode>
286 <environmentVariables>
287 <SDNC_CONFIG_DIR>${basedir}/src/test/resources</SDNC_CONFIG_DIR>
288 <SVCLOGIC_PROPERTIES>${basedir}/src/test/resources/svclogic.properties</SVCLOGIC_PROPERTIES>
289 </environmentVariables>
293 <groupId>org.apache.maven.plugins</groupId>
294 <artifactId>maven-failsafe-plugin</artifactId>
298 <goal>integration-test</goal>
304 <skipITs>true</skipITs>
308 <artifactId>maven-resources-plugin</artifactId>
309 <version>2.6</version>
312 <id>copy-dockerfile</id>
314 <goal>copy-resources</goal>
315 </goals><!-- here the phase you need -->
316 <phase>initialize</phase>
318 <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
321 <directory>src/main/docker</directory>
323 <include>Dockerfile</include>
325 <filtering>true</filtering>
333 <goal>copy-resources</goal>
334 </goals><!-- here the phase you need -->
335 <phase>generate-resources</phase>
337 <outputDirectory>${basedir}/target/docker-stage/opt/onap/ccsdk/config</outputDirectory>
340 <directory>src/main/resources</directory>
342 <include>*.properties</include>
343 <include>*.props</include>
344 <include>*.sql</include>
346 <filtering>true</filtering>
349 <directory>src/main/resources</directory>
351 <include>*.keyfile</include>
352 <include>*.jks</include>
353 <include>*.p12</include>
355 <filtering>false</filtering>
363 <goal>copy-resources</goal>
364 </goals><!-- here the phase you need -->
365 <phase>generate-resources</phase>
367 <outputDirectory>${basedir}/target/docker-stage/opt/onap/ccsdk/bin</outputDirectory>
370 <directory>src/main/resources</directory>
372 <include>*.sh</include>
374 <filtering>true</filtering>
382 <goal>copy-resources</goal>
383 </goals><!-- here the phase you need -->
384 <phase>package</phase>
386 <outputDirectory>${basedir}/target/docker-stage/opt/onap/ccsdk/lib</outputDirectory>
389 <directory>${basedir}/target</directory>
391 <include>${ccsdk.sliboot.jar}</include>
393 <filtering>false</filtering>
410 <groupId>org.apache.maven.plugins</groupId>
411 <artifactId>maven-failsafe-plugin</artifactId>
415 <goal>integration-test</goal>
421 <skipITs>false</skipITs>
422 <environmentVariables>
423 <SLIBOOT_PORT>${sliboot.port}</SLIBOOT_PORT>
424 </environmentVariables>
428 <groupId>io.fabric8</groupId>
429 <artifactId>docker-maven-plugin</artifactId>
430 <version>0.28.0</version>
431 <inherited>false</inherited>
435 <name>${image.name}</name>
437 <cleanup>try</cleanup>
438 <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
439 <dockerFile>Dockerfile</dockerFile>
441 <tag>${project.docker.latestminortag.version}</tag>
442 <tag>${project.docker.latestfulltag.version}</tag>
443 <tag>${project.docker.latesttagtimestamp.version}</tag>
451 <id>generate-images</id>
452 <phase>package</phase>
459 <id>start-it-instance</id>
460 <phase>pre-integration-test</phase>
467 <name>mariadb:10.5</name>
468 <alias>slibootdb</alias>
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>
479 <alias>dbhost</alias>
482 <port>slibootdb.port:3306</port>
485 <enabled>true</enabled>
490 <name>${image.name}:${project.docker.latesttagtimestamp.version}</name>
491 <alias>sliboot-container</alias>
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>
500 <container>slibootdb</container>
505 <alias>sliboot</alias>
508 <port>sliboot.port:8080</port>
511 <log>Started SlibootApp</log>
515 <enabled>true</enabled>
523 <id>stop-it-instance</id>
524 <phase>post-integration-test</phase>
531 <phase>${docker.push.phase}</phase>