Update schema-service dep to 1.6.0
[aai/spike.git] / pom.xml
1 <?xml version="1.0"?>
2 <!--
3     ============LICENSE_START=======================================================
4     org.onap.aai
5     ================================================================================
6     Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
7     Copyright © 2017-2018 Amdocs
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 <project xmlns="http://maven.apache.org/POM/4.0.0" 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.oparent</groupId>
28         <artifactId>oparent</artifactId>
29         <version>2.0.0</version>
30         <relativePath/>
31     </parent>
32
33     <groupId>org.onap.aai</groupId>
34     <artifactId>spike</artifactId>
35     <version>1.6.0-SNAPSHOT</version>
36     <name>aai-spike</name>
37
38     <properties>
39         <docker.location>${basedir}/target</docker.location>
40         <event.client.version>1.5.0</event.client.version>
41         <version.aai-schema>1.6.0</version.aai-schema>
42         <version.aai-schema-ingest>1.4.1</version.aai-schema-ingest>
43         <!-- Minimum code coverage percentage. Please update this figure as coverage increases to prevent any drops in
44          coverage caused by new changes. Note that this figure cannot be lower than the ONAP requirement of 0.55 -->
45         <jacoco.line.coverage.limit>0.55</jacoco.line.coverage.limit>
46         <jacoco.report.directory>${project.build.directory}/code-coverage</jacoco.report.directory>
47         <!-- docker related properties -->
48         <docker.fabric.version>0.28.0</docker.fabric.version>
49         <aai.docker.version>1.0.0</aai.docker.version>
50         <aai.build.directory>${project.build.directory}/${project.artifactId}-build/
51         </aai.build.directory>
52         <aai.docker.namespace>onap</aai.docker.namespace>
53         <aai.base.image>alpine</aai.base.image>
54         <aai.base.image.version>1.6.0</aai.base.image.version>
55         <!-- This will be used for the docker images as the default format of maven build has issues -->
56         <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
57     </properties>
58
59     <dependencyManagement>
60         <dependencies>
61             <dependency>
62                 <!-- Import dependency management from Spring Boot -->
63                 <groupId>org.springframework.boot</groupId>
64                 <artifactId>spring-boot-dependencies</artifactId>
65                 <version>1.5.21.RELEASE</version>
66                 <type>pom</type>
67                 <scope>import</scope>
68             </dependency>
69         </dependencies>
70     </dependencyManagement>
71
72     <dependencies>
73         <dependency>
74             <groupId>org.springframework.boot</groupId>
75             <artifactId>spring-boot-starter-web</artifactId>
76             <exclusions>
77                 <exclusion>
78                     <groupId>org.springframework.boot</groupId>
79                     <artifactId>spring-boot-starter-tomcat</artifactId>
80                 </exclusion>
81             </exclusions>
82         </dependency>
83
84         <dependency>
85             <groupId>org.springframework.boot</groupId>
86             <artifactId>spring-boot-starter-jetty</artifactId>
87         </dependency>
88
89         <dependency>
90             <groupId>org.springframework</groupId>
91             <artifactId>spring-webmvc</artifactId>
92         </dependency>
93
94         <dependency>
95             <groupId>org.springframework.boot</groupId>
96             <artifactId>spring-boot-starter-test</artifactId>
97             <scope>test</scope>
98         </dependency>
99
100         <!-- MODEL -->
101         <dependency>
102             <groupId>org.onap.aai.schema-service</groupId>
103             <artifactId>aai-schema</artifactId>
104             <version>${version.aai-schema}</version>
105         </dependency>
106         <dependency>
107             <groupId>org.onap.aai.aai-common</groupId>
108             <artifactId>aai-schema-ingest</artifactId>
109             <version>${version.aai-schema-ingest}</version>
110             <exclusions>
111                 <exclusion>
112                     <groupId>org.powermock</groupId>
113                     <artifactId>*</artifactId>
114                 </exclusion>
115             </exclusions>
116         </dependency>
117
118         <!-- EVENT CLIENT -->
119         <dependency>
120             <groupId>org.onap.aai.event-client</groupId>
121             <artifactId>event-client-api</artifactId>
122             <version>${event.client.version}</version>
123         </dependency>
124         <dependency>
125             <groupId>org.onap.aai.event-client</groupId>
126             <artifactId>event-client-dmaap</artifactId>
127             <version>${event.client.version}</version>
128             <exclusions>
129                 <exclusion>
130                     <groupId>com.sun.jersey</groupId>
131                     <artifactId>jersey-client</artifactId>
132                 </exclusion>
133             </exclusions>
134         </dependency>
135         <dependency>
136             <groupId>org.onap.aai.event-client</groupId>
137             <artifactId>event-client-kafka</artifactId>
138             <version>${event.client.version}</version>
139         </dependency>
140         <dependency>
141             <groupId>org.onap.aai.event-client</groupId>
142             <artifactId>event-client-rabbitmq</artifactId>
143             <version>${event.client.version}</version>
144         </dependency>
145
146         <dependency>
147             <groupId>org.apache.commons</groupId>
148             <artifactId>commons-lang3</artifactId>
149             <version>3.7</version>
150         </dependency>
151
152         <dependency>
153             <groupId>org.codehaus.jackson</groupId>
154             <artifactId>jackson-mapper-asl</artifactId>
155             <version>1.4.5</version>
156         </dependency>
157
158         <dependency>
159             <groupId>commons-io</groupId>
160             <artifactId>commons-io</artifactId>
161             <version>2.4</version>
162         </dependency>
163
164         <!-- Common logging framework -->
165         <dependency>
166             <groupId>org.onap.aai.logging-service</groupId>
167             <artifactId>common-logging</artifactId>
168             <version>1.5.0</version>
169         </dependency>
170
171         <dependency>
172             <groupId>org.onap.aai.logging-service</groupId>
173             <artifactId>logging-api</artifactId>
174             <version>1.5.0</version>
175         </dependency>
176
177         <dependency>
178             <groupId>ch.qos.logback</groupId>
179             <artifactId>logback-core</artifactId>
180         </dependency>
181
182         <dependency>
183             <groupId>com.google.guava</groupId>
184             <artifactId>guava</artifactId>
185         </dependency>
186
187         <dependency>
188             <groupId>org.eclipse.persistence</groupId>
189             <artifactId>eclipselink</artifactId>
190             <version>2.6.2</version>
191         </dependency>
192
193         <dependency>
194             <groupId>org.glassfish.jersey.core</groupId>
195             <artifactId>jersey-client</artifactId>
196         </dependency>
197
198         <dependency>
199             <groupId>org.glassfish.jersey.inject</groupId>
200             <artifactId>jersey-hk2</artifactId>
201             <version>2.26</version>
202         </dependency>
203
204         <dependency>
205             <groupId>com.google.code.gson</groupId>
206             <artifactId>gson</artifactId>
207         </dependency>
208
209         <dependency>
210             <groupId>org.apache.httpcomponents</groupId>
211             <artifactId>httpclient</artifactId>
212             <version>4.5.3</version>
213         </dependency>
214
215         <dependency>
216             <groupId>org.apache.httpcomponents</groupId>
217             <artifactId>httpcore</artifactId>
218             <version>4.4.1</version>
219         </dependency>
220
221         <dependency>
222             <groupId>org.json</groupId>
223             <artifactId>json</artifactId>
224             <version>20160212</version>
225         </dependency>
226
227         <dependency>
228             <groupId>org.skyscreamer</groupId>
229             <artifactId>jsonassert</artifactId>
230             <scope>test</scope>
231         </dependency>
232
233         <dependency>
234             <groupId>org.mockito</groupId>
235             <artifactId>mockito-core</artifactId>
236             <version>2.15.0</version>
237             <scope>test</scope>
238         </dependency>
239     </dependencies>
240     
241     <profiles>
242         <!-- Docker profile to be used for building docker image and pushing to nexus -->
243         <profile>
244             <id>docker</id>
245             <build>
246                 <plugins>
247                     <plugin>
248                         <groupId>org.codehaus.mojo</groupId>
249                         <artifactId>build-helper-maven-plugin</artifactId>
250                         <version>3.0.0</version>
251                         <executions>
252                             <execution>
253                                 <phase>pre-clean</phase>
254                                 <id>parse-version</id>
255                                 <goals>
256                                     <goal>parse-version</goal>
257                                 </goals>
258                             </execution>
259                         </executions>
260                     </plugin>
261                     <plugin>
262                         <groupId>org.codehaus.groovy.maven</groupId>
263                         <artifactId>gmaven-plugin</artifactId>
264                         <version>1.0</version>
265                         <executions>
266                             <execution>
267                                 <phase>pre-clean</phase>
268                                 <goals>
269                                     <goal>execute</goal>
270                                 </goals>
271                                 <configuration>
272                                     <source>
273                                         def userAaiBaseImage = session.userProperties['aai.base.image']
274                                         def userAaiCommonVersion = session.userProperties['aai.base.image.version']
275                                         if (userAaiCommonVersion != null) {
276                                             project.properties['aai.base.image.version'] = userAaiCommonVersion
277                                         }
278                                         if (userAaiBaseImage != null) {
279                                             project.properties['aai.base.image'] = userAaiBaseImage
280                                         }
281                                         log.info 'Base image flavour: ' + project.properties['aai.base.image']
282                                         log.info 'Base image version: ' + project.properties['aai.base.image.version']
283                                     </source>
284                                 </configuration>
285                             </execution>
286                         </executions>
287                     </plugin>
288                     <plugin>
289                         <groupId>io.fabric8</groupId>
290                         <artifactId>docker-maven-plugin</artifactId>
291                         <version>${docker.fabric.version}</version>
292                         <configuration>
293                             <verbose>true</verbose>
294                             <apiVersion>1.23</apiVersion>
295                             <images>
296                                 <image>
297                                     <name>${docker.push.registry}/${aai.docker.namespace}/${project.artifactId}:%l
298                                     </name>
299                                     <build>
300                                         <filter>@</filter>
301                                         <tags>
302                                             <tag>latest</tag>
303                                             <tag>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}-STAGING-latest</tag>
304                                             <tag>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}-STAGING-${maven.build.timestamp}</tag>
305                                         </tags>
306                                         <cleanup>try</cleanup>
307                                         <dockerFileDir>${project.basedir}/src/main/docker</dockerFileDir>
308                                         <assembly>
309                                             <inline>
310                                                 <fileSets>
311                                                     <fileSet>
312                                                         <directory>${aai.build.directory}</directory>
313                                                         <outputDirectory>/${project.artifactId}</outputDirectory>
314                                                     </fileSet>
315                                                 </fileSets>
316                                             </inline>
317                                         </assembly>
318                                     </build>
319                                 </image>
320                             </images>
321                         </configuration>
322                         <executions>
323                             <execution>
324                                 <id>clean-images</id>
325                                 <phase>pre-clean</phase>
326                                 <goals>
327                                     <goal>remove</goal>
328                                 </goals>
329                                 <configuration>
330                                     <removeAll>true</removeAll>
331                                 </configuration>
332                             </execution>
333                             <execution>
334                                 <id>generate-images</id>
335                                 <phase>package</phase>
336                                 <goals>
337                                     <goal>build</goal>
338                                 </goals>
339                             </execution>
340                             <execution>
341                                 <id>push-images</id>
342                                 <phase>deploy</phase>
343                                 <goals>
344                                     <goal>push</goal>
345                                 </goals>
346                             </execution>
347                         </executions>
348                     </plugin>
349                 </plugins>
350             </build>
351         </profile>
352     </profiles>
353
354     <build>
355         <finalName>${project.artifactId}</finalName>
356         <plugins>
357             <plugin>
358                 <groupId>org.apache.maven.plugins</groupId>
359                 <artifactId>maven-deploy-plugin</artifactId>
360             </plugin>
361             <plugin>
362                 <groupId>org.springframework.boot</groupId>
363                 <artifactId>spring-boot-maven-plugin</artifactId>
364                 <version>1.5.21.RELEASE</version>
365                 <executions>
366                     <execution>
367                         <goals>
368                             <goal>repackage</goal>
369                         </goals>
370                     </execution>
371                 </executions>
372             </plugin>
373             <plugin>
374                 <artifactId>maven-assembly-plugin</artifactId>
375                 <configuration>
376                     <descriptors>
377                         <descriptor>src/main/assembly/descriptor.xml</descriptor>
378                     </descriptors>
379                 </configuration>
380                 <executions>
381                     <execution>
382                         <id>make-assembly</id>
383                         <phase>package</phase>
384                         <goals>
385                             <goal>single</goal>
386                         </goals>
387                     </execution>
388                 </executions>
389             </plugin>
390             <plugin>
391                 <groupId>org.jacoco</groupId>
392                 <artifactId>jacoco-maven-plugin</artifactId>
393                 <executions>
394                     <execution>
395                         <id>default-check</id>
396                         <goals>
397                             <goal>check</goal>
398                         </goals>
399                         <configuration>
400                             <dataFile>${jacoco.report.directory}/jacoco-ut.exec</dataFile>
401                             <rules>
402                                 <!--  implementation is needed only for Maven 2  -->
403                                 <rule implementation="org.jacoco.maven.RuleConfiguration">
404                                     <element>BUNDLE</element>
405                                     <limits>
406                                         <limit implementation="org.jacoco.report.check.Limit">
407                                             <counter>LINE</counter>
408                                             <value>COVEREDRATIO</value>
409                                             <minimum>${jacoco.line.coverage.limit}</minimum>
410                                         </limit>
411                                     </limits>
412                                 </rule>
413                             </rules>
414                         </configuration>
415                     </execution>
416                 </executions>
417             </plugin>
418             <plugin>
419                 <groupId>org.apache.maven.plugins</groupId>
420                 <artifactId>maven-dependency-plugin</artifactId>
421                 <executions>
422                     <execution>
423                         <id>unpack</id>
424                         <phase>prepare-package</phase>
425                         <goals>
426                             <goal>unpack</goal>
427                         </goals>
428                         <configuration>
429                             <artifactItems>
430                                 <artifactItem>
431                                     <groupId>org.onap.aai.schema-service</groupId>
432                                     <artifactId>aai-schema</artifactId>
433                                     <version>${version.aai-schema}</version>
434                                     <type>jar</type>
435                                     <includes>onap/**/</includes>
436                                     <outputDirectory>${aai.build.directory}/bundleconfig/etc</outputDirectory>
437                                 </artifactItem>
438                             </artifactItems>
439                         </configuration>
440                     </execution>
441                 </executions>
442             </plugin>
443             <plugin>
444                 <groupId>com.mycila</groupId>
445                 <artifactId>license-maven-plugin</artifactId>
446                 <version>3.0</version>
447                 <configuration>
448                     <header>License.txt</header>
449                     <includes>
450                         <include>src/main/java/**</include>
451                         <include>src/test/java/**</include>
452                         <include>pom.xml</include>
453                     </includes>
454                     <skipExistingHeaders>true</skipExistingHeaders>
455                 </configuration>
456                 <executions>
457                     <execution>
458                         <goals>
459                             <!-- Set goal to "format" to auto update license header. To verify only, set goal to "check". -->
460                             <goal>check</goal>
461                         </goals>
462                         <phase>process-sources</phase>
463                     </execution>
464                 </executions>
465             </plugin>
466         </plugins>
467     </build>
468 </project>