15868b15968a04746432d338b2e4bcf78958c94c
[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   Modifications Copyright (C) 2021-2023 Nordix Foundation
7   Modifications Copyright (C) 2022 Deutsche Telekom AG
8   ================================================================================
9   Licensed under the Apache License, Version 2.0 (the "License");
10   you may not use this file except in compliance with the License.
11   You may obtain a copy of the License at
12
13         http://www.apache.org/licenses/LICENSE-2.0
14
15   Unless required by applicable law or agreed to in writing, software
16   distributed under the License is distributed on an "AS IS" BASIS,
17   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18   See the License for the specific language governing permissions and
19   limitations under the License.
20   ============LICENSE_END=========================================================
21 -->
22
23 <project xmlns="http://maven.apache.org/POM/4.0.0"
24          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
25          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
26     <modelVersion>4.0.0</modelVersion>
27
28     <parent>
29         <groupId>org.onap.cps</groupId>
30         <artifactId>cps-parent</artifactId>
31         <version>3.3.7-SNAPSHOT</version>
32         <relativePath>../cps-parent/pom.xml</relativePath>
33     </parent>
34
35     <artifactId>cps-application</artifactId>
36
37     <properties>
38         <app>org.onap.cps.Application</app>
39         <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
40         <minimum-coverage>0.86</minimum-coverage>
41         <base.image>${docker.pull.registry}/onap/integration-java17:12.0.0</base.image>
42         <image.tag>${project.version}-${maven.build.timestamp}</image.tag>
43         <jakarta-servlet.version>5.0.0</jakarta-servlet.version>
44     </properties>
45
46     <dependencies>
47         <dependency>
48             <groupId>org.springframework.boot</groupId>
49             <artifactId>spring-boot-starter-web</artifactId>
50             <exclusions>
51                 <exclusion>
52                     <groupId>org.springframework.boot</groupId>
53                     <artifactId>spring-boot-starter-tomcat</artifactId>
54                 </exclusion>
55             </exclusions>
56         </dependency>
57         <dependency>
58             <groupId>org.springframework.boot</groupId>
59             <artifactId>spring-boot-starter-jetty</artifactId>
60         </dependency>
61         <dependency>
62             <groupId>org.springframework.boot</groupId>
63             <artifactId>spring-boot-starter-security</artifactId>
64         </dependency>
65         <dependency>
66             <groupId>org.springframework.boot</groupId>
67             <artifactId>spring-boot-starter-actuator</artifactId>
68         </dependency>
69         <dependency>
70             <groupId>io.micrometer</groupId>
71             <artifactId>micrometer-registry-prometheus</artifactId>
72         </dependency>
73         <dependency>
74             <groupId>io.micrometer</groupId>
75             <artifactId>micrometer-tracing-bridge-brave</artifactId>
76         </dependency>
77         <!-- T E S T   D E P E N D E N C I E S -->
78         <dependency>
79             <groupId>org.springframework.security</groupId>
80             <artifactId>spring-security-test</artifactId>
81             <scope>test</scope>
82         </dependency>
83         <dependency>
84             <groupId>org.codehaus.groovy</groupId>
85             <artifactId>groovy</artifactId>
86             <scope>test</scope>
87         </dependency>
88         <dependency>
89             <groupId>org.spockframework</groupId>
90             <artifactId>spock-core</artifactId>
91             <scope>test</scope>
92         </dependency>
93         <dependency>
94             <groupId>org.spockframework</groupId>
95             <artifactId>spock-spring</artifactId>
96             <scope>test</scope>
97         </dependency>
98         <dependency>
99             <groupId>cglib</groupId>
100             <artifactId>cglib-nodep</artifactId>
101             <scope>test</scope>
102         </dependency>
103         <dependency>
104             <groupId>org.springframework.boot</groupId>
105             <artifactId>spring-boot-starter-test</artifactId>
106             <scope>test</scope>
107             <exclusions>
108                 <exclusion>
109                     <groupId>org.junit.vintage</groupId>
110                     <artifactId>junit-vintage-engine</artifactId>
111                 </exclusion>
112             </exclusions>
113         </dependency>
114         <dependency>
115             <groupId>com.tngtech.archunit</groupId>
116             <artifactId>archunit-junit5</artifactId>
117         </dependency>
118         <dependency>
119             <groupId>com.fasterxml.jackson.dataformat</groupId>
120             <artifactId>jackson-dataformat-xml</artifactId>
121         </dependency>
122         <dependency>
123             <groupId>org.eclipse.jetty</groupId>
124             <artifactId>jetty-server</artifactId>
125         </dependency>
126         <dependency>
127             <groupId>jakarta.servlet</groupId>
128             <artifactId>jakarta.servlet-api</artifactId>
129         </dependency>
130     </dependencies>
131
132     <build>
133         <pluginManagement>
134             <plugins>
135                 <plugin>
136                     <groupId>com.google.cloud.tools</groupId>
137                     <artifactId>jib-maven-plugin</artifactId>
138                     <version>3.3.2</version>
139                     <configuration>
140                         <container>
141                             <mainClass>${app}</mainClass>
142                             <creationTime>USE_CURRENT_TIMESTAMP</creationTime>
143                         </container>
144                         <from>
145                             <image>${base.image}</image>
146                         </from>
147                         <to>
148                             <tags>
149                                 <tag>latest</tag>
150                             </tags>
151                             <image>${docker.push.registry}/onap/${image.name}:${image.tag}</image>
152                         </to>
153                     </configuration>
154                     <executions>
155                         <execution>
156                             <phase>package</phase>
157                             <id>build</id>
158                             <goals>
159                                 <goal>dockerBuild</goal>
160                             </goals>
161                         </execution>
162                         <execution>
163                             <phase>deploy</phase>
164                             <id>buildAndPush</id>
165                             <goals>
166                                 <goal>build</goal>
167                             </goals>
168                         </execution>
169                     </executions>
170                 </plugin>
171             </plugins>
172         </pluginManagement>
173         <plugins>
174             <plugin>
175                 <groupId>org.springframework.boot</groupId>
176                 <artifactId>spring-boot-maven-plugin</artifactId>
177             </plugin>
178         </plugins>
179     </build>
180     <profiles>
181         <profile>
182             <id>cps-docker</id>
183             <activation>
184                 <activeByDefault>false</activeByDefault>
185             </activation>
186
187             <properties>
188                 <image.name>cps-service</image.name>
189             </properties>
190             <dependencies>
191                 <dependency>
192                     <groupId>${project.groupId}</groupId>
193                     <artifactId>cps-rest</artifactId>
194                 </dependency>
195                 <dependency>
196                     <groupId>${project.groupId}</groupId>
197                     <artifactId>cps-ri</artifactId>
198                 </dependency>
199             </dependencies>
200             <build>
201                 <plugins>
202                     <plugin>
203                         <groupId>com.google.cloud.tools</groupId>
204                         <artifactId>jib-maven-plugin</artifactId>
205                     </plugin>
206                 </plugins>
207             </build>
208         </profile>
209         <profile>
210             <id>ncmp-docker</id>
211             <activation>
212                 <activeByDefault>false</activeByDefault>
213             </activation>
214
215             <properties>
216                 <image.name>cps-ncmp</image.name>
217             </properties>
218
219             <dependencies>
220                 <dependency>
221                     <groupId>${project.groupId}</groupId>
222                     <artifactId>cps-ncmp-rest</artifactId>
223                     <version>${project.version}</version>
224                 </dependency>
225                 <dependency>
226                     <groupId>${project.groupId}</groupId>
227                     <artifactId>cps-ri</artifactId>
228                 </dependency>
229             </dependencies>
230             <build>
231                 <plugins>
232                     <plugin>
233                         <groupId>com.google.cloud.tools</groupId>
234                         <artifactId>jib-maven-plugin</artifactId>
235                     </plugin>
236                 </plugins>
237             </build>
238         </profile>
239         <profile>
240             <id>cps-ncmp-docker</id>
241             <activation>
242                 <activeByDefault>true</activeByDefault>
243             </activation>
244
245             <properties>
246                 <image.name>cps-and-ncmp</image.name>
247             </properties>
248
249             <dependencies>
250                 <dependency>
251                     <groupId>${project.groupId}</groupId>
252                     <artifactId>cps-rest</artifactId>
253                 </dependency>
254                 <dependency>
255                     <groupId>${project.groupId}</groupId>
256                     <artifactId>cps-ncmp-rest</artifactId>
257                     <version>${project.version}</version>
258                 </dependency>
259                 <dependency>
260                     <groupId>${project.groupId}</groupId>
261                     <artifactId>cps-ri</artifactId>
262                 </dependency>
263             </dependencies>
264             <build>
265                 <plugins>
266                     <plugin>
267                         <groupId>com.google.cloud.tools</groupId>
268                         <artifactId>jib-maven-plugin</artifactId>
269                         <version>3.3.2</version>
270                     </plugin>
271                 </plugins>
272             </build>
273         </profile>
274     </profiles>
275 </project>