Introduce CPS integration testing (CSIT)
[cps.git] / cps-application / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3   ============LICENSE_START=======================================================
4   Copyright (c) 2021 Pantheon.tech.
5   Modifications Copyright (C) 2021 Bell Canada.
6   ================================================================================
7   Licensed under the Apache License, Version 2.0 (the "License");
8   you may not use this file except in compliance with the License.
9   You may obtain a copy of the License at
10
11         http://www.apache.org/licenses/LICENSE-2.0
12
13   Unless required by applicable law or agreed to in writing, software
14   distributed under the License is distributed on an "AS IS" BASIS,
15   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16   See the License for the specific language governing permissions and
17   limitations under the License.
18   ============LICENSE_END=========================================================
19 -->
20
21 <project xmlns="http://maven.apache.org/POM/4.0.0"
22          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
23          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
24     <modelVersion>4.0.0</modelVersion>
25
26     <parent>
27         <groupId>org.onap.cps</groupId>
28         <artifactId>cps-parent</artifactId>
29         <version>0.0.1-SNAPSHOT</version>
30         <relativePath>../cps-parent/pom.xml</relativePath>
31     </parent>
32
33     <artifactId>cps-application</artifactId>
34
35     <properties>
36         <app>org.onap.cps.Application</app>
37         <image.name>cps-service</image.name>
38         <image.version>${project.version}</image.version>
39         <jib-maven-plugin.version>2.6.0</jib-maven-plugin.version>
40         <minimum-coverage>0.0</minimum-coverage>
41         <nexus.repository>nexus3.onap.org:10003/onap/</nexus.repository>
42     </properties>
43
44     <dependencies>
45         <dependency>
46             <groupId>org.springframework.boot</groupId>
47             <artifactId>spring-boot-starter-web</artifactId>
48             <exclusions>
49                 <exclusion>
50                     <groupId>org.springframework.boot</groupId>
51                     <artifactId>spring-boot-starter-tomcat</artifactId>
52                 </exclusion>
53             </exclusions>
54         </dependency>
55         <dependency>
56             <groupId>org.springframework.boot</groupId>
57             <artifactId>spring-boot-starter-actuator</artifactId>
58         </dependency>
59         <dependency>
60             <groupId>org.springframework.cloud</groupId>
61             <artifactId>spring-cloud-starter-sleuth</artifactId>
62         </dependency>
63     </dependencies>
64
65     <build>
66         <pluginManagement>
67             <plugins>
68                 <plugin>
69                     <groupId>com.google.cloud.tools</groupId>
70                     <artifactId>jib-maven-plugin</artifactId>
71                     <version>${jib-maven-plugin.version}</version>
72                     <configuration>
73                         <container>
74                             <mainClass>${app}</mainClass>
75                             <creationTime>USE_CURRENT_TIMESTAMP</creationTime>
76                         </container>
77                         <from>
78                             <image>${base.image}</image>
79                         </from>
80                         <to>
81                             <tags>
82                                 <tag>latest</tag>
83                             </tags>
84                             <image>${nexus.repository}${image.name}:${image.version}</image>
85                         </to>
86                     </configuration>
87                     <executions>
88                         <execution>
89                             <phase>package</phase>
90                             <id>build</id>
91                             <goals>
92                                 <goal>dockerBuild</goal>
93                             </goals>
94                         </execution>
95                         <execution>
96                             <phase>deploy</phase>
97                             <id>buildAndPush</id>
98                             <goals>
99                                 <goal>build</goal>
100                             </goals>
101                         </execution>
102                     </executions>
103                 </plugin>
104             </plugins>
105         </pluginManagement>
106         <plugins>
107             <plugin>
108                 <groupId>org.springframework.boot</groupId>
109                 <artifactId>spring-boot-maven-plugin</artifactId>
110             </plugin>
111             <plugin>
112                 <groupId>com.google.cloud.tools</groupId>
113                 <artifactId>jib-maven-plugin</artifactId>
114             </plugin>
115         </plugins>
116     </build>
117     <profiles>
118         <profile>
119             <id>cps-docker</id>
120             <activation>
121                 <activeByDefault>false</activeByDefault>
122             </activation>
123             <dependencies>
124                 <dependency>
125                     <groupId>${project.groupId}</groupId>
126                     <artifactId>cps-rest</artifactId>
127                 </dependency>
128             </dependencies>
129         </profile>
130         <profile>
131             <id>xnf-docker</id>
132             <activation>
133                 <activeByDefault>false</activeByDefault>
134             </activation>
135
136             <properties>
137                 <image.name>cps-nf-proxy</image.name>
138             </properties>
139
140             <dependencies>
141                 <dependency>
142                     <groupId>${project.groupId}</groupId>
143                     <artifactId>cps-nf-proxy-rest</artifactId>
144                 </dependency>
145             </dependencies>
146         </profile>
147         <profile>
148             <id>cps-xnf-docker</id>
149             <activation>
150                 <activeByDefault>false</activeByDefault>
151             </activation>
152
153             <properties>
154                 <image.name>cps-and-nf-proxy</image.name>
155             </properties>
156
157             <dependencies>
158                 <dependency>
159                     <groupId>${project.groupId}</groupId>
160                     <artifactId>cps-rest</artifactId>
161                 </dependency>
162                 <dependency>
163                     <groupId>${project.groupId}</groupId>
164                     <artifactId>cps-nf-proxy-rest</artifactId>
165                 </dependency>
166             </dependencies>
167         </profile>
168     </profiles>
169 </project>