Release OOF containers
[optf/cmso.git] / cmso-topology / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!-- ============LICENSE_START======================================================= 
3         org.onap.optf.cmso ================================================================================ 
4         Copyright © 2019 AT&T Intellectual Property. All rights reserved. ================================================================================ 
5         Licensed under the Apache License, Version 2.0 (the "License"); you may not 
6         use this file except in compliance with the License. You may obtain a copy 
7         of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required 
8         by applicable law or agreed to in writing, software distributed under the 
9         License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 
10         OF ANY KIND, either express or implied. See the License for the specific 
11         language governing permissions and limitations under the License. ============LICENSE_END========================================================= -->
12
13
14 <project xmlns="http://maven.apache.org/POM/4.0.0"
15         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
16         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
17         <modelVersion>4.0.0</modelVersion>
18
19         <parent>
20                 <groupId>org.onap.optf.cmso</groupId>
21                 <artifactId>cmso</artifactId>
22                 <version>1.0.1-SNAPSHOT</version>
23         </parent>
24
25         <groupId>org.onap.optf.cmso.topology</groupId>
26         <artifactId>cmso-topology</artifactId>
27
28         <packaging>jar</packaging>
29
30         <name>cmso-topology</name>
31
32         <properties>
33                 <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
34
35                 <cmso.project.version>${project.version}</cmso.project.version>
36                 <cmso.build.timestamp>${maven.build.timestamp}</cmso.build.timestamp>
37
38                 <service.name>cmso</service.name>
39                 <release-tag>Casablanca</release-tag>
40                 <name.space>org.onap.optf.cmso</name.space>
41                 <serviceArtifactName>cmso</serviceArtifactName>
42
43                 <java.version>1.8</java.version>
44                 <eelf.version>1.0.0</eelf.version>
45                 <pact.version>3.3.9</pact.version>
46                 <spring.version>5.0.10.RELEASE</spring.version>
47                 <spring.boot.version>2.1.3.RELEASE</spring.boot.version>
48                 <swagger.core.version>2.0.0</swagger.core.version>
49
50                 <maven.compiler.target>1.8</maven.compiler.target>
51                 <maven.compiler.source>1.8</maven.compiler.source>
52                 <build.number>${maven.build.timestamp}</build.number>
53                 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
54                 <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
55                 <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
56                 <mariadb.version>2.2.1</mariadb.version>
57                 <swagger.directory>${basedir}/src/main/resources/META-INF/resources/swagger/</swagger.directory>
58                 <aaf.version>2.1.4</aaf.version>
59
60                 <!-- Sonar -->
61                 <ilib.version>2.0.7</ilib.version>
62                 <sonar.language>java</sonar.language>
63                 <jacoco.path>${basedir}/target/jacoco_report</jacoco.path>
64                 <jacoco.itPath>${basedir}/target/jacoco_itReport</jacoco.itPath>
65                 <sonar.dynamicAnalysis>reuseReports</sonar.dynamicAnalysis>
66                 <sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
67                 <sonar.jacoco.reportPath>${basedir}/target/jacoco-ut.exec</sonar.jacoco.reportPath>
68                 <sonar.jacoco.itReportPath>${basedir}/target/jacoco-it.exec</sonar.jacoco.itReportPath>
69                 <sonar.surefire.reportsPath>${basedir}/target/surefire-reports</sonar.surefire.reportsPath>
70                 <sonar.failsafe.reportsPath>${basedir}/target/failsafe-reports</sonar.failsafe.reportsPath>
71
72                 <docker.push.registry>localhost:5000</docker.push.registry>
73                 <docker.pull.registry>nexus3.onap.org:10001</docker.pull.registry>
74                 <docker.skip.build>false</docker.skip.build>
75                 <docker.skip.push>false</docker.skip.push>
76                 <docker.skip.tag>false</docker.skip.tag>
77                 <skip.staging.artifacts>false</skip.staging.artifacts>
78
79         </properties>
80
81         <dependencyManagement>
82                 <dependencies>
83                         <!-- Spring boot -->
84                         <dependency>
85                                 <groupId>org.springframework.boot</groupId>
86                                 <artifactId>spring-boot-dependencies</artifactId>
87                                 <version>${spring.boot.version}</version>
88                                 <type>pom</type>
89                                 <scope>import</scope>
90                         </dependency>
91                 </dependencies>
92         </dependencyManagement>
93
94         <dependencies>
95                 <dependency>
96                         <groupId>org.springframework.boot</groupId>
97                         <artifactId>spring-boot-starter-actuator</artifactId>
98                 </dependency>
99                 <dependency>
100                         <groupId>org.springframework.boot</groupId>
101                         <artifactId>spring-boot-starter-jersey</artifactId>
102                 </dependency>
103                 <dependency>
104                         <groupId>org.springframework.boot</groupId>
105                         <artifactId>spring-boot-starter-web</artifactId>
106                 </dependency>
107                 <dependency>
108                         <groupId>org.springframework.boot</groupId>
109                         <artifactId>spring-boot-starter-security</artifactId>
110                 </dependency>
111                 <!-- <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-loader-tools</artifactId> 
112                         </dependency> -->
113                 <dependency>
114                         <groupId>org.springframework.boot</groupId>
115                         <artifactId>spring-boot-starter-data-jpa</artifactId>
116                 </dependency>
117                 <dependency>
118                         <groupId>org.springframework.boot</groupId>
119                         <artifactId>spring-boot-starter-tomcat</artifactId>
120                 </dependency>
121                 <!-- <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-mongodb</artifactId> 
122                         </dependency> -->
123                 <dependency>
124                         <groupId>org.springframework.boot</groupId>
125                         <artifactId>spring-boot-configuration-processor</artifactId>
126                         <optional>true</optional>
127                 </dependency>
128                 <dependency>
129                         <groupId>org.springframework.boot</groupId>
130                         <artifactId>spring-boot-starter-test</artifactId>
131                         <scope>test</scope>
132                         <exclusions>
133                                 <exclusion>
134                                         <groupId>org.mockito</groupId>
135                                         <artifactId>mockito-core</artifactId>
136                                 </exclusion>
137                         </exclusions>
138                 </dependency>
139                 <dependency>
140                         <groupId>org.apache.httpcomponents</groupId>
141                         <artifactId>httpclient</artifactId>
142                 </dependency>
143                 <dependency>
144                         <groupId>org.springframework</groupId>
145                         <artifactId>spring-test</artifactId>
146                         <scope>test</scope>
147                 </dependency>
148                 <dependency>
149                         <groupId>org.springframework</groupId>
150                         <artifactId>spring-beans</artifactId>
151                 </dependency>
152                 <dependency>
153                         <groupId>org.springframework</groupId>
154                         <artifactId>spring-beans</artifactId>
155                 </dependency>
156                 <dependency>
157                         <groupId>org.springframework</groupId>
158                         <artifactId>spring-context</artifactId>
159                 </dependency>
160                 <dependency>
161                         <groupId>org.springframework</groupId>
162                         <artifactId>spring-core</artifactId>
163                 </dependency>
164                 <dependency>
165                         <groupId>org.springframework</groupId>
166                         <artifactId>spring-expression</artifactId>
167                 </dependency>
168                 <dependency>
169                         <groupId>org.springframework</groupId>
170                         <artifactId>spring-web</artifactId>
171                 </dependency>
172                 <dependency>
173                         <groupId>org.springframework</groupId>
174                         <artifactId>spring-tx</artifactId>
175                 </dependency>
176                 <dependency>
177                         <groupId>org.springframework</groupId>
178                         <artifactId>spring-context-support</artifactId>
179                 </dependency>
180                 <dependency>
181                         <groupId>com.att.eelf</groupId>
182                         <artifactId>eelf-core</artifactId>
183                         <version>${eelf.version}</version>
184                         <exclusions>
185                                 <exclusion>
186                                         <groupId>org.mockito</groupId>
187                                         <artifactId>mockito-core</artifactId>
188                                 </exclusion>
189                                 <exclusion>
190                                         <groupId>org.powermock</groupId>
191                                         <artifactId>powermock-module</artifactId>
192                                 </exclusion>
193                                 <exclusion>
194                                         <groupId>org.powermock</groupId>
195                                         <artifactId>powermock-api-mockito</artifactId>
196                                 </exclusion>
197                                 <exclusion>
198                                         <groupId>org.powermock</groupId>
199                                         <artifactId>powermock-module-junit4</artifactId>
200                                 </exclusion>
201
202                         </exclusions>
203                 </dependency>
204                 <!-- <dependency> <groupId>org.onap.aaf.authz</groupId> <artifactId>aaf-cadi-aaf</artifactId> 
205                         <version>2.1.1</version> </dependency> -->
206                 <dependency>
207                         <groupId>javax.ws.rs</groupId>
208                         <artifactId>javax.ws.rs-api</artifactId>
209                         <version>2.1</version>
210                 </dependency>
211
212                 <!--Swagger Dependencies -->
213                 <dependency>
214                         <groupId>io.swagger.core.v3</groupId>
215                         <artifactId>swagger-jaxrs2</artifactId>
216                         <version>${swagger.core.version}</version>
217                 </dependency>
218                 <dependency>
219                         <groupId>io.swagger.core.v3</groupId>
220                         <artifactId>swagger-jaxrs2-servlet-initializer</artifactId>
221                         <version>${swagger.core.version}</version>
222                 </dependency>
223
224                 <dependency>
225                         <groupId>io.swagger</groupId>
226                         <artifactId>swagger-jersey2-jaxrs</artifactId>
227                         <version>1.5.0</version>
228                 </dependency>
229
230
231                 <!-- Database -->
232                 <dependency>
233                         <groupId>org.mariadb.jdbc</groupId>
234                         <artifactId>mariadb-java-client</artifactId>
235                 </dependency>
236
237                 <dependency>
238                         <groupId>joda-time</groupId>
239                         <artifactId>joda-time</artifactId>
240                 </dependency>
241                 <dependency>
242                         <groupId>org.apache.commons</groupId>
243                         <artifactId>commons-text</artifactId>
244                         <version>1.6</version>
245                 </dependency>
246                 <!-- Testing Dependencies -->
247                 <!-- <dependency> <groupId>org.powermock</groupId> <artifactId>powermock-api-mockito2</artifactId> 
248                         <version>1.7.4</version> <scope>test</scope> </dependency> -->
249                 <dependency>
250                         <groupId>org.mockito</groupId>
251                         <artifactId>mockito-all</artifactId>
252                         <version>1.9.5</version>
253                         <scope>test</scope>
254                 </dependency>
255                 <dependency>
256                         <groupId>org.jacoco</groupId>
257                         <artifactId>jacoco-maven-plugin</artifactId>
258                         <version>0.8.1</version>
259                         <scope>test</scope>
260                 </dependency>
261                 <dependency>
262                         <groupId>org.onap.aaf.authz</groupId>
263                         <artifactId>aaf-cadi-aaf</artifactId>
264                         <version>${aaf.version}</version>
265                 </dependency>
266         </dependencies>
267
268         <build>
269                 <finalName>cmso-topology</finalName>
270                 <plugins>
271                         <plugin>
272                                 <groupId>au.com.dius</groupId>
273                                 <artifactId>pact-jvm-provider-maven_2.11</artifactId>
274                                 <version>${pact.version}</version>
275                                 <configuration>
276                                         <!--pactBrokerUrl,user name,password and project version required only 
277                                                 for consumer -->
278                                         <pactBrokerUrl>${BROKER_URL}</pactBrokerUrl>
279                                         <pactBrokerUsername>pactadmin</pactBrokerUsername>
280                                         <pactBrokerPassword>pactadmin</pactBrokerPassword>
281                                         <projectVersion>1.0.0</projectVersion>
282                                         <!-- service provider required only for producer -->
283                                         <serviceProviders>
284                                                 <serviceProvider>
285                                                         <name>core</name>
286                                                         <protocol>http</protocol>
287                                                         <host>${APP_URL}</host>
288                                                         <port>${APP_PORT}</port>
289                                                         <path>/</path>
290                                                         <pactBroker>
291                                                                 <url>${BROKER_URL}</url>
292                                                                 <authentication>
293                                                                         <username>pactadmin</username>
294                                                                         <password>pactadmin</password>
295                                                                 </authentication>
296                                                         </pactBroker>
297                                                 </serviceProvider>
298                                         </serviceProviders>
299                                 </configuration>
300                         </plugin>
301                         <plugin>
302                                 <artifactId>maven-dependency-plugin</artifactId>
303                         </plugin>
304                         <plugin>
305                                 <groupId>com.github.kongchen</groupId>
306                                 <artifactId>swagger-maven-plugin</artifactId>
307                                 <version>3.1.5</version>
308                                 <configuration>
309                                         <apiSources>
310                                                 <apiSource>
311                                                         <locations>
312                                                                 <location>org.onap.optf.cmso.topology.service.rs</location>
313                                                         </locations>
314                                                         <basePath>/topology</basePath>
315                                                         <info>
316                                                                 <title>${project.artifactId}</title>
317                                                                 <version>${project.version}</version>
318                                                         </info>
319                                                         <swaggerDirectory>${swagger.directory}</swaggerDirectory>
320                                                 </apiSource>
321                                         </apiSources>
322                                 </configuration>
323                                 <executions>
324                                         <execution>
325                                                 <phase>compile</phase>
326                                                 <goals>
327                                                         <goal>generate</goal>
328                                                 </goals>
329                                         </execution>
330                                 </executions>
331                         </plugin>
332                         <plugin>
333                                 <groupId>org.codehaus.groovy.maven</groupId>
334                                 <artifactId>gmaven-plugin</artifactId>
335                                 <version>1.0</version>
336                                 <executions>
337                                         <execution>
338                                                 <phase>validate</phase>
339                                                 <goals>
340                                                         <goal>execute</goal>
341                                                 </goals>
342                                                 <configuration>
343                                                         <source>${project.basedir}/src/main/script/TagVersion.groovy</source>
344                                                 </configuration>
345                                         </execution>
346                                 </executions>
347                         </plugin>
348                         <plugin>
349                                 <artifactId>exec-maven-plugin</artifactId>
350                                 <groupId>org.codehaus.mojo</groupId>
351                         </plugin>
352                         <plugin>
353                                 <groupId>org.springframework.boot</groupId>
354                                 <artifactId>spring-boot-maven-plugin</artifactId>
355                                 <version>${spring.boot.version}</version>
356                                 <executions>
357                                         <execution>
358                                                 <goals>
359                                                         <goal>repackage</goal>
360                                                 </goals>
361                                         </execution>
362                                 </executions>
363                         </plugin>
364                         <plugin>
365                                 <groupId>io.fabric8</groupId>
366                                 <artifactId>docker-maven-plugin</artifactId>
367                                 <version>0.26.0</version>
368                                 <configuration>
369                                         <verbose>true</verbose>
370                                         <apiVersion>1.23</apiVersion>
371                                         <images>
372                                                 <image>
373                                                         <name>onap/optf-cmso-topology</name>
374                                                         <alias>onap-optf-cmso-topology</alias>
375                                                         <build>
376                                                                 <cleanup>true</cleanup>
377                                                                 <tags>
378                                                                         <tag>latest</tag>
379                                                                         <tag>${project.docker.latesttagtimestamp.version}</tag>
380                                                                         <tag>${project.docker.latesttag.version}</tag>
381                                                                 </tags>
382                                                                 <dockerFile>${project.basedir}/src/main/docker/Dockerfile</dockerFile>
383                                                                 <assembly>
384                                                                         <descriptor>${project.basedir}/src/main/docker/assembly/cmso-files.xml</descriptor>
385                                                                         <name>onap-cmso-topology</name>
386                                                                 </assembly>
387                                                         </build>
388                                                 </image>
389                                         </images>
390                                 </configuration>
391                                 <executions>
392                                         <execution>
393                                                 <id>generate-images</id>
394                                                 <phase>install</phase>
395                                                 <goals>
396                                                         <goal>build</goal>
397                                                 </goals>
398                                         </execution>
399                                         <execution>
400                                                 <id>push-images</id>
401                                                 <phase>deploy</phase>
402                                                 <goals>
403                                                         <goal>build</goal>
404                                                         <goal>push</goal>
405                                                 </goals>
406                                                 <configuration>
407                                                         <image>onap/optf-cmso-topology:%l</image>
408                                                 </configuration>
409                                         </execution>
410                                 </executions>
411                         </plugin>
412                 </plugins>
413                 <!-- mention the logback.xml location through system property or environment 
414                         variable to edit logback.xml at run time -->
415                 <resources>
416                         <resource>
417                                 <directory>src/main/resources</directory>
418                                 <filtering>true</filtering>
419                                 <includes>
420                                         <include>**/*</include>
421                                 </includes>
422                         </resource>
423                         <resource>
424                                 <directory>etc/config</directory>
425                                 <filtering>true</filtering>
426                                 <includes>
427                                         <include>**/*</include>
428                                 </includes>
429                         </resource>
430                         <resource>
431                                 <directory>${basedir}/truststore</directory>
432                                 <targetPath>${basedir}/target/truststore</targetPath>
433                                 <filtering>true</filtering>
434                                 <includes>
435                                         <include>**/*</include>
436                                 </includes>
437                         </resource>
438                         <resource>
439                                 <directory>${basedir}/bin</directory>
440                                 <targetPath>${basedir}/target/bin</targetPath>
441                                 <filtering>true</filtering>
442                                 <includes>
443                                         <include>**/*</include>
444                                 </includes>
445                         </resource>
446                         <resource>
447                                 <directory>${basedir}/data</directory>
448                                 <targetPath>${basedir}/target/data</targetPath>
449                                 <filtering>true</filtering>
450                                 <includes>
451                                         <include>**/*</include>
452                                 </includes>
453                         </resource>
454                 </resources>
455                 <pluginManagement>
456                         <plugins>
457                                 <!--This plugin's configuration is used to store Eclipse m2e settings 
458                                         only. It has no influence on the Maven build itself. -->
459                                 <plugin>
460                                         <groupId>org.eclipse.m2e</groupId>
461                                         <artifactId>lifecycle-mapping</artifactId>
462                                         <version>1.0.0</version>
463                                         <configuration>
464                                                 <lifecycleMappingMetadata>
465                                                         <pluginExecutions>
466                                                                 <pluginExecution>
467                                                                         <pluginExecutionFilter>
468                                                                                 <groupId>
469                                                                                         com.github.kongchen
470                                                                                 </groupId>
471                                                                                 <artifactId>
472                                                                                         swagger-maven-plugin
473                                                                                 </artifactId>
474                                                                                 <versionRange>
475                                                                                         [3.1.5]
476                                                                                 </versionRange>
477                                                                                 <goals>
478                                                                                         <goal>generate</goal>
479                                                                                 </goals>
480                                                                         </pluginExecutionFilter>
481                                                                         <action>
482                                                                                 <ignore></ignore>
483                                                                         </action>
484                                                                 </pluginExecution>
485                                                         </pluginExecutions>
486                                                 </lifecycleMappingMetadata>
487                                         </configuration>
488                                 </plugin>
489                         </plugins>
490                 </pluginManagement>
491         </build>
492
493         <profiles>
494                 <profile>
495                         <id>snapshot</id>
496                         <activation>
497                                 <activeByDefault>true</activeByDefault>
498                         </activation>
499                         <properties>
500                                 <versionSuffix>-${build.number}-${release-tag}</versionSuffix>
501                         </properties>
502                 </profile>
503                 <profile>
504                         <id>next-stable</id>
505                         <properties>
506                                 <versionSuffix>-${release-tag}</versionSuffix>
507                         </properties>
508                 </profile>
509                 <profile>
510                         <id>last-stable</id>
511                         <properties>
512                                 <versionSuffix>-${release-tag}</versionSuffix>
513                         </properties>
514                 </profile>
515         </profiles>
516 </project>