Merge "Fix cps-nf-proxy standalone assembly."
[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                 <dependency>
128                     <groupId>${project.groupId}</groupId>
129                     <artifactId>cps-ri</artifactId>
130                 </dependency>
131             </dependencies>
132             <build>
133                 <plugins>
134                     <plugin>
135                         <groupId>com.google.cloud.tools</groupId>
136                         <artifactId>jib-maven-plugin</artifactId>
137                     </plugin>
138                 </plugins>
139             </build>
140         </profile>
141         <profile>
142             <id>xnf-docker</id>
143             <activation>
144                 <activeByDefault>false</activeByDefault>
145             </activation>
146
147             <properties>
148                 <image.name>cps-nf-proxy</image.name>
149             </properties>
150
151             <dependencies>
152                 <dependency>
153                     <groupId>${project.groupId}</groupId>
154                     <artifactId>cps-nf-proxy-rest</artifactId>
155                 </dependency>
156                 <dependency>
157                     <groupId>${project.groupId}</groupId>
158                     <artifactId>cps-ri</artifactId>
159                 </dependency>
160             </dependencies>
161             <build>
162                 <plugins>
163                     <plugin>
164                         <groupId>com.google.cloud.tools</groupId>
165                         <artifactId>jib-maven-plugin</artifactId>
166                     </plugin>
167                 </plugins>
168             </build>
169         </profile>
170         <profile>
171             <id>cps-xnf-docker</id>
172             <activation>
173                 <activeByDefault>true</activeByDefault>
174             </activation>
175
176             <properties>
177                 <image.name>cps-and-nf-proxy</image.name>
178             </properties>
179
180             <dependencies>
181                 <dependency>
182                     <groupId>${project.groupId}</groupId>
183                     <artifactId>cps-rest</artifactId>
184                 </dependency>
185                 <dependency>
186                     <groupId>${project.groupId}</groupId>
187                     <artifactId>cps-nf-proxy-rest</artifactId>
188                 </dependency>
189                 <dependency>
190                     <groupId>${project.groupId}</groupId>
191                     <artifactId>cps-ri</artifactId>
192                 </dependency>
193             </dependencies>
194             <build>
195                 <plugins>
196                     <plugin>
197                         <groupId>com.google.cloud.tools</groupId>
198                         <artifactId>jib-maven-plugin</artifactId>
199                     </plugin>
200                 </plugins>
201             </build>
202         </profile>
203     </profiles>
204 </project>