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