fdfd7d157540901e814bb4a9ba821b7538275a07
[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.0.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         <docker.push.phase>deploy</docker.push.phase>
42         <docker.verbose>true</docker.verbose>
43         <ccsdk.build.timestamp>${maven.build.timestamp}</ccsdk.build.timestamp>
44     </properties>
45
46     <dependencies>
47         <dependency>
48             <groupId>org.onap.ccsdk.cds.blueprintsprocessor.modules</groupId>
49             <artifactId>blueprint-core</artifactId>
50             <exclusions>
51                 <exclusion>
52                     <groupId>org.springframework.boot</groupId>
53                     <artifactId>spring-boot-starter-logging</artifactId>
54                 </exclusion>
55             </exclusions>
56         </dependency>
57         <dependency>
58             <groupId>org.springframework.boot</groupId>
59             <artifactId>spring-boot-starter-security</artifactId>
60             <exclusions>
61                 <exclusion>
62                     <groupId>org.springframework.boot</groupId>
63                     <artifactId>spring-boot-starter-logging</artifactId>
64                 </exclusion>
65             </exclusions>
66         </dependency>
67
68         <!-- Error Catalog Services -->
69         <dependency>
70             <groupId>org.onap.ccsdk.cds.error.catalog</groupId>
71             <artifactId>error-catalog-services</artifactId>
72         </dependency>
73
74         <!-- North Bound - Modules -->
75         <dependency>
76             <groupId>org.onap.ccsdk.cds.blueprintsprocessor.modules</groupId>
77             <artifactId>designer-api</artifactId>
78         </dependency>
79         <dependency>
80             <groupId>org.onap.ccsdk.cds.blueprintsprocessor.modules</groupId>
81             <artifactId>resource-api</artifactId>
82         </dependency>
83         <dependency>
84             <groupId>org.onap.ccsdk.cds.blueprintsprocessor.modules</groupId>
85             <artifactId>selfservice-api</artifactId>
86         </dependency>
87         <dependency>
88             <groupId>org.onap.ccsdk.cds.blueprintsprocessor.modules</groupId>
89             <artifactId>configs-api</artifactId>
90         </dependency>
91         <dependency>
92             <groupId>org.onap.ccsdk.cds.blueprintsprocessor.modules</groupId>
93             <artifactId>health-api</artifactId>
94         </dependency>
95         <dependency>
96             <groupId>org.onap.ccsdk.cds.blueprintsprocessor.modules</groupId>
97             <artifactId>health-api-common</artifactId>
98         </dependency>
99
100         <!-- Functions -->
101         <dependency>
102             <groupId>org.onap.ccsdk.cds.blueprintsprocessor.functions</groupId>
103             <artifactId>python-executor</artifactId>
104         </dependency>
105         <dependency>
106             <groupId>org.onap.ccsdk.cds.blueprintsprocessor.functions</groupId>
107             <artifactId>restful-executor</artifactId>
108         </dependency>
109         <dependency>
110             <groupId>org.onap.ccsdk.cds.blueprintsprocessor.functions</groupId>
111             <artifactId>ansible-awx-executor</artifactId>
112         </dependency>
113         <dependency>
114             <groupId>org.onap.ccsdk.cds.blueprintsprocessor.functions</groupId>
115             <artifactId>netconf-executor</artifactId>
116         </dependency>
117         <dependency>
118             <groupId>org.onap.ccsdk.cds.blueprintsprocessor.functions</groupId>
119             <artifactId>restconf-executor</artifactId>
120         </dependency>
121         <dependency>
122             <groupId>org.onap.ccsdk.cds.blueprintsprocessor.functions</groupId>
123             <artifactId>cli-executor</artifactId>
124         </dependency>
125         <dependency>
126             <groupId>org.onap.ccsdk.cds.blueprintsprocessor.functions</groupId>
127             <artifactId>config-snapshots</artifactId>
128         </dependency>
129         <dependency>
130             <groupId>org.onap.ccsdk.cds.blueprintsprocessor.functions</groupId>
131             <artifactId>k8s-profile-upload</artifactId>
132         </dependency>
133
134         <!-- Test Dependencies -->
135         <dependency>
136             <groupId>com.h2database</groupId>
137             <artifactId>h2</artifactId>
138         </dependency>
139         <dependency>
140             <groupId>org.powermock</groupId>
141             <artifactId>powermock-api-mockito2</artifactId>
142             <scope>test</scope>
143         </dependency>
144         <dependency>
145             <groupId>org.springframework.boot</groupId>
146             <artifactId>spring-boot-starter-test</artifactId>
147             <scope>test</scope>
148         </dependency>
149         <dependency>
150             <groupId>org.jetbrains.kotlin</groupId>
151             <artifactId>kotlin-test-junit</artifactId>
152             <scope>test</scope>
153         </dependency>
154         <dependency>
155             <groupId>io.projectreactor</groupId>
156             <artifactId>reactor-test</artifactId>
157             <scope>test</scope>
158         </dependency>
159
160         <!-- BEGIN UAT -->
161         <dependency>
162             <groupId>org.skyscreamer</groupId>
163             <artifactId>jsonassert</artifactId>
164         </dependency>
165         <dependency>
166             <groupId>org.yaml</groupId>
167             <artifactId>snakeyaml</artifactId>
168         </dependency>
169         <dependency>
170             <groupId>com.nhaarman.mockitokotlin2</groupId>
171             <artifactId>mockito-kotlin</artifactId>
172             <!-- It's unusual but 'compile' here is the right scope since mockito is being used at runtime by
173                  the UatServices (/api/v1/uat/spy and /api/v1/uat/verify endpoints) -->
174             <scope>compile</scope>
175         </dependency>
176         <dependency>
177             <groupId>com.schibsted.spt.data</groupId>
178             <artifactId>jslt</artifactId>
179         </dependency>
180         <dependency>
181             <groupId>org.apache.httpcomponents</groupId>
182             <artifactId>httpclient</artifactId>
183             <version>${apache.httpcomponents.client.version}</version>
184         </dependency>
185         <dependency>
186             <groupId>org.apache.httpcomponents</groupId>
187             <artifactId>httpmime</artifactId>
188             <version>${apache.httpcomponents.client.version}</version>
189         </dependency>
190         <dependency>
191             <groupId>com.github.tomakehurst</groupId>
192             <artifactId>wiremock-jre8</artifactId>
193             <version>2.25.0</version>
194             <scope>test</scope>
195         </dependency>
196         <!-- END UAT -->
197         <dependency>
198             <groupId>ch.qos.logback</groupId>
199             <artifactId>logback-classic</artifactId>
200         </dependency>
201     </dependencies>
202
203     <build>
204         <resources>
205             <resource>
206                 <!--config and resource files -->
207                 <directory>${basedir}/etc</directory>
208                 <targetPath>${basedir}/target/etc</targetPath>
209                 <filtering>true</filtering>
210                 <includes>
211                     <include>**/*</include>
212                 </includes>
213             </resource>
214             <resource>
215                 <!--config and resource files -->
216                 <directory>${basedir}/src/main/resources</directory>
217                 <targetPath>${basedir}/target/src/main/resources</targetPath>
218                 <filtering>true</filtering>
219                 <includes>
220                     <include>**/*</include>
221                 </includes>
222             </resource>
223             <resource>
224                 <directory>src/main/resources</directory>
225                 <includes>
226                     <include>**/*</include>
227                 </includes>
228                 <filtering>true</filtering>
229             </resource>
230         </resources>
231         <plugins>
232             <plugin>
233                 <groupId>org.apache.maven.plugins</groupId>
234                 <artifactId>maven-surefire-plugin</artifactId>
235                 <version>${maven-surefire-plugin.version}</version>
236                 <configuration>
237                     <!-- Sets the VM argument line used when unit tests are run. -->
238                     <argLine>-Xmx1024m -XX:MaxPermSize=256m ${surefireArgLine}</argLine>
239                     <!-- Excludes integration tests when unit tests are run. -->
240                     <excludes>
241                         <exclude>**/IT*.java</exclude>
242                     </excludes>
243                     <reuseForks>false</reuseForks>
244                     <forkCount>1</forkCount>
245                 </configuration>
246             </plugin>
247             <plugin>
248                 <artifactId>maven-resources-plugin</artifactId>
249                 <version>2.6</version>
250                 <executions>
251                     <execution>
252                         <id>copy-dockerfile</id>
253                         <goals>
254                             <goal>copy-resources</goal>
255                         </goals><!-- here the phase you need -->
256                         <phase>validate</phase>
257                         <configuration>
258                             <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
259                             <resources>
260                                 <resource>
261                                     <directory>src/main/docker</directory>
262                                     <includes>
263                                         <include>*</include>
264                                     </includes>
265                                     <filtering>true</filtering>
266                                 </resource>
267                             </resources>
268                         </configuration>
269                     </execution>
270                 </executions>
271             </plugin>
272             <plugin>
273                 <groupId>org.apache.maven.plugins</groupId>
274                 <artifactId>maven-antrun-plugin</artifactId>
275                 <executions>
276                     <execution>
277                         <id>ant-test</id>
278                         <phase>package</phase>
279                         <configuration>
280                             <tasks>
281                                 <fixcrlf srcdir="${basedir}" eol="unix" includes="**/*.sh, **/*.source"/>
282                             </tasks>
283                         </configuration>
284                         <goals>
285                             <goal>run</goal>
286                         </goals>
287                     </execution>
288                 </executions>
289             </plugin>
290             <plugin><!--build the final artifact for docker deployment -->
291                 <artifactId>maven-assembly-plugin</artifactId>
292                 <version>3.1.0</version>
293                 <configuration>
294                     <!-- <skipAssembly>${skip.assembly}</skipAssembly> -->
295                     <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
296                     <descriptors>
297                         <descriptor>src/main/docker/distribution.xml</descriptor>
298                     </descriptors>
299                     <tarLongFileMode>posix</tarLongFileMode>
300                 </configuration>
301                 <executions>
302                     <execution>
303                         <id>${assembly.id}</id>
304                         <phase>package</phase>
305                         <goals>
306                             <goal>single</goal>
307                         </goals>
308                     </execution>
309                 </executions>
310             </plugin>
311             <plugin>
312                 <groupId>org.codehaus.groovy.maven</groupId>
313                 <artifactId>gmaven-plugin</artifactId>
314                 <version>1.0</version>
315                 <executions>
316                     <execution>
317                         <phase>validate</phase>
318                         <goals>
319                             <goal>execute</goal>
320                         </goals>
321                         <configuration>
322                             <source>${basedir}/../../../TagVersion.groovy</source>
323                         </configuration>
324                     </execution>
325                 </executions>
326             </plugin>
327             <plugin>
328                 <groupId>pl.project13.maven</groupId>
329                 <artifactId>git-commit-id-plugin</artifactId>
330             </plugin>
331         </plugins>
332     </build>
333
334     <profiles>
335         <profile>
336             <id>docker</id>
337             <build>
338                 <plugins>
339                     <plugin>
340                         <groupId>io.fabric8</groupId>
341                         <artifactId>docker-maven-plugin</artifactId>
342                         <version>0.26.1</version>
343                         <inherited>false</inherited>
344                         <configuration>
345                             <images>
346                                 <image>
347                                     <name>${image.name}</name>
348                                     <build>
349                                         <cleanup>try</cleanup>
350                                         <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
351                                         <tags>
352                                             <tag>${project.docker.latestminortag.version}</tag>
353                                             <tag>${project.docker.latestfulltag.version}</tag>
354                                             <tag>${project.docker.latesttagtimestamp.version}</tag>
355                                         </tags>
356                                     </build>
357                                 </image>
358                             </images>
359                             <verbose>true</verbose>
360                         </configuration>
361                         <executions>
362                             <execution>
363                                 <id>generate-images</id>
364                                 <phase>package</phase>
365                                 <goals>
366                                     <goal>build</goal>
367                                 </goals>
368                             </execution>
369                             <execution>
370                                 <id>push-images</id>
371                                 <phase>${docker.push.phase}</phase>
372                                 <goals>
373                                     <goal>build</goal>
374                                     <goal>push</goal>
375                                 </goals>
376                             </execution>
377                         </executions>
378                     </plugin>
379                 </plugins>
380             </build>
381         </profile>
382     </profiles>
383 </project>