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