Upversion artifacts to 1.8.0-SNAPSHOT
[aai/search-data-service.git] / search-data-service-app / pom.xml
1 <!--
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 -->
23 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
24          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
25     <modelVersion>4.0.0</modelVersion>
26
27     <parent>
28         <artifactId>search-data-service</artifactId>
29         <groupId>org.onap.aai</groupId>
30         <version>1.8.0-SNAPSHOT</version>
31     </parent>
32
33     <groupId>org.onap.aai.search-data-service</groupId>
34     <artifactId>search-data-service-app</artifactId>
35     <version>1.8.0-SNAPSHOT</version>
36     <name>AAI Search Data Service Application</name>
37
38     <properties>
39         <docker.image.name.suffix>search-data-service</docker.image.name.suffix>
40         <docker.location>${basedir}/../target</docker.location>
41         <nexusproxy>https://nexus.onap.org</nexusproxy>
42         <java.version>1.8</java.version>
43         <generatedSourceDir>${basedir}/src/main/java-gen</generatedSourceDir>
44         <checkstyle.config.location>google_checks.xml</checkstyle.config.location>
45
46         <sonar.language>java</sonar.language>
47         <sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
48         <sonar.surefire.reportsPath>${project.build.directory}/surefire-reports
49         </sonar.surefire.reportsPath>
50         <sonar.jacoco.reportPath>${project.build.directory}/coverage-reports/jacoco.exec
51         </sonar.jacoco.reportPath>
52         <sonar.jacoco.reportMissing.force.zero>false</sonar.jacoco.reportMissing.force.zero>
53         <sonar.projectVersion>${project.version}</sonar.projectVersion>
54         <jacoco.line.coverage.limit>0.58</jacoco.line.coverage.limit>
55         <spring.boot.version>2.1.12.RELEASE</spring.boot.version>
56     </properties>
57
58     <dependencyManagement>
59         <dependencies>
60             <dependency>
61                 <groupId>org.springframework.boot</groupId>
62                 <artifactId>spring-boot-starter-parent</artifactId>
63                 <version>${spring.boot.version}</version>
64                 <type>pom</type>
65                 <scope>import</scope>
66             </dependency>
67         </dependencies>
68     </dependencyManagement>
69
70     <dependencies>
71         <dependency>
72             <groupId>com.google.code.gson</groupId>
73             <artifactId>gson</artifactId>
74             <version>2.8.2</version>
75         </dependency>
76
77         <dependency>
78             <groupId>org.hamcrest</groupId>
79             <artifactId>hamcrest-library</artifactId>
80             <version>1.3</version>
81             <scope>test</scope>
82         </dependency>
83
84         <dependency>
85             <groupId>com.jayway.jsonpath</groupId>
86             <artifactId>json-path</artifactId>
87             <version>2.2.0</version>
88         </dependency>
89
90         <dependency>
91             <groupId>com.googlecode.json-simple</groupId>
92             <artifactId>json-simple</artifactId>
93             <version>1.1.1</version>
94         </dependency>
95
96         <dependency>
97             <groupId>org.dom4j</groupId>
98             <artifactId>dom4j</artifactId>
99             <version>2.1.1</version>
100             <scope>provided</scope>
101         </dependency>
102
103         <dependency>
104             <groupId>commons-io</groupId>
105             <artifactId>commons-io</artifactId>
106             <version>2.4</version>
107         </dependency>
108
109         <dependency>
110             <groupId>org.mockito</groupId>
111             <artifactId>mockito-all</artifactId>
112             <version>1.10.19</version>
113             <scope>test</scope>
114         </dependency>
115
116         <!-- Common logging framework -->
117         <dependency>
118             <groupId>org.onap.aai.logging-service</groupId>
119             <artifactId>common-logging</artifactId>
120             <version>1.5.0</version>
121         </dependency>
122
123         <dependency>
124             <groupId>org.onap.aai.logging-service</groupId>
125             <artifactId>logging-api</artifactId>
126             <version>1.5.0</version>
127         </dependency>
128
129         <dependency>
130             <groupId>org.onap.aai.logging-service</groupId>
131             <artifactId>eelf-logging</artifactId>
132             <version>1.5.0</version>
133         </dependency>
134
135         <!-- For JSON Mapping Support. -->
136         <dependency>
137             <groupId>com.fasterxml.jackson.core</groupId>
138             <artifactId>jackson-databind</artifactId>
139             <!--<version>2.7.8</version>-->
140         </dependency>
141
142         <dependency>
143             <groupId>org.apache.directory.studio</groupId>
144             <artifactId>org.apache.commons.lang</artifactId>
145             <version>2.6</version>
146         </dependency>
147
148         <dependency>
149             <groupId>radeox</groupId>
150             <artifactId>radeox</artifactId>
151             <version>0.9</version>
152         </dependency>
153
154         <dependency>
155             <groupId>com.github.fge</groupId>
156             <artifactId>json-schema-validator</artifactId>
157             <version>2.0.0</version>
158         </dependency>
159
160         <dependency>
161             <groupId>org.json</groupId>
162             <artifactId>json</artifactId>
163             <version>20180130</version>
164         </dependency>
165
166         <dependency>
167             <groupId>org.springframework.boot</groupId>
168             <artifactId>spring-boot-starter-web</artifactId>
169             <exclusions>
170                 <exclusion>
171                     <groupId>org.springframework.boot</groupId>
172                     <artifactId>spring-boot-starter-tomcat</artifactId>
173                 </exclusion>
174             </exclusions>
175         </dependency>
176
177         <dependency>
178             <groupId>org.springframework.boot</groupId>
179             <artifactId>spring-boot-starter-jetty</artifactId>
180         </dependency>
181
182         <dependency>
183             <groupId>org.springframework.boot</groupId>
184             <artifactId>spring-boot-starter</artifactId>
185             <exclusions>
186                 <exclusion>
187                     <groupId>ch.qos.logback</groupId>
188                     <artifactId>logback-classic</artifactId>
189                 </exclusion>
190             </exclusions>
191         </dependency>
192
193         <dependency>
194             <groupId>org.springframework.boot</groupId>
195             <artifactId>spring-boot-starter-jersey</artifactId>
196             <exclusions>
197                 <exclusion>
198                     <groupId>org.springframework.boot</groupId>
199                     <artifactId>spring-boot-starter-tomcat</artifactId>
200                 </exclusion>
201             </exclusions>
202         </dependency>
203
204         <dependency>
205             <groupId>org.springframework.boot</groupId>
206             <artifactId>spring-boot-starter-actuator</artifactId>
207         </dependency>
208
209         <dependency>
210             <groupId>org.springframework.boot</groupId>
211             <artifactId>spring-boot-starter-test</artifactId>
212             <scope>test</scope>
213         </dependency>
214
215         <dependency>
216             <groupId>org.springframework.boot</groupId>
217             <artifactId>spring-boot-starter-security</artifactId>
218         </dependency>
219
220         <!--Logback classic-->
221         <dependency>
222             <groupId>ch.qos.logback</groupId>
223             <artifactId>logback-classic</artifactId>
224             <version>1.2.1</version>
225         </dependency>
226
227         <dependency>
228             <groupId>ch.qos.logback</groupId>
229             <artifactId>logback-core</artifactId>
230             <version>1.2.1</version>
231         </dependency>
232
233     </dependencies>
234
235     <repositories>
236         <repository>
237             <id>central</id>
238             <name>Maven 2 repository 2</name>
239             <url>http://repo2.maven.org/maven2/</url>
240         </repository>
241         <repository>
242             <id>ecomp-releases</id>
243             <name>ECOMP Release Repository</name>
244             <url>${nexusproxy}/content/repositories/releases/</url>
245         </repository>
246         <repository>
247             <id>ecomp-snapshots</id>
248             <name>ECOMP Snapshot Repository</name>
249             <url>${nexusproxy}/content/repositories/snapshots/</url>
250         </repository>
251         <repository>
252             <id>ecomp-staging</id>
253             <name>ECOMP Staging Repository</name>
254             <url>${nexusproxy}/content/repositories/staging/</url>
255         </repository>
256     </repositories>
257     
258     <profiles>
259         <profile>
260             <id>docker</id>
261             <build>
262                 <plugins>
263                     <plugin>
264                         <groupId>org.codehaus.mojo</groupId>
265                         <artifactId>build-helper-maven-plugin</artifactId>
266                         <version>3.0.0</version>
267                     </plugin>
268                     <plugin>
269                         <artifactId>maven-assembly-plugin</artifactId>
270                         <configuration>
271                             <descriptors>
272                                 <descriptor>src/main/assembly/descriptor.xml</descriptor>
273                             </descriptors>
274                         </configuration>
275                         <executions>
276                             <execution>
277                                 <id>make-assembly</id>
278                                 <phase>package</phase>
279                                 <goals>
280                                     <goal>single</goal>
281                                 </goals>
282                             </execution>
283                         </executions>
284                     </plugin>
285                     <plugin>
286                         <groupId>org.codehaus.groovy.maven</groupId>
287                         <artifactId>gmaven-plugin</artifactId>
288                         <version>1.0</version>
289                         <executions>
290                             <execution>
291                                 <phase>prepare-package</phase>
292                                 <goals>
293                                     <goal>execute</goal>
294                                 </goals>
295                                 <configuration>
296                                     <source>
297                                         def userAaiBaseImage = session.userProperties['aai.base.image']
298                                         def userAaiCommonVersion = session.userProperties['aai.base.image.version']
299                                         if (userAaiCommonVersion != null) {
300                                             project.properties['aai.base.image.version'] = userAaiCommonVersion
301                                         }
302                                         if (userAaiBaseImage != null) {
303                                             project.properties['aai.base.image'] = userAaiBaseImage
304                                         }
305                                         log.info 'Base image flavour: ' + project.properties['aai.base.image']
306                                         log.info 'Base image version: ' + project.properties['aai.base.image.version']
307                                     </source>
308                                 </configuration>
309                             </execution>
310                         </executions>
311                     </plugin>
312                     <plugin>
313                         <groupId>io.fabric8</groupId>
314                         <artifactId>docker-maven-plugin</artifactId>
315                         <version>${docker.fabric.version}</version>
316                         <configuration>
317                             <verbose>true</verbose>
318                             <apiVersion>1.23</apiVersion>
319                             <images>
320                                 <image>
321                                     <name>${docker.push.registry}/${aai.docker.namespace}/${docker.image.name.suffix}:%l
322                                     </name>
323                                     <build>
324                                         <filter>@</filter>
325                                         <tags>
326                                             <tag>latest</tag>
327                                             <tag>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}-STAGING-latest</tag>
328                                             <tag>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}-STAGING-${maven.build.timestamp}</tag>
329                                         </tags>
330                                         <cleanup>try</cleanup>
331                                         <dockerFileDir>${project.basedir}/src/main/docker</dockerFileDir>
332                                         <assembly>
333                                             <inline>
334                                                 <fileSets>
335                                                     <fileSet>
336                                                         <directory>${aai.build.directory}</directory>
337                                                         <outputDirectory>/${project.artifactId}</outputDirectory>
338                                                     </fileSet>
339                                                 </fileSets>
340                                             </inline>
341                                         </assembly>
342                                     </build>
343                                 </image>
344                             </images>
345                         </configuration>
346                         <executions>
347                             <execution>
348                                 <id>clean-images</id>
349                                 <phase>clean</phase>
350                                 <goals>
351                                     <goal>remove</goal>
352                                 </goals>
353                                 <configuration>
354                                     <removeAll>true</removeAll>
355                                 </configuration>
356                             </execution>
357                             <execution>
358                                 <id>generate-images</id>
359                                 <phase>package</phase>
360                                 <goals>
361                                     <goal>build</goal>
362                                 </goals>
363                             </execution>
364                             <execution>
365                                 <id>push-images</id>
366                                 <phase>deploy</phase>
367                                 <goals>
368                                     <goal>push</goal>
369                                 </goals>
370                             </execution>
371                         </executions>
372                     </plugin>
373                 </plugins>
374             </build>
375         </profile>
376     </profiles>
377     <build>
378         <finalName>${project.artifactId}</finalName>
379         <plugins>
380             <plugin>
381                 <groupId>org.springframework.boot</groupId>
382                 <artifactId>spring-boot-maven-plugin</artifactId>
383                 <executions>
384                     <execution>
385                         <goals>
386                             <goal>repackage</goal>
387                         </goals>
388                     </execution>
389                 </executions>
390             </plugin>
391             <!-- Checkstyle plugin - used to report on compliance with -->
392             <!-- the Google style guide. -->
393             <plugin>
394                 <groupId>org.apache.maven.plugins</groupId>
395                 <artifactId>maven-site-plugin</artifactId>
396                 <configuration>
397                     <reportPlugins>
398                         <plugin>
399                             <groupId>org.apache.maven.plugins</groupId>
400                             <artifactId>maven-checkstyle-plugin</artifactId>
401                             <version>2.17</version>
402                             <reportSets>
403                                 <reportSet>
404                                     <reports>
405                                         <report>checkstyle</report>
406                                     </reports>
407                                 </reportSet>
408                             </reportSets>
409                         </plugin>
410                     </reportPlugins>
411                 </configuration>
412             </plugin>
413             <!-- This plugin overrides the compiler settings to use java 1.8 -->
414             <plugin>
415                 <groupId>org.apache.maven.plugins</groupId>
416                 <artifactId>maven-compiler-plugin</artifactId>
417                 <version>3.1</version>
418                 <configuration>
419                     <compilerId>groovy-eclipse-compiler</compilerId>
420                     <verbose>true</verbose>
421                     <source>1.8</source>
422                     <target>1.8</target>
423                 </configuration>
424                 <dependencies>
425                     <dependency>
426                         <groupId>org.codehaus.groovy</groupId>
427                         <artifactId>groovy-eclipse-compiler</artifactId>
428                         <version>2.9.0-01</version>
429                     </dependency>
430                     <dependency>
431                         <groupId>org.codehaus.groovy</groupId>
432                         <artifactId>groovy-eclipse-batch</artifactId>
433                         <version>2.3.4-01</version>
434                     </dependency>
435                 </dependencies>
436             </plugin>
437
438             <!-- This plugin is used to generate Java POJO's from json format schema
439                 file. -->
440             <plugin>
441                 <groupId>org.jsonschema2pojo</groupId>
442                 <artifactId>jsonschema2pojo-maven-plugin</artifactId>
443                 <version>0.4.26</version>
444                 <configuration>
445                     <addCompileSourceRoot>true</addCompileSourceRoot>
446                     <sourceDirectory>${basedir}/src/main/resources/json/schema</sourceDirectory>
447                     <outputDirectory>${generatedSourceDir}</outputDirectory>
448                     <targetPackage>org.onap.aai.sa.rest</targetPackage>
449                 </configuration>
450                 <executions>
451                     <execution>
452                         <goals>
453                             <goal>generate</goal>
454                         </goals>
455                     </execution>
456                 </executions>
457             </plugin>
458
459             <plugin>
460                 <groupId>org.apache.maven.plugins</groupId>
461                 <artifactId>maven-resources-plugin</artifactId>
462                 <version>2.7</version>
463                 <executions>
464                     <execution>
465                         <id>copy-docker-file</id>
466                         <phase>package</phase>
467                         <goals>
468                             <goal>copy-resources</goal>
469                         </goals>
470                         <configuration>
471                             <outputDirectory>${basedir}/../target</outputDirectory>
472                             <overwrite>true</overwrite>
473                             <resources>
474                                 <resource>
475                                     <directory>${basedir}/src/main/docker</directory>
476                                     <filtering>true</filtering>
477                                     <includes>
478                                         <include>**/*</include>
479                                     </includes>
480                                 </resource>
481                                 <resource>
482                                     <directory>${basedir}</directory>
483                                     <filtering>true</filtering>
484                                     <includes>
485                                         <include>bundleconfig-local/**</include>
486                                     </includes>
487                                 </resource>
488                                 <resource>
489                                     <directory>${basedir}/src/main/bin/</directory>
490                                 </resource>
491                             </resources>
492                         </configuration>
493                     </execution>
494                 </executions>
495             </plugin>
496
497             <!-- license plugin -->
498             <plugin>
499                 <groupId>com.mycila</groupId>
500                 <artifactId>license-maven-plugin</artifactId>
501                 <version>3.0</version>
502                 <configuration>
503                     <header>License.txt</header>
504                     <includes>
505                         <include>src/main/java/**</include>
506                         <include>src/test/java/**</include>
507                         <include>pom.xml</include>
508                     </includes>
509                     <skipExistingHeaders>true</skipExistingHeaders>
510                 </configuration>
511                 <executions>
512                     <execution>
513                         <goals>
514                             <goal>check</goal>
515                         </goals>
516                         <phase>validate</phase>
517                     </execution>
518                 </executions>
519             </plugin>
520             <plugin>
521                 <groupId>org.apache.maven.plugins</groupId>
522                 <artifactId>maven-deploy-plugin</artifactId>
523                 <configuration>
524                     <skip>true</skip>
525                 </configuration>
526             </plugin>
527             <plugin>
528                 <groupId>org.codehaus.mojo</groupId>
529                 <artifactId>sonar-maven-plugin</artifactId>
530                 <version>3.2</version>
531             </plugin>
532             <!-- jacoco-maven-plugin provides the basic report creation during unit testing, such as code-coverage, sonar, etc. -->
533             <plugin>
534                 <groupId>org.jacoco</groupId>
535                 <artifactId>jacoco-maven-plugin</artifactId>
536                 <version>0.7.7.201606060606</version>
537                 <executions>
538                     <!-- Prepares the property pointing to the JaCoCo runtime agent which
539                          is passed as VM argument when Maven the Surefire plugin is executed. -->
540                     <execution>
541                         <id>pre-unit-test</id>
542                         <goals>
543                             <goal>prepare-agent</goal>
544                         </goals>
545                         <configuration>
546                             <!-- Sets the path to the file which contains the execution data. -->
547                             <destFile>${sonar.jacoco.reportPath}</destFile>
548                             <propertyName>surefireArgLine</propertyName>
549                             <dumpOnExit>true</dumpOnExit>
550                         </configuration>
551                     </execution>
552                     <!-- Ensures that the code coverage report for unit tests is created
553                          after unit tests have been run. -->
554                     <execution>
555                         <id>post-unit-test</id>
556                         <phase>test</phase>
557                         <goals>
558                             <goal>report</goal>
559                         </goals>
560                         <configuration>
561                             <!-- Sets the path to the file which contains the execution data. -->
562                             <dataFile>${sonar.jacoco.reportPath}</dataFile>
563                             <!-- Sets the output directory for the code coverage report. -->
564                             <outputDirectory>${jacoco.path}</outputDirectory>
565                         </configuration>
566                     </execution>
567                     <!-- Prepares the property pointing to the JaCoCo runtime agent which
568                          is passed as VM argument when Maven the Failsafe plugin is executed. -->
569                     <execution>
570                         <id>pre-integration-test</id>
571                         <phase>pre-integration-test</phase>
572                         <goals>
573                             <goal>prepare-agent</goal>
574                         </goals>
575                         <configuration>
576                             <!-- Sets the path to the file which contains the execution data. -->
577                             <destFile>${sonar.jacoco.itReportPath}</destFile>
578                             <!-- Sets the name of the property containing the settings for JaCoCo
579                                  runtime agent. -->
580                             <propertyName>failsafeArgLine</propertyName>
581                         </configuration>
582                     </execution>
583                     <!-- Ensures that the code coverage report for integration tests after
584                          integration tests have been run. -->
585                     <execution>
586                         <id>post-integration-test</id>
587                         <phase>post-integration-test</phase>
588                         <goals>
589                             <goal>report</goal>
590                         </goals>
591                         <configuration>
592                             <!-- Sets the path to the file which contains the execution data. -->
593                             <dataFile>${sonar.jacoco.itReportPath}/</dataFile>
594                             <!-- Sets the output directory for the code coverage report. -->
595                             <outputDirectory>${jacoco.itPath}</outputDirectory>
596                         </configuration>
597                     </execution>
598                     <execution>
599                         <id>default-check</id>
600                         <goals>
601                             <goal>check</goal>
602                         </goals>
603                         <configuration>
604                             <dataFile>${project.build.directory}/coverage-reports/jacoco.exec</dataFile>
605                             <rules>
606                                 <!--  implementation is needed only for Maven 2  -->
607                                 <rule implementation="org.jacoco.maven.RuleConfiguration">
608                                     <element>BUNDLE</element>
609                                     <limits>
610                                         <limit implementation="org.jacoco.report.check.Limit">
611                                             <counter>LINE</counter>
612                                             <value>COVEREDRATIO</value>
613                                             <minimum>${jacoco.line.coverage.limit}</minimum>
614                                         </limit>
615                                     </limits>
616                                 </rule>
617                             </rules>
618                         </configuration>
619                     </execution>
620
621                     <execution>
622                         <id>jacoco-initialize-unit-tests</id>
623                         <goals>
624                             <goal>prepare-agent</goal>
625                         </goals>
626                         <configuration>
627                             <destFile>${project.build.directory}/coverage-reports/jacoco.exec
628                             </destFile>
629                             <!-- <append>true</append> -->
630                         </configuration>
631                     </execution>
632                 </executions>
633             </plugin>
634             <!-- This plugin adds the generated sources directory to the clean lifecycle
635                 so that automatically generated code will get cleaned up properly. -->
636             <plugin>
637                 <artifactId>maven-clean-plugin</artifactId>
638                 <version>3.0.0</version>
639                 <configuration>
640                     <filesets>
641                         <fileset>
642                             <directory>${generatedSourceDir}</directory>
643                         </fileset>
644                     </filesets>
645                 </configuration>
646             </plugin>
647
648             <plugin>
649                 <artifactId>maven-resources-plugin</artifactId>
650                 <version>3.0.2</version>
651                 <executions>
652                     <execution>
653                         <id>copy-files-on-build</id>
654                         <phase>install</phase>
655                         <goals>
656                             <goal>copy-resources</goal>
657                         </goals>
658                         <configuration>
659                             <outputDirectory>${basedir}/../target</outputDirectory>
660                             <resources>
661                                 <resource>
662                                     <directory>${basedir}/target</directory>
663                                        <include>*.jar</include>
664                                     <filtering>false</filtering>
665                                 </resource>
666                             </resources>
667                         </configuration>
668                     </execution>
669                 </executions>
670             </plugin>
671
672         </plugins>
673     </build>
674     <distributionManagement>
675         <repository>
676             <id>ecomp-releases</id>
677             <name>ECOMP Release Repository</name>
678             <url>${nexusproxy}/content/repositories/releases/</url>
679         </repository>
680         <snapshotRepository>
681             <id>ecomp-snapshots</id>
682             <name>ECOMP Snapshot Repository</name>
683             <url>${nexusproxy}/content/repositories/snapshots/</url>
684         </snapshotRepository>
685         <site>
686             <id>ecomp-javadoc</id>
687             <url>dav:https://ecomp-nexus:8443/repository/aai/search-data-service-javadoc/${project.version}</url>
688         </site>
689     </distributionManagement>
690 </project>