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