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