Merge "CDS add Swagger annotations for Resource, Template, Dictionary and Config...
[ccsdk/cds.git] / ms / blueprintsprocessor / application / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3   ~  Copyright © 2017-2018 AT&T Intellectual Property.
4   ~
5   ~  Modifications Copyright © 2018 IBM.
6   ~  Modifications Copyright © 2019 Bell Canada.
7   ~
8   ~  Licensed under the Apache License, Version 2.0 (the "License");
9   ~  you may not use this file except in compliance with the License.
10   ~  You may obtain a copy of the License at
11   ~
12   ~      http://www.apache.org/licenses/LICENSE-2.0
13   ~
14   ~  Unless required by applicable law or agreed to in writing, software
15   ~  distributed under the License is distributed on an "AS IS" BASIS,
16   ~  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17   ~  See the License for the specific language governing permissions and
18   ~  limitations under the License.
19   -->
20
21 <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">
22     <modelVersion>4.0.0</modelVersion>
23
24     <parent>
25         <groupId>org.onap.ccsdk.cds.blueprintsprocessor</groupId>
26         <artifactId>blueprintsprocessor-parent</artifactId>
27         <version>1.1.0-SNAPSHOT</version>
28         <relativePath>../parent</relativePath>
29     </parent>
30
31     <artifactId>blueprintsprocessor-application</artifactId>
32     <packaging>jar</packaging>
33
34     <name>MS Blueprints Processor Application</name>
35
36     <properties>
37         <assembly.id>maven</assembly.id>
38         <name.space>org.onap.ccsdk.cds</name.space>
39         <serviceArtifactName>blueprintsprocessor</serviceArtifactName>
40         <image.name>onap/ccsdk-blueprintsprocessor</image.name>
41     </properties>
42
43     <dependencies>
44         <dependency>
45             <groupId>org.onap.ccsdk.cds.blueprintsprocessor.modules</groupId>
46             <artifactId>blueprint-core</artifactId>
47             <exclusions>
48                 <exclusion>
49                     <groupId>org.springframework.boot</groupId>
50                     <artifactId>spring-boot-starter-logging</artifactId>
51                 </exclusion>
52             </exclusions>
53         </dependency>
54         <dependency>
55             <groupId>org.springframework.boot</groupId>
56             <artifactId>spring-boot-starter-security</artifactId>
57             <exclusions>
58                 <exclusion>
59                     <groupId>org.springframework.boot</groupId>
60                     <artifactId>spring-boot-starter-logging</artifactId>
61                 </exclusion>
62             </exclusions>
63         </dependency>
64
65         <!-- Error Catalog Services -->
66         <dependency>
67             <groupId>org.onap.ccsdk.cds.error.catalog</groupId>
68             <artifactId>error-catalog-services</artifactId>
69         </dependency>
70
71         <!-- North Bound - Modules -->
72         <dependency>
73             <groupId>org.onap.ccsdk.cds.blueprintsprocessor.modules</groupId>
74             <artifactId>designer-api</artifactId>
75         </dependency>
76         <dependency>
77             <groupId>org.onap.ccsdk.cds.blueprintsprocessor.modules</groupId>
78             <artifactId>resource-api</artifactId>
79         </dependency>
80         <dependency>
81             <groupId>org.onap.ccsdk.cds.blueprintsprocessor.modules</groupId>
82             <artifactId>selfservice-api</artifactId>
83         </dependency>
84         <dependency>
85             <groupId>org.onap.ccsdk.cds.blueprintsprocessor.modules</groupId>
86             <artifactId>configs-api</artifactId>
87         </dependency>
88         <dependency>
89             <groupId>org.onap.ccsdk.cds.blueprintsprocessor.modules</groupId>
90             <artifactId>health-api</artifactId>
91         </dependency>
92         <dependency>
93             <groupId>org.onap.ccsdk.cds.blueprintsprocessor.modules</groupId>
94             <artifactId>health-api-common</artifactId>
95         </dependency>
96
97         <!-- Functions -->
98         <dependency>
99             <groupId>org.onap.ccsdk.cds.blueprintsprocessor.functions</groupId>
100             <artifactId>python-executor</artifactId>
101         </dependency>
102         <dependency>
103             <groupId>org.onap.ccsdk.cds.blueprintsprocessor.functions</groupId>
104             <artifactId>restful-executor</artifactId>
105         </dependency>
106         <dependency>
107             <groupId>org.onap.ccsdk.cds.blueprintsprocessor.functions</groupId>
108             <artifactId>ansible-awx-executor</artifactId>
109         </dependency>
110         <dependency>
111             <groupId>org.onap.ccsdk.cds.blueprintsprocessor.functions</groupId>
112             <artifactId>netconf-executor</artifactId>
113         </dependency>
114         <dependency>
115             <groupId>org.onap.ccsdk.cds.blueprintsprocessor.functions</groupId>
116             <artifactId>restconf-executor</artifactId>
117         </dependency>
118         <dependency>
119             <groupId>org.onap.ccsdk.cds.blueprintsprocessor.functions</groupId>
120             <artifactId>cli-executor</artifactId>
121         </dependency>
122         <dependency>
123             <groupId>org.onap.ccsdk.cds.blueprintsprocessor.functions</groupId>
124             <artifactId>config-snapshots</artifactId>
125         </dependency>
126         <dependency>
127             <groupId>org.onap.ccsdk.cds.blueprintsprocessor.functions</groupId>
128             <artifactId>k8s-profile-upload</artifactId>
129         </dependency>
130
131         <!-- Test Dependencies -->
132         <dependency>
133             <groupId>com.h2database</groupId>
134             <artifactId>h2</artifactId>
135         </dependency>
136         <dependency>
137             <groupId>org.powermock</groupId>
138             <artifactId>powermock-api-mockito2</artifactId>
139             <scope>test</scope>
140         </dependency>
141         <dependency>
142             <groupId>org.springframework.boot</groupId>
143             <artifactId>spring-boot-starter-test</artifactId>
144             <scope>test</scope>
145         </dependency>
146         <dependency>
147             <groupId>org.jetbrains.kotlin</groupId>
148             <artifactId>kotlin-test-junit</artifactId>
149             <scope>test</scope>
150         </dependency>
151         <dependency>
152             <groupId>io.projectreactor</groupId>
153             <artifactId>reactor-test</artifactId>
154             <scope>test</scope>
155         </dependency>
156
157         <!-- BEGIN UAT -->
158         <dependency>
159             <groupId>org.skyscreamer</groupId>
160             <artifactId>jsonassert</artifactId>
161         </dependency>
162         <dependency>
163             <groupId>org.yaml</groupId>
164             <artifactId>snakeyaml</artifactId>
165         </dependency>
166         <dependency>
167             <groupId>com.nhaarman.mockitokotlin2</groupId>
168             <artifactId>mockito-kotlin</artifactId>
169             <!-- It's unusual but 'compile' here is the right scope since mockito is being used at runtime by
170                  the UatServices (/api/v1/uat/spy and /api/v1/uat/verify endpoints) -->
171             <scope>compile</scope>
172         </dependency>
173         <dependency>
174             <groupId>com.schibsted.spt.data</groupId>
175             <artifactId>jslt</artifactId>
176         </dependency>
177         <dependency>
178             <groupId>org.apache.httpcomponents</groupId>
179             <artifactId>httpclient</artifactId>
180             <version>${apache.httpcomponents.client.version}</version>
181         </dependency>
182         <dependency>
183             <groupId>org.apache.httpcomponents</groupId>
184             <artifactId>httpmime</artifactId>
185             <version>${apache.httpcomponents.client.version}</version>
186         </dependency>
187         <dependency>
188             <groupId>com.github.tomakehurst</groupId>
189             <artifactId>wiremock-jre8</artifactId>
190             <version>2.25.0</version>
191             <scope>test</scope>
192         </dependency>
193         <!-- END UAT -->
194         <dependency>
195             <groupId>ch.qos.logback</groupId>
196             <artifactId>logback-classic</artifactId>
197         </dependency>
198     </dependencies>
199
200     <build>
201         <resources>
202             <resource>
203                 <!--config and resource files -->
204                 <directory>${basedir}/etc</directory>
205                 <targetPath>${basedir}/target/etc</targetPath>
206                 <filtering>true</filtering>
207                 <includes>
208                     <include>**/*</include>
209                 </includes>
210             </resource>
211             <resource>
212                 <!--config and resource files -->
213                 <directory>${basedir}/src/main/resources</directory>
214                 <targetPath>${basedir}/target/src/main/resources</targetPath>
215                 <filtering>true</filtering>
216                 <includes>
217                     <include>**/*</include>
218                 </includes>
219             </resource>
220             <resource>
221                 <directory>src/main/resources</directory>
222                 <includes>
223                     <include>**/*</include>
224                 </includes>
225                 <filtering>true</filtering>
226             </resource>
227         </resources>
228         <plugins>
229             <plugin>
230                 <groupId>org.apache.maven.plugins</groupId>
231                 <artifactId>maven-surefire-plugin</artifactId>
232                 <version>${maven-surefire-plugin.version}</version>
233                 <configuration>
234                     <!-- Sets the VM argument line used when unit tests are run. -->
235                     <argLine>-Xmx1024m -XX:MaxPermSize=256m ${surefireArgLine}</argLine>
236                     <!-- Excludes integration tests when unit tests are run. -->
237                     <excludes>
238                         <exclude>**/IT*.java</exclude>
239                     </excludes>
240                     <reuseForks>false</reuseForks>
241                     <forkCount>1</forkCount>
242                 </configuration>
243             </plugin>
244             <plugin>
245                 <artifactId>maven-resources-plugin</artifactId>
246                 <version>2.6</version>
247                 <executions>
248                     <execution>
249                         <id>copy-dockerfile</id>
250                         <goals>
251                             <goal>copy-resources</goal>
252                         </goals><!-- here the phase you need -->
253                         <phase>validate</phase>
254                         <configuration>
255                             <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
256                             <resources>
257                                 <resource>
258                                     <directory>src/main/docker</directory>
259                                     <includes>
260                                         <include>*</include>
261                                     </includes>
262                                     <filtering>true</filtering>
263                                 </resource>
264                             </resources>
265                         </configuration>
266                     </execution>
267                 </executions>
268             </plugin>
269             <plugin>
270                 <groupId>org.apache.maven.plugins</groupId>
271                 <artifactId>maven-antrun-plugin</artifactId>
272                 <executions>
273                     <execution>
274                         <id>ant-test</id>
275                         <phase>package</phase>
276                         <configuration>
277                             <tasks>
278                                 <fixcrlf srcdir="${basedir}" eol="unix" includes="**/*.sh, **/*.source"/>
279                             </tasks>
280                         </configuration>
281                         <goals>
282                             <goal>run</goal>
283                         </goals>
284                     </execution>
285                 </executions>
286             </plugin>
287             <plugin><!--build the final artifact for docker deployment -->
288                 <artifactId>maven-assembly-plugin</artifactId>
289                 <version>3.1.0</version>
290                 <configuration>
291                     <!-- <skipAssembly>${skip.assembly}</skipAssembly> -->
292                     <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
293                     <descriptors>
294                         <descriptor>src/main/docker/distribution.xml</descriptor>
295                     </descriptors>
296                     <tarLongFileMode>posix</tarLongFileMode>
297                 </configuration>
298                 <executions>
299                     <execution>
300                         <id>${assembly.id}</id>
301                         <phase>package</phase>
302                         <goals>
303                             <goal>single</goal>
304                         </goals>
305                     </execution>
306                 </executions>
307             </plugin>
308             <plugin>
309                 <groupId>org.codehaus.groovy.maven</groupId>
310                 <artifactId>gmaven-plugin</artifactId>
311                 <version>1.0</version>
312                 <executions>
313                     <execution>
314                         <phase>validate</phase>
315                         <goals>
316                             <goal>execute</goal>
317                         </goals>
318                         <configuration>
319                             <source>${basedir}/../../../TagVersion.groovy</source>
320                         </configuration>
321                     </execution>
322                 </executions>
323             </plugin>
324             <plugin>
325                 <groupId>pl.project13.maven</groupId>
326                 <artifactId>git-commit-id-plugin</artifactId>
327             </plugin>
328             <plugin>
329                 <groupId>com.github.kongchen</groupId>
330                 <artifactId>swagger-maven-plugin</artifactId>
331                 <version>3.1.8</version>
332                 <configuration>
333                     <apiSources>
334                         <apiSource>
335                             <springmvc>true</springmvc>
336                             <locations>
337                                 <location>org.onap.ccsdk.cds.blueprintsprocessor.designer.api.BlueprintModelController</location>
338                                 <location>org.onap.ccsdk.cds.blueprintsprocessor.resource.api</location>
339                                 <location>org.onap.ccsdk.cds.blueprintsprocessor.configs.api</location>
340                                 <!-- This location is not implemented yet
341                                 <location>org.onap.ccsdk.cds.blueprintsprocessor.healthapi</location>
342                                 -->
343                             </locations>
344                             <schemes>
345                                 <scheme>http</scheme>
346                             </schemes>
347                             <host>localhost:8080</host>
348                             <info>
349                                 <title>CDS Blueprint Processor API Reference</title>
350                                 <version>v1</version>
351                                 <description>
352                                     Shows all resources and endpoints which CDS BP processor currently provides with sample requests/responses, parameter description and other information.
353                                 </description>
354                                 <termsOfService>
355                                     https://www.onap.org/
356                                 </termsOfService>
357                                 <contact>
358                                     <email>onap-discuss@lists.onap.org</email>
359                                     <name>ONAP Community</name>
360                                     <url>https://www.onap.org/</url>
361                                 </contact>
362                                 <license>
363                                     <url>http://www.apache.org/licenses/LICENSE-2.0.html</url>
364                                     <name>Apache 2.0</name>
365                                 </license>
366                             </info>
367                             <securityDefinitions>
368                                 <securityDefinition>
369                                     <name>Basic Auth</name>
370                                     <type>basic</type>
371                                 </securityDefinition>
372                             </securityDefinitions>
373                             <outputFormats>json</outputFormats>
374                             <swaggerDirectory>${basedir}/../../../docs/api-reference/media</swaggerDirectory>
375                             <swaggerFileName>cds-bp-processor-api-swagger</swaggerFileName>
376                             <jsonExampleValues>true</jsonExampleValues>
377                             <operationIdFormat>{{className}}_{{methodName}}_{{httpMethod}}.{{packageName}}</operationIdFormat>
378                         </apiSource>
379                     </apiSources>
380                 </configuration>
381                 <executions>
382                     <execution>
383                         <phase>compile</phase>
384                         <goals>
385                             <goal>generate</goal>
386                         </goals>
387                     </execution>
388                 </executions>
389             </plugin>
390         </plugins>
391     </build>
392
393     <profiles>
394         <profile>
395             <id>docker</id>
396             <build>
397                 <plugins>
398                     <plugin>
399                         <groupId>io.fabric8</groupId>
400                         <artifactId>docker-maven-plugin</artifactId>
401                         <version>0.34.0</version>
402                         <inherited>false</inherited>
403                         <configuration>
404                             <images>
405                                 <image>
406                                     <name>${image.name}</name>
407                                     <build>
408                                         <cleanup>try</cleanup>
409                                         <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
410                                         <tags>
411                                             <tag>${project.docker.latestminortag.version}</tag>
412                                             <tag>${project.docker.latestfulltag.version}</tag>
413                                             <tag>${project.docker.latesttagtimestamp.version}</tag>
414                                         </tags>
415                                     </build>
416                                 </image>
417                             </images>
418                             <verbose>${docker.verbose}</verbose>
419                             <skipPush>${docker.skip.push}</skipPush>
420                         </configuration>
421                         <executions>
422                             <execution>
423                                 <id>build-push-images</id>
424                                 <goals>
425                                     <goal>build</goal>
426                                     <goal>push</goal>
427                                 </goals>
428                             </execution>
429                         </executions>
430                     </plugin>
431                 </plugins>
432             </build>
433         </profile>
434     </profiles>
435 </project>