Merge "Initial/docs folder setup"
[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.2-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.version>${project.version}</image.version>
38         <jib-maven-plugin.version>2.6.0</jib-maven-plugin.version>
39         <minimum-coverage>0.0</minimum-coverage>
40         <nexus.repository>nexus3.onap.org:10003/onap/</nexus.repository>
41     </properties>
42
43     <dependencies>
44         <dependency>
45             <groupId>org.springframework.boot</groupId>
46             <artifactId>spring-boot-starter-web</artifactId>
47             <exclusions>
48                 <exclusion>
49                     <groupId>org.springframework.boot</groupId>
50                     <artifactId>spring-boot-starter-tomcat</artifactId>
51                 </exclusion>
52             </exclusions>
53         </dependency>
54         <dependency>
55             <groupId>org.springframework.boot</groupId>
56             <artifactId>spring-boot-starter-actuator</artifactId>
57         </dependency>
58         <dependency>
59             <groupId>org.springframework.cloud</groupId>
60             <artifactId>spring-cloud-starter-sleuth</artifactId>
61         </dependency>
62     </dependencies>
63
64     <build>
65         <pluginManagement>
66             <plugins>
67                 <plugin>
68                     <groupId>com.google.cloud.tools</groupId>
69                     <artifactId>jib-maven-plugin</artifactId>
70                     <version>${jib-maven-plugin.version}</version>
71                     <configuration>
72                         <container>
73                             <mainClass>${app}</mainClass>
74                             <creationTime>USE_CURRENT_TIMESTAMP</creationTime>
75                         </container>
76                         <from>
77                             <image>${base.image}</image>
78                         </from>
79                         <to>
80                             <tags>
81                                 <tag>latest</tag>
82                             </tags>
83                             <image>${nexus.repository}${image.name}:${image.version}</image>
84                         </to>
85                     </configuration>
86                     <executions>
87                         <execution>
88                             <phase>package</phase>
89                             <id>build</id>
90                             <goals>
91                                 <goal>dockerBuild</goal>
92                             </goals>
93                         </execution>
94                         <execution>
95                             <phase>deploy</phase>
96                             <id>buildAndPush</id>
97                             <goals>
98                                 <goal>build</goal>
99                             </goals>
100                         </execution>
101                     </executions>
102                 </plugin>
103             </plugins>
104         </pluginManagement>
105         <plugins>
106             <plugin>
107                 <groupId>org.springframework.boot</groupId>
108                 <artifactId>spring-boot-maven-plugin</artifactId>
109             </plugin>
110         </plugins>
111     </build>
112     <profiles>
113         <profile>
114             <id>cps-docker</id>
115             <activation>
116                 <activeByDefault>false</activeByDefault>
117             </activation>
118
119             <properties>
120                 <image.name>cps-service</image.name>
121             </properties>
122             <dependencies>
123                 <dependency>
124                     <groupId>${project.groupId}</groupId>
125                     <artifactId>cps-rest</artifactId>
126                 </dependency>
127             </dependencies>
128             <build>
129                 <plugins>
130                     <plugin>
131                         <groupId>com.google.cloud.tools</groupId>
132                         <artifactId>jib-maven-plugin</artifactId>
133                     </plugin>
134                 </plugins>
135             </build>
136         </profile>
137         <profile>
138             <id>xnf-docker</id>
139             <activation>
140                 <activeByDefault>false</activeByDefault>
141             </activation>
142
143             <properties>
144                 <image.name>cps-nf-proxy</image.name>
145             </properties>
146
147             <dependencies>
148                 <dependency>
149                     <groupId>${project.groupId}</groupId>
150                     <artifactId>cps-nf-proxy-rest</artifactId>
151                 </dependency>
152             </dependencies>
153             <build>
154                 <plugins>
155                     <plugin>
156                         <groupId>com.google.cloud.tools</groupId>
157                         <artifactId>jib-maven-plugin</artifactId>
158                     </plugin>
159                 </plugins>
160             </build>
161         </profile>
162         <profile>
163             <id>cps-xnf-docker</id>
164             <activation>
165                 <activeByDefault>true</activeByDefault>
166             </activation>
167
168             <properties>
169                 <image.name>cps-and-nf-proxy</image.name>
170             </properties>
171
172             <dependencies>
173                 <dependency>
174                     <groupId>${project.groupId}</groupId>
175                     <artifactId>cps-rest</artifactId>
176                 </dependency>
177                 <dependency>
178                     <groupId>${project.groupId}</groupId>
179                     <artifactId>cps-nf-proxy-rest</artifactId>
180                 </dependency>
181             </dependencies>
182             <build>
183                 <plugins>
184                     <plugin>
185                         <groupId>com.google.cloud.tools</groupId>
186                         <artifactId>jib-maven-plugin</artifactId>
187                     </plugin>
188                 </plugins>
189             </build>
190         </profile>
191     </profiles>
192 </project>