Release 1.4.0 ccsdk/apps artifacts
[ccsdk/apps.git] / ms / sliboot / pom.xml
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>
4
5     <parent>
6         <groupId>org.onap.ccsdk.apps</groupId>
7         <artifactId>ccsdk-apps-ms</artifactId>
8         <version>1.4.1-SNAPSHOT</version>
9     </parent>
10
11     <groupId>org.onap.ccsdk.apps</groupId>
12     <artifactId>sliboot</artifactId>
13     <version>1.4.1-SNAPSHOT</version>
14     <packaging>jar</packaging>
15
16     <name>ccsdk-apps :: sliboot :: ${project.artifactId}</name>
17
18     <properties>
19         <start-class>org.onap.ccsdk.apps.ms.sliboot.SlibootApp</start-class>
20         <aaf.cadi.version>2.1.21</aaf.cadi.version>
21         <base.image.name>onap/ccsdk-alpine-j11-image</base.image.name>
22         <base.image.version>1.2.2</base.image.version>
23         <image.name>onap/ccsdk-sliboot-alpine-image</image.name>
24         <ccsdk.project.version>${project.version}</ccsdk.project.version>
25         <ccsdk.distribution.version>1.2.2</ccsdk.distribution.version>
26         <ccsdk.build.timestamp>${maven.build.timestamp}</ccsdk.build.timestamp>
27         <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
28         <ccsdk.sliboot.jar>${project.artifactId}-${project.version}-exec.jar</ccsdk.sliboot.jar>
29         <docker.push.phase>deploy</docker.push.phase>
30         <docker.verbose>true</docker.verbose>
31         <docker.autoCreateCustomNetworks>true</docker.autoCreateCustomNetworks>
32         <java.home>/opt/java/openjdk</java.home>
33         <java.security.dir>${java.home}/lib/security</java.security.dir>
34     </properties>
35
36     <dependencies>
37         <dependency>
38             <groupId>io.swagger</groupId>
39             <artifactId>swagger-annotations</artifactId>
40         </dependency>
41         <dependency>
42             <groupId>org.springframework.boot</groupId>
43             <artifactId>spring-boot-starter-web</artifactId>
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>
56             <groupId>org.springframework.boot</groupId>
57             <artifactId>spring-boot-starter-validation</artifactId>
58         </dependency>
59         <dependency>
60             <groupId>org.springframework.boot</groupId>
61             <artifactId>spring-boot-starter-test</artifactId>
62             <scope>test</scope>
63         </dependency>
64         <dependency>
65             <groupId>org.springframework.boot</groupId>
66             <artifactId>spring-boot-starter-data-jpa</artifactId>
67         </dependency>
68         <dependency>
69             <groupId>io.springfox</groupId>
70             <artifactId>springfox-boot-starter</artifactId>
71             <version>${springfox.version}</version>
72         </dependency>
73         <dependency>
74             <groupId>org.onap.aaf.authz</groupId>
75             <artifactId>aaf-cadi-client</artifactId>
76             <version>${aaf.cadi.version}</version>
77         </dependency>
78         <dependency>
79             <groupId>org.onap.aaf.authz</groupId>
80             <artifactId>aaf-cadi-core</artifactId>
81             <version>${aaf.cadi.version}</version>
82         </dependency>
83         <dependency>
84             <groupId>org.onap.aaf.authz</groupId>
85             <artifactId>aaf-auth-client</artifactId>
86             <version>${aaf.cadi.version}</version>
87             <scope>runtime</scope>
88         </dependency>
89         <dependency>
90             <groupId>org.onap.aaf.authz</groupId>
91             <artifactId>aaf-misc-env</artifactId>
92             <version>${aaf.cadi.version}</version>
93             <scope>runtime</scope>
94             <exclusions>
95                 <exclusion>
96                     <groupId>log4j</groupId>
97                     <artifactId>log4j</artifactId>
98                 </exclusion>
99             </exclusions>
100         </dependency>
101         <dependency>
102             <groupId>org.onap.aaf.authz</groupId>
103             <artifactId>aaf-misc-rosetta</artifactId>
104             <version>${aaf.cadi.version}</version>
105             <scope>runtime</scope>
106         </dependency>
107         <!-- Needed by logging-analytics payload logging filter -->
108         <dependency>
109             <groupId>org.apache.cxf</groupId>
110             <artifactId>cxf-spring-boot-starter-jaxrs</artifactId>
111             <version>3.4.4</version>
112         </dependency>
113         <dependency>
114             <groupId>org.onap.aaf.authz</groupId>
115             <artifactId>aaf-cadi-client</artifactId>
116             <version>${aaf.cadi.version}</version>
117         </dependency>
118         <dependency>
119             <groupId>org.onap.aaf.authz</groupId>
120             <artifactId>aaf-cadi-core</artifactId>
121             <version>${aaf.cadi.version}</version>
122         </dependency>
123         <dependency>
124             <groupId>org.onap.aaf.authz</groupId>
125             <artifactId>aaf-auth-client</artifactId>
126             <version>${aaf.cadi.version}</version>
127             <scope>runtime</scope>
128         </dependency>
129         <dependency>
130             <groupId>org.onap.aaf.authz</groupId>
131             <artifactId>aaf-misc-env</artifactId>
132             <version>${aaf.cadi.version}</version>
133             <scope>runtime</scope>
134         </dependency>
135         <dependency>
136             <groupId>org.onap.aaf.authz</groupId>
137             <artifactId>aaf-misc-rosetta</artifactId>
138             <version>${aaf.cadi.version}</version>
139             <scope>runtime</scope>
140         </dependency>
141         <dependency>
142             <groupId>${project.groupId}</groupId>
143             <artifactId>services</artifactId>
144             <version>${project.version}</version>
145         </dependency>
146         <dependency>
147             <groupId>org.onap.ccsdk.sli.core</groupId>
148             <artifactId>dblib-provider</artifactId>
149             <version>${ccsdk.sli.core.version}</version>
150         </dependency>
151         <dependency>
152             <groupId>org.onap.ccsdk.sli.core</groupId>
153             <artifactId>sli-common</artifactId>
154             <version>${ccsdk.sli.core.version}</version>
155         </dependency>
156         <dependency>
157             <groupId>org.onap.ccsdk.sli.core</groupId>
158             <artifactId>sli-provider-base</artifactId>
159             <version>${ccsdk.sli.core.version}</version>
160         </dependency>
161         <dependency>
162             <groupId>org.onap.ccsdk.sli.core</groupId>
163             <artifactId>sliapi-model-swagger</artifactId>
164             <version>${ccsdk.sli.core.version}</version>
165             <type>yaml</type>
166         </dependency>
167         <dependency>
168             <groupId>org.onap.ccsdk.sli.core</groupId>
169             <artifactId>sliPluginUtils-provider</artifactId>
170             <version>${ccsdk.sli.core.version}</version>
171         </dependency>
172         <dependency>
173             <groupId>org.onap.ccsdk.sli.plugins</groupId>
174             <artifactId>restapi-call-node-provider</artifactId>
175             <version>${ccsdk.sli.plugins.version}</version>
176         </dependency>
177         <dependency>
178             <groupId>org.onap.ccsdk.sli.plugins</groupId>
179             <artifactId>properties-node-provider</artifactId>
180             <version>${ccsdk.sli.plugins.version}</version>
181         </dependency>
182         <dependency>
183             <groupId>org.onap.logging-analytics</groupId>
184             <artifactId>logging-filter-spring</artifactId>
185             <version>1.6.6</version>
186         </dependency>
187         <dependency>
188             <groupId>com.google.code.gson</groupId>
189             <artifactId>gson</artifactId>
190         </dependency>
191         <dependency>
192             <groupId>org.apache.derby</groupId>
193             <artifactId>derby</artifactId>
194             <scope>test</scope>
195         </dependency>
196         <dependency>
197             <groupId>org.mariadb.jdbc</groupId>
198             <artifactId>mariadb-java-client</artifactId>
199         </dependency>
200         <dependency>
201             <groupId>junit</groupId>
202             <artifactId>junit</artifactId>
203             <scope>test</scope>
204         </dependency>
205         <dependency>
206             <groupId>javax.ws.rs</groupId>
207             <artifactId>javax.ws.rs-api</artifactId>
208         </dependency>
209         <!-- this jersey jar is needed for rest api call node to function properly -->
210         <dependency>
211             <groupId>org.glassfish.jersey.inject</groupId>
212             <artifactId>jersey-hk2</artifactId>
213         </dependency>
214     </dependencies>
215
216     <build>
217         <plugins>
218             <plugin>
219                 <groupId>org.codehaus.groovy.maven</groupId>
220                 <artifactId>gmaven-plugin</artifactId>
221                 <executions>
222                     <execution>
223                         <phase>validate</phase>
224                         <goals>
225                             <goal>execute</goal>
226                         </goals>
227                         <configuration>
228                             <source>${basedir}/TagVersion.groovy</source>
229                         </configuration>
230                     </execution>
231                 </executions>
232             </plugin>
233
234             <plugin>
235                 <groupId>org.apache.maven.plugins</groupId>
236                 <artifactId>maven-dependency-plugin</artifactId>
237                 <version>2.10</version>
238                 <executions>
239                     <execution>
240                         <id>copy-sliapi-model-swagger</id>
241                         <phase>initialize</phase>
242                         <goals>
243                             <goal>copy-dependencies</goal>
244                         </goals>
245                         <configuration>
246                             <outputDirectory>${project.build.directory}/yaml</outputDirectory>
247                             <useRepositoryLayout>false</useRepositoryLayout>
248                             <includeTypes>yaml</includeTypes>
249                             <stripVersion>true</stripVersion>
250                         </configuration>
251                     </execution>
252                     <execution>
253                         <id>copy-dependencies</id>
254                         <goals>
255                             <goal>copy-dependencies</goal>
256                         </goals>
257                         <phase>prepare-package</phase>
258                         <configuration>
259                             <excludeTransitive>true</excludeTransitive>
260                             <excludeTypes>yaml</excludeTypes>
261                             <outputDirectory>${project.build.directory}/docker-stage/opt/onap/ccsdk/lib</outputDirectory>
262                             <overWriteReleases>false</overWriteReleases>
263                             <overWriteSnapshots>true</overWriteSnapshots>
264                             <overWriteIfNewer>true</overWriteIfNewer>
265                             <useRepositoryLayout>false</useRepositoryLayout>
266                             <addParentPoms>false</addParentPoms>
267                             <copyPom>false</copyPom>
268                         </configuration>
269                     </execution>
270                     <execution>
271                         <id>unpack dgs</id>
272                         <phase>generate-sources</phase>
273                         <goals>
274                             <goal>unpack</goal>
275                         </goals>
276                         <configuration>
277                             <outputDirectory>${basedir}/target/docker-stage/opt/onap/ccsdk</outputDirectory>
278                             <artifactItems>
279                                 <artifactItem>
280                                     <groupId>org.onap.ccsdk.distribution</groupId>
281                                     <artifactId>platform-logic-installer</artifactId>
282                                     <version>${ccsdk.distribution.version}</version>
283                                     <type>zip</type>
284                                 </artifactItem>
285                             </artifactItems>
286                         </configuration>
287                     </execution>
288                 </executions>
289             </plugin>
290             <plugin>
291                 <groupId>io.swagger</groupId>
292                 <artifactId>swagger-codegen-maven-plugin</artifactId>
293                 <version>2.3.1</version>
294                 <executions>
295                     <execution>
296                         <phase>generate-sources</phase>
297                         <goals>
298                             <goal>generate</goal>
299                         </goals>
300                         <configuration>
301                             <output>target/generated-sources</output>
302                             <inputSpec>${project.build.directory}/yaml/sliapi-model-swagger.yaml</inputSpec>
303                             <language>spring</language>
304                             <apiPackage>org.onap.ccsdk.apps.ms.sliboot.swagger</apiPackage>
305                             <modelPackage>org.onap.ccsdk.apps.ms.sliboot.swagger.model</modelPackage>
306                             <invokerPackage>org.onap.ccsdk.apps.ms.sliboot.swagger</invokerPackage>
307                             <generateApis>true</generateApis>
308                             <generateApiTests>true</generateApiTests>
309                             <ignoreFileOverride>${project.basedir}/.swagger-codegen-ignore</ignoreFileOverride>
310                             <withXml>true</withXml>
311                             <templateDirectory>${project.basedir}/src/main/templates</templateDirectory>
312                             <configOptions>
313                                 <java8>true</java8>
314                                 <springBootVersion>2.2.4-RELEASE</springBootVersion>
315                             </configOptions>
316                         </configuration>
317                     </execution>
318                 </executions>
319             </plugin>
320             <plugin>
321                 <groupId>org.springframework.boot</groupId>
322                 <artifactId>spring-boot-maven-plugin</artifactId>
323                 <configuration>
324                     <classifier>exec</classifier>
325                 </configuration>
326                 <executions>
327                     <execution>
328                         <goals>
329                             <goal>repackage</goal>
330                         </goals>
331                     </execution>
332                 </executions>
333             </plugin>
334             <plugin>
335                 <groupId>org.apache.maven.plugins</groupId>
336                 <artifactId>maven-surefire-plugin</artifactId>
337                 <version>2.19.1</version>
338                 <configuration>
339                     <environmentVariables>
340                         <SDNC_CONFIG_DIR>${basedir}/src/test/resources</SDNC_CONFIG_DIR>
341                         <SVCLOGIC_PROPERTIES>${basedir}/src/test/resources/svclogic.properties</SVCLOGIC_PROPERTIES>
342                     </environmentVariables>
343                 </configuration>
344             </plugin>
345             <plugin>
346                 <groupId>org.apache.maven.plugins</groupId>
347                 <artifactId>maven-failsafe-plugin</artifactId>
348                 <executions>
349                     <execution>
350                         <goals>
351                             <goal>integration-test</goal>
352                             <goal>verify</goal>
353                         </goals>
354                     </execution>
355                 </executions>
356                 <configuration>
357                     <skipITs>true</skipITs>
358                 </configuration>
359             </plugin>
360             <plugin>
361                 <artifactId>maven-resources-plugin</artifactId>
362                 <version>2.6</version>
363                 <executions>
364                     <execution>
365                         <id>copy-dockerfile</id>
366                         <goals>
367                             <goal>copy-resources</goal>
368                         </goals><!-- here the phase you need -->
369                         <phase>initialize</phase>
370                         <configuration>
371                             <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
372                             <resources>
373                                 <resource>
374                                     <directory>src/main/docker</directory>
375                                     <includes>
376                                         <include>Dockerfile</include>
377                                     </includes>
378                                     <filtering>true</filtering>
379                                 </resource>
380                             </resources>
381                         </configuration>
382                     </execution>
383                     <execution>
384                         <id>copy-config</id>
385                         <goals>
386                             <goal>copy-resources</goal>
387                         </goals><!-- here the phase you need -->
388                         <phase>generate-resources</phase>
389                         <configuration>
390                             <outputDirectory>${basedir}/target/docker-stage/opt/onap/ccsdk/config</outputDirectory>
391                             <resources>
392                                 <resource>
393                                     <directory>src/main/resources</directory>
394                                     <includes>
395                                         <include>*.properties</include>
396                                         <include>*.props</include>
397                                         <include>*.sql</include>
398                                     </includes>
399                                     <filtering>true</filtering>
400                                 </resource>
401                                 <resource>
402                                     <directory>src/main/resources</directory>
403                                     <includes>
404                                         <include>*.keyfile</include>
405                                         <include>*.jks</include>
406                                         <include>*.p12</include>
407                                     </includes>
408                                     <filtering>false</filtering>
409                                 </resource>
410                             </resources>
411                         </configuration>
412                     </execution>
413                     <execution>
414                         <id>copy-script</id>
415                         <goals>
416                             <goal>copy-resources</goal>
417                         </goals><!-- here the phase you need -->
418                         <phase>generate-resources</phase>
419                         <configuration>
420                             <outputDirectory>${basedir}/target/docker-stage/opt/onap/ccsdk/bin</outputDirectory>
421                             <resources>
422                                 <resource>
423                                     <directory>src/main/resources</directory>
424                                     <includes>
425                                         <include>*.sh</include>
426                                     </includes>
427                                     <filtering>true</filtering>
428                                 </resource>
429                             </resources>
430                         </configuration>
431                     </execution>
432                     <execution>
433                         <id>copy-jar</id>
434                         <goals>
435                             <goal>copy-resources</goal>
436                         </goals><!-- here the phase you need -->
437                         <phase>package</phase>
438                         <configuration>
439                             <outputDirectory>${basedir}/target/docker-stage/opt/onap/ccsdk/lib</outputDirectory>
440                             <resources>
441                                 <resource>
442                                     <directory>${basedir}/target</directory>
443                                     <includes>
444                                         <include>${ccsdk.sliboot.jar}</include>
445                                     </includes>
446                                     <filtering>false</filtering>
447                                 </resource>
448                             </resources>
449                         </configuration>
450                     </execution>
451                 </executions>
452             </plugin>
453
454         </plugins>
455     </build>
456
457     <profiles>
458         <profile>
459             <id>docker</id>
460             <build>
461                 <plugins>
462                     <plugin>
463                         <groupId>org.apache.maven.plugins</groupId>
464                         <artifactId>maven-failsafe-plugin</artifactId>
465                         <executions>
466                             <execution>
467                                 <goals>
468                                     <goal>integration-test</goal>
469                                     <goal>verify</goal>
470                                 </goals>
471                             </execution>
472                         </executions>
473                         <configuration>
474                             <skipITs>false</skipITs>
475                             <environmentVariables>
476                                 <SLIBOOT_PORT>${sliboot.port}</SLIBOOT_PORT>
477                             </environmentVariables>
478                         </configuration>
479                     </plugin>
480                     <plugin>
481                         <groupId>io.fabric8</groupId>
482                         <artifactId>docker-maven-plugin</artifactId>
483                         <version>0.34.0</version>
484                         <inherited>false</inherited>
485                         <configuration>
486                             <images>
487                                 <image>
488                                     <name>${image.name}</name>
489                                     <build>
490                                         <cleanup>try</cleanup>
491                                         <noCache>true</noCache>
492                                         <contextDir>${basedir}/target/docker-stage</contextDir>
493                                         <dockerFile>Dockerfile</dockerFile>
494                                         <tags>
495                                             <tag>${project.docker.latestminortag.version}</tag>
496                                             <tag>${project.docker.latestfulltag.version}</tag>
497                                             <tag>${project.docker.latesttagtimestamp.version}</tag>
498                                         </tags>
499                                     </build>
500                                 </image>
501                             </images>
502                         </configuration>
503                         <executions>
504                             <execution>
505                                 <id>generate-images</id>
506                                 <phase>package</phase>
507                                 <goals>
508                                     <goal>build</goal>
509                                 </goals>
510                             </execution>
511                             <execution>
512                                 <id>start-it-instance</id>
513                                 <phase>pre-integration-test</phase>
514                                 <goals>
515                                     <goal>start</goal>
516                                 </goals>
517                                 <configuration>
518                                     <images>
519                                         <image>
520                                             <name>mariadb:latest</name>
521                                             <alias>slibootdb</alias>
522                                             <run>
523                                                 <env>
524                                                     <MYSQL_ROOT_PASSWORD>itsASecret</MYSQL_ROOT_PASSWORD>
525                                                     <MYSQL_USER>sli</MYSQL_USER>
526                                                     <MYSQL_PASSWORD>abc123</MYSQL_PASSWORD>
527                                                     <MYSQL_DATABASE>sdnctl</MYSQL_DATABASE>
528                                                 </env>
529                                                 <network>
530                                                     <mode>custom</mode>
531                                                     <name>onap</name>
532                                                     <alias>dbhost</alias>
533                                                 </network>
534                                                 <ports>
535                                                     <port>slibootdb.port:3306</port>
536                                                 </ports>
537                                                 <log>
538                                                     <enabled>true</enabled>
539                                                 </log>
540                                             </run>
541                                         </image>
542                                         <image>
543                                             <name>${image.name}:${project.docker.latesttagtimestamp.version}</name>
544                                             <alias>sliboot-container</alias>
545                                             <run>
546                                                 <env>
547                                                     <MYSQL_USER>sli</MYSQL_USER>
548                                                     <MYSQL_PASSWORD>abc123</MYSQL_PASSWORD>
549                                                     <MYSQL_DATABASE>sdnctl</MYSQL_DATABASE>
550                                                     <MYSQL_HOST>dbhost</MYSQL_HOST>
551                                                     <SDNC_CONFIG_DIR>/opt/onap/ccsdk/config</SDNC_CONFIG_DIR>
552                                                 </env>
553                                                 <dependsOn>
554                                                     <container>slibootdb</container>
555                                                 </dependsOn>
556                                                 <network>
557                                                     <mode>custom</mode>
558                                                     <name>onap</name>
559                                                     <alias>sliboot</alias>
560                                                 </network>
561                                                 <ports>
562                                                     <port>sliboot.port:8080</port>
563                                                 </ports>
564                                                 <wait>
565                                                     <log>Started SlibootApp</log>
566                                                     <time>120000</time>
567                                                 </wait>
568                                                 <log>
569                                                     <enabled>true</enabled>
570                                                 </log>
571                                             </run>
572                                         </image>
573                                     </images>
574                                 </configuration>
575                             </execution>
576                             <execution>
577                                 <id>stop-it-instance</id>
578                                 <phase>post-integration-test</phase>
579                                 <goals>
580                                     <goal>stop</goal>
581                                 </goals>
582                             </execution>
583                             <execution>
584                                 <id>push-images</id>
585                                 <goals>
586                                     <goal>push</goal>
587                                 </goals>
588                             </execution>
589                         </executions>
590                     </plugin>
591                 </plugins>
592             </build>
593         </profile>
594     </profiles>
595 </project>