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