475e990e09978e0512b9c77a105a413b958927be
[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.1.0-SNAPSHOT</version>
9         <relativePath/>
10     </parent>
11
12     <groupId>org.onap.ccsdk.apps</groupId>
13     <artifactId>sliboot</artifactId>
14     <version>1.1.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         <shiro.version>1.5.0</shiro.version>
22         <aaf-shiro-bundle.version>2.1.13</aaf-shiro-bundle.version>
23         <base.image.name>onap/ccsdk-alpine-image</base.image.name>
24         <base.image.version>1.1-STAGING-latest</base.image.version>
25         <image.name>onap/ccsdk-sliboot-alpine-image</image.name>
26         <ccsdk.project.version>${project.version}</ccsdk.project.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     </properties>
33
34     <dependencies>
35         <dependency>
36             <groupId>io.swagger</groupId>
37             <artifactId>swagger-annotations</artifactId>
38         </dependency>
39         <dependency>
40             <groupId>org.apache.shiro</groupId>
41             <artifactId>shiro-spring-boot-web-starter</artifactId>
42             <version>${shiro.version}</version>
43             <exclusions>
44                 <exclusion>
45                     <groupId>org.springframework.boot</groupId>
46                     <artifactId>spring-boot-starter-logging</artifactId>
47                 </exclusion>
48             </exclusions>
49         </dependency>
50         <dependency>
51             <groupId>org.springframework.boot</groupId>
52             <artifactId>spring-boot-starter-log4j2</artifactId>
53         </dependency>
54         <dependency>
55             <groupId>org.springframework.boot</groupId>
56             <artifactId>spring-boot-starter-validation</artifactId>
57         </dependency>
58         <dependency>
59             <groupId>org.onap.aaf.cadi</groupId>
60             <artifactId>aaf-cadi-shiro</artifactId>
61             <version>${aaf-shiro-bundle.version}</version>
62         </dependency>
63
64         <dependency>
65             <groupId>org.springframework.boot</groupId>
66             <artifactId>spring-boot-starter-test</artifactId>
67             <scope>test</scope>
68         </dependency>
69         <dependency>
70             <groupId>org.springframework.boot</groupId>
71             <artifactId>spring-boot-starter-data-jpa</artifactId>
72         </dependency>
73         <dependency>
74             <groupId>io.springfox</groupId>
75             <artifactId>springfox-swagger2</artifactId>
76             <version>2.9.2</version>
77         </dependency>
78         <dependency>
79             <groupId>io.springfox</groupId>
80             <artifactId>springfox-swagger-ui</artifactId>
81             <version>2.9.2</version>
82         </dependency>
83         <dependency>
84             <groupId>${project.groupId}</groupId>
85             <artifactId>services</artifactId>
86             <version>${project.version}</version>
87         </dependency>
88         <dependency>
89             <groupId>org.onap.ccsdk.sli.core</groupId>
90             <artifactId>dblib-provider</artifactId>
91             <version>${ccsdk.sli.core.version}</version>
92         </dependency>
93         <dependency>
94             <groupId>org.onap.ccsdk.sli.core</groupId>
95             <artifactId>sli-common</artifactId>
96             <version>${ccsdk.sli.core.version}</version>
97         </dependency>
98         <dependency>
99             <groupId>org.onap.ccsdk.sli.core</groupId>
100             <artifactId>sli-provider-base</artifactId>
101             <version>${ccsdk.sli.core.version}</version>
102         </dependency>
103         <dependency>
104             <groupId>com.google.code.gson</groupId>
105             <artifactId>gson</artifactId>
106         </dependency>
107         <dependency>
108             <groupId>org.apache.derby</groupId>
109             <artifactId>derby</artifactId>
110             <scope>test</scope>
111         </dependency>
112         <dependency>
113             <groupId>org.mariadb.jdbc</groupId>
114             <artifactId>mariadb-java-client</artifactId>
115         </dependency>
116         <dependency>
117             <groupId>junit</groupId>
118             <artifactId>junit</artifactId>
119             <scope>test</scope>
120         </dependency>
121         <dependency>
122             <groupId>org.onap.logging-analytics</groupId>
123             <artifactId>logging-filter-spring</artifactId>
124             <version>1.6.6</version>
125         </dependency>
126         <dependency>
127             <groupId>javax.ws.rs</groupId>
128             <artifactId>javax.ws.rs-api</artifactId>
129         </dependency>
130         <dependency>
131             <groupId>org.onap.ccsdk.sli.core</groupId>
132             <artifactId>sliPluginUtils-provider</artifactId>
133             <version>${ccsdk.sli.core.version}</version>
134         </dependency>
135         <dependency>
136             <groupId>org.onap.ccsdk.sli.plugins</groupId>
137             <artifactId>restapi-call-node-provider</artifactId>
138             <version>${ccsdk.sli.plugins.version}</version>
139         </dependency>
140         <dependency>
141             <groupId>org.onap.ccsdk.sli.plugins</groupId>
142             <artifactId>properties-node-provider</artifactId>
143             <version>${ccsdk.sli.plugins.version}</version>
144         </dependency>
145         <!-- this jersey jar is needed for rest api call node to function properly -->
146         <dependency>
147             <groupId>org.glassfish.jersey.inject</groupId>
148             <artifactId>jersey-hk2</artifactId>
149         </dependency>
150     </dependencies>
151
152     <build>
153         <plugins>
154             <plugin>
155                 <groupId>org.codehaus.groovy.maven</groupId>
156                 <artifactId>gmaven-plugin</artifactId>
157                 <executions>
158                     <execution>
159                         <phase>validate</phase>
160                         <goals>
161                             <goal>execute</goal>
162                         </goals>
163                         <configuration>
164                             <source>${basedir}/TagVersion.groovy</source>
165                         </configuration>
166                     </execution>
167                 </executions>
168             </plugin>
169
170             <plugin>
171                 <groupId>org.apache.maven.plugins</groupId>
172                 <artifactId>maven-dependency-plugin</artifactId>
173                 <version>2.10</version>
174
175                 <executions>
176                     <execution>
177                         <id>get-sliapi-yaml</id>
178                         <phase>initialize</phase>
179                         <goals>
180                             <goal>copy</goal>
181                         </goals>
182                         <configuration>
183                             <artifactItems>
184                                 <artifactItem>
185                                     <groupId>org.onap.ccsdk.sli.core</groupId>
186                                     <artifactId>sliapi-model-swagger</artifactId>
187                                     <version>${ccsdk.sli.core.version}</version>
188                                     <type>yaml</type>
189                                     <outputDirectory>${project.build.directory}/yaml</outputDirectory>
190                                     <destFileName>sliapi.yaml</destFileName>
191                                 </artifactItem>
192                             </artifactItems>
193                         </configuration>
194                     </execution>
195                 </executions>
196             </plugin>
197             <plugin>
198                 <groupId>io.swagger</groupId>
199                 <artifactId>swagger-codegen-maven-plugin</artifactId>
200                 <version>2.3.1</version>
201                 <executions>
202                     <execution>
203                         <goals>
204                             <goal>generate</goal>
205                         </goals>
206                         <configuration>
207                             <output>target/generated-sources</output>
208                             <inputSpec>${project.build.directory}/yaml/sliapi.yaml</inputSpec>
209                             <language>spring</language>
210                             <apiPackage>org.onap.ccsdk.apps.ms.sliboot.swagger</apiPackage>
211                             <modelPackage>org.onap.ccsdk.apps.ms.sliboot.swagger.model</modelPackage>
212                             <invokerPackage>org.onap.ccsdk.apps.ms.sliboot.swagger</invokerPackage>
213                             <generateApis>true</generateApis>
214                             <generateApiTests>true</generateApiTests>
215                             <ignoreFileOverride>${project.basedir}/.swagger-codegen-ignore</ignoreFileOverride>
216                             <withXml>true</withXml>
217                             <templateDirectory>${project.basedir}/src/main/templates</templateDirectory>
218                             <configOptions>
219                                 <java8>true</java8>
220                                 <springBootVersion>2.2.4-RELEASE</springBootVersion>
221                             </configOptions>
222                         </configuration>
223                     </execution>
224                 </executions>
225             </plugin>
226             <plugin>
227                 <groupId>org.springframework.boot</groupId>
228                 <artifactId>spring-boot-maven-plugin</artifactId>
229                 <configuration>
230                     <classifier>exec</classifier>
231                 </configuration>
232                 <executions>
233                     <execution>
234                         <goals>
235                             <goal>repackage</goal>
236                         </goals>
237                     </execution>
238                 </executions>
239             </plugin>
240
241         </plugins>
242     </build>
243
244     <profiles>
245         <profile>
246             <id>docker</id>
247             <build>
248                 <plugins>
249                     <plugin>
250                         <groupId>org.apache.maven.plugins</groupId>
251                         <artifactId>maven-dependency-plugin</artifactId>
252                         <version>2.10</version>
253
254                         <executions>
255                             <execution>
256                                 <id>copy-dependencies</id>
257                                 <goals>
258                                     <goal>copy-dependencies</goal>
259                                 </goals>
260                                 <phase>prepare-package</phase>
261                                 <configuration>
262                                     <excludeTransitive>true</excludeTransitive>
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>${project.version}</version>
285                                             <type>zip</type>
286                                         </artifactItem>
287                                     </artifactItems>
288                                 </configuration>
289                             </execution>
290                         </executions>
291                     </plugin>
292                     <plugin>
293                         <artifactId>maven-resources-plugin</artifactId>
294                         <version>2.6</version>
295                         <executions>
296                             <execution>
297                                 <id>copy-dockerfile</id>
298                                 <goals>
299                                     <goal>copy-resources</goal>
300                                 </goals><!-- here the phase you need -->
301                                 <phase>initialize</phase>
302                                 <configuration>
303                                     <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
304                                     <resources>
305                                         <resource>
306                                             <directory>src/main/docker</directory>
307                                             <includes>
308                                                 <include>Dockerfile</include>
309                                             </includes>
310                                             <filtering>true</filtering>
311                                         </resource>
312                                     </resources>
313                                 </configuration>
314                             </execution>
315                             <execution>
316                                 <id>copy-config</id>
317                                 <goals>
318                                     <goal>copy-resources</goal>
319                                 </goals><!-- here the phase you need -->
320                                 <phase>generate-resources</phase>
321                                 <configuration>
322                                     <outputDirectory>${basedir}/target/docker-stage/opt/onap/ccsdk/config</outputDirectory>
323                                     <resources>
324                                         <resource>
325                                             <directory>src/main/resources</directory>
326                                             <includes>
327                                                 <include>*.properties</include>
328                                                 <include>*.props</include>
329                                                 <include>*.sql</include>
330                                             </includes>
331                                             <filtering>true</filtering>
332                                         </resource>
333                                         <resource>
334                                             <directory>src/main/resources</directory>
335                                             <includes>
336                                                 <include>*.keyfile</include>
337                                                 <include>*.jks</include>
338                                                 <include>*.p12</include>
339                                             </includes>
340                                             <filtering>false</filtering>
341                                         </resource>
342                                     </resources>
343                                 </configuration>
344                             </execution>
345                             <execution>
346                                 <id>copy-script</id>
347                                 <goals>
348                                     <goal>copy-resources</goal>
349                                 </goals><!-- here the phase you need -->
350                                 <phase>generate-resources</phase>
351                                 <configuration>
352                                     <outputDirectory>${basedir}/target/docker-stage/opt/onap/ccsdk/bin</outputDirectory>
353                                     <resources>
354                                         <resource>
355                                             <directory>src/main/resources</directory>
356                                             <includes>
357                                                 <include>*.sh</include>
358                                             </includes>
359                                             <filtering>true</filtering>
360                                         </resource>
361                                     </resources>
362                                 </configuration>
363                             </execution>
364                             <execution>
365                                 <id>copy-jar</id>
366                                 <goals>
367                                     <goal>copy-resources</goal>
368                                 </goals><!-- here the phase you need -->
369                                 <phase>package</phase>
370                                 <configuration>
371                                     <outputDirectory>${basedir}/target/docker-stage/opt/onap/ccsdk/lib</outputDirectory>
372                                     <resources>
373                                         <resource>
374                                             <directory>${basedir}/target</directory>
375                                             <includes>
376                                                 <include>${ccsdk.sliboot.jar}</include>
377                                             </includes>
378                                             <filtering>false</filtering>
379                                         </resource>
380                                     </resources>
381                                 </configuration>
382                             </execution>
383                         </executions>
384                     </plugin>
385                     <plugin>
386                         <groupId>io.fabric8</groupId>
387                         <artifactId>docker-maven-plugin</artifactId>
388                         <version>0.28.0</version>
389                         <inherited>false</inherited>
390                         <configuration>
391                             <images>
392                                 <image>
393                                     <name>${image.name}</name>
394                                     <build>
395                                         <cleanup>try</cleanup>
396                                         <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
397                                         <dockerFile>Dockerfile</dockerFile>
398                                         <tags>
399                                             <tag>${project.docker.latestminortag.version}</tag>
400                                             <tag>${project.docker.latestfulltag.version}</tag>
401                                             <tag>${project.docker.latesttagtimestamp.version}</tag>
402                                         </tags>
403                                     </build>
404                                 </image>
405                             </images>
406                         </configuration>
407                         <executions>
408                             <execution>
409                                 <id>generate-images</id>
410                                 <phase>package</phase>
411                                 <goals>
412                                     <goal>build</goal>
413                                 </goals>
414                             </execution>
415
416                             <execution>
417                                 <id>push-images</id>
418                                 <phase>${docker.push.phase}</phase>
419                                 <goals>
420                                     <goal>build</goal>
421                                     <goal>push</goal>
422                                 </goals>
423                             </execution>
424                         </executions>
425                     </plugin>
426                 </plugins>
427             </build>
428         </profile>
429     </profiles>
430 </project>