Adds distributionManagement to main pom
[oom/platform/cert-service.git] / certService / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3     ================================================================================
4         Copyright (c) 2020 Nokia. All rights reserved.
5         ================================================================================
6         Licensed under the Apache License, Version 2.0 (the "License"); you may not
7         use this file except in compliance with the License. You may obtain a copy
8         of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required
9         by applicable law or agreed to in writing, software distributed under the
10         License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
11         OF ANY KIND, either express or implied. See the License for the specific
12         language governing permissions and limitations under the License.
13         ============LICENSE_END=========================================================
14 -->
15 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
16          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
17     <modelVersion>4.0.0</modelVersion>
18     <parent>
19         <groupId>org.onap.aaf</groupId>
20         <artifactId>aaf-certservice-parent</artifactId>
21         <version>0.0.1-SNAPSHOT</version>
22     </parent>
23
24     <artifactId>cert-service</artifactId>
25     <version>0.0.1-SNAPSHOT</version>
26     <name>cert-service</name>
27     <description>Certification service</description>
28     <packaging>jar</packaging>
29
30     <properties>
31         <java.version>11</java.version>
32         <assertj-core.version>3.11.1</assertj-core.version>
33         <mockito-core.version>3.2.4</mockito-core.version>
34         <spring-core.version>5.2.3.RELEASE</spring-core.version>
35         <spring-boot-starter.version>2.2.4.RELEASE</spring-boot-starter.version>
36         <maven-javadoc-plugin.version>3.0.1</maven-javadoc-plugin.version>
37         <maven-surefire-plugin.version>3.0.0-M1</maven-surefire-plugin.version>
38         <spring-boot-starter-actuator.version>2.2.4.RELEASE</spring-boot-starter-actuator.version>
39         <spring-boot-starter-log4j2.version>2.1.5.RELEASE</spring-boot-starter-log4j2.version>
40         <springdoc-openapi-ui.version>1.2.21</springdoc-openapi-ui.version>
41         <bouncycastle.version>1.60</bouncycastle.version>
42         <docker-maven-plugin.version>0.33.0</docker-maven-plugin.version>
43         <docker.tag>${project.version}</docker.tag>
44     </properties>
45
46     <dependencyManagement>
47         <dependencies>
48             <dependency>
49                 <!-- Import dependency management from Spring Boot -->
50                 <groupId>org.springframework.boot</groupId>
51                 <artifactId>spring-boot-dependencies</artifactId>
52                 <version>${spring-boot-starter.version}</version>
53                 <type>pom</type>
54                 <scope>import</scope>
55             </dependency>
56         </dependencies>
57     </dependencyManagement>
58
59     <dependencies>
60         <dependency>
61             <groupId>org.springframework.boot</groupId>
62             <artifactId>spring-boot-starter-web</artifactId>
63             <version>${spring-boot-starter.version}</version>
64             <exclusions>
65                 <exclusion>
66                     <groupId>org.springframework.boot</groupId>
67                     <artifactId>spring-boot-starter-logging</artifactId>
68                 </exclusion>
69             </exclusions>
70         </dependency>
71         <dependency>
72             <groupId>org.springframework.boot</groupId>
73             <artifactId>spring-boot-starter-log4j2</artifactId>
74             <version>${spring-boot-starter-log4j2.version}</version>
75         </dependency>
76         <dependency>
77             <groupId>org.springframework.boot</groupId>
78             <artifactId>spring-boot-starter-test</artifactId>
79             <version>${spring-boot-starter.version}</version>
80             <scope>test</scope>
81             <exclusions>
82                 <exclusion>
83                     <groupId>org.junit.vintage</groupId>
84                     <artifactId>junit-vintage-engine</artifactId>
85                 </exclusion>
86             </exclusions>
87         </dependency>
88         <dependency>
89             <groupId>org.mockito</groupId>
90             <artifactId>mockito-core</artifactId>
91             <version>${mockito-core.version}</version>
92             <scope>test</scope>
93         </dependency>
94         <dependency>
95             <groupId>org.assertj</groupId>
96             <artifactId>assertj-core</artifactId>
97             <version>${assertj-core.version}</version>
98             <scope>test</scope>
99         </dependency>
100         <dependency>
101             <groupId>org.springframework.boot</groupId>
102             <artifactId>spring-boot-starter-actuator</artifactId>
103             <version>${spring-boot-starter-actuator.version}</version>
104         </dependency>
105         <dependency>
106             <groupId>org.springdoc</groupId>
107             <artifactId>springdoc-openapi-ui</artifactId>
108             <version>${springdoc-openapi-ui.version}</version>
109         </dependency>
110         <dependency>
111             <groupId>org.bouncycastle</groupId>
112             <artifactId>bcpkix-jdk15on</artifactId>
113             <version>${bouncycastle.version}</version>
114         </dependency>
115         <dependency>
116             <groupId>org.bouncycastle</groupId>
117             <artifactId>bcprov-jdk15on</artifactId>
118             <version>${bouncycastle.version}</version>
119         </dependency>
120     </dependencies>
121
122     <build>
123         <pluginManagement>
124             <plugins>
125                 <plugin>
126                     <groupId>org.springframework.boot</groupId>
127                     <artifactId>spring-boot-maven-plugin</artifactId>
128                     <version>${spring-boot-starter.version}</version>
129                 </plugin>
130                 <plugin>
131                     <artifactId>maven-javadoc-plugin</artifactId>
132                     <version>${maven-javadoc-plugin.version}</version>
133                 </plugin>
134                 <plugin>
135                     <groupId>org.apache.maven.plugins</groupId>
136                     <artifactId>maven-surefire-plugin</artifactId>
137                     <version>${maven-surefire-plugin.version}</version>
138                 </plugin>
139
140             </plugins>
141         </pluginManagement>
142         <plugins>
143             <plugin>
144                 <groupId>org.springframework.boot</groupId>
145                 <artifactId>spring-boot-maven-plugin</artifactId>
146                 <executions>
147                     <execution>
148                         <goals>
149                             <goal>repackage</goal>
150                         </goals>
151                     </execution>
152                 </executions>
153             </plugin>
154             <plugin>
155                 <artifactId>maven-javadoc-plugin</artifactId>
156                 <configuration>
157                     <quiet>true</quiet>
158                     <verbose>false</verbose>
159                     <useStandardDocletOptions>false</useStandardDocletOptions>
160                     <javadocExecutable>${java.home}/bin/javadoc</javadocExecutable>
161                 </configuration>
162                 <executions>
163                     <execution>
164                         <id>aggregate</id>
165                         <phase>site</phase>
166                         <goals>
167                             <goal>aggregate</goal>
168                         </goals>
169                     </execution>
170                     <execution>
171                         <id>attach-javadoc</id>
172                         <goals>
173                             <goal>jar</goal>
174                         </goals>
175                     </execution>
176                 </executions>
177             </plugin>
178         </plugins>
179     </build>
180
181     <profiles>
182         <profile>
183             <id>docker-staging</id>
184             <properties>
185                 <docker.tag>${project.version}-STAGING-${maven.build.timestamp}</docker.tag>
186                 <docker.latest.tag>${project.version}-STAGING-latest</docker.latest.tag>
187             </properties>
188         </profile>
189
190         <profile>
191             <id>docker</id>
192             <activation>
193                 <activeByDefault>false</activeByDefault>
194             </activation>
195             <build>
196                 <plugins>
197                     <plugin>
198                         <groupId>io.fabric8</groupId>
199                         <artifactId>docker-maven-plugin</artifactId>
200                         <version>${docker-maven-plugin.version}</version>
201                         <executions>
202                             <execution>
203                                 <id>clean-images</id>
204                                 <phase>pre-clean</phase>
205                                 <goals>
206                                     <goal>remove</goal>
207                                 </goals>
208                                 <configuration>
209                                     <removeAll>true</removeAll>
210                                     <image>onap/cert-service</image>
211                                 </configuration>
212                             </execution>
213                             <execution>
214                                 <id>generate-images</id>
215                                 <phase>install</phase>
216                                 <goals>
217                                     <goal>build</goal>
218                                 </goals>
219                             </execution>
220 <!--                            It has to be published on nexus firstly to uncomment integration tests-->
221 <!--                            <execution>-->
222 <!--                                <id>start</id>-->
223 <!--                                <phase>pre-integration-test</phase>-->
224 <!--                                <goals>-->
225 <!--                                    <goal>start</goal>-->
226 <!--                                </goals>-->
227 <!--                            </execution>-->
228 <!--                            <execution>-->
229 <!--                                <id>stop</id>-->
230 <!--                                <phase>post-integration-test</phase>-->
231 <!--                                <goals>-->
232 <!--                                    <goal>stop</goal>-->
233 <!--                                </goals>-->
234 <!--                            </execution>-->
235                             <execution>
236                                 <id>push-images</id>
237                                 <phase>deploy</phase>
238                                 <goals>
239                                     <goal>push</goal>
240                                 </goals>
241                                 <configuration>
242                                     <image>onap/cert-service</image>
243                                 </configuration>
244                             </execution>
245                         </executions>
246                         <configuration>
247                             <apiVersion>1.23</apiVersion>
248                             <registry>nexus3.onap.org:10001</registry>
249                             <authConfig>
250                                 <pull>
251                                     <username>docker</username>
252                                     <password>docker</password>
253                                 </pull>
254                             </authConfig>
255                             <images>
256                                 <image>
257                                     <name>onap/cert-service</name>
258                                     <alias>cert-service</alias>
259                                     <build>
260                                         <dockerFile>${project.basedir}/Dockerfile</dockerFile >
261                                         <tags>
262                                             <tag>${docker.tag}</tag>
263                                         </tags>
264                                     </build>
265                                     <run>
266                                         <ports>
267                                             <port>8080:8080</port>
268                                         </ports>
269                                         <wait>
270                                             <!-- Check for this URL to return a 200 return code .... -->
271                                             <url>http://localhost:8080/actuator/health</url>
272                                             <time>120000</time>
273                                         </wait>
274                                     </run>
275                                 </image>
276                             </images>
277                         </configuration>
278                     </plugin>
279                 </plugins>
280             </build>
281         </profile>
282     </profiles>
283
284     <distributionManagement>
285         <repository>
286             <id>ecomp-releases</id>
287             <name>AAF Release Repository</name>
288             <url>${nexusproxy}${releaseNexusPath}</url>
289         </repository>
290         <snapshotRepository>
291             <id>ecomp-snapshots</id>
292             <name>AAF Snapshot Repository</name>
293             <url>${nexusproxy}${snapshotNexusPath}</url>
294         </snapshotRepository>
295         <site>
296             <id>ecomp-site</id>
297             <url>dav:${nexusproxy}${sitePath}</url>
298         </site>
299     </distributionManagement>
300
301 </project>