Upversion artifacts to 1.8.0-SNAPSHOT
[aai/data-router.git] / pom.xml
1 <!--
2 ============LICENSE_START=======================================================
3 org.onap.aai
4 ================================================================================
5 Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
6 Copyright © 2017-2018 Amdocs
7 ================================================================================
8 Licensed under the Apache License, Version 2.0 (the "License");
9 you may not use this file except in compliance with the License.
10 You may obtain a copy of the License at
11
12       http://www.apache.org/licenses/LICENSE-2.0
13
14 Unless required by applicable law or agreed to in writing, software
15 distributed under the License is distributed on an "AS IS" BASIS,
16 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 See the License for the specific language governing permissions and
18 limitations under the License.
19 ============LICENSE_END=========================================================
20 -->
21 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
22          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
23     <modelVersion>4.0.0</modelVersion>
24
25    <parent>
26       <groupId>org.springframework.boot</groupId>
27       <artifactId>spring-boot-starter-parent</artifactId>
28       <version>2.1.12.RELEASE</version>
29       <relativePath />
30    </parent>
31    <groupId>org.onap.aai.data-router</groupId>
32    <artifactId>data-router</artifactId>
33    <version>1.6.1-SNAPSHOT</version>
34    <name>aai-data-router</name>
35
36     <properties>
37         <java.version>1.8</java.version>
38         <camel-spring-boot.version>2.22.5</camel-spring-boot.version>
39         <absoluteDistFilesRoot>/appl/${project.artifactId}</absoluteDistFilesRoot>
40         <!-- For NO Versioning, REMOVE the /${project.version} from the <distFilesRoot>
41            property, below. PLEASE, NOTE: If your ${project.version} is a "-SNAPSHOT"
42            version, THIS will be used as your directory structure. If you do NOT want
43            this, simply remove the "-SNAPSHOT" from your <version> declaration at the
44            top of pom.xml -->
45         <distFilesRoot>/appl/${project.artifactId}/${project.version}</distFilesRoot>
46         <!-- For SOA Cloud Installation -->
47         <installOwnerUser>aaiadmin</installOwnerUser>
48         <installOwnerGroup>aaiadmin</installOwnerGroup>
49         <ownerManagementGroup>com.att.csid.lab</ownerManagementGroup>
50         <version.aai-schema>1.6.0</version.aai-schema>
51
52         <!-- docker related properties -->
53         <docker.fabric.version>0.28.0</docker.fabric.version>
54         <aai.docker.version>1.0.0</aai.docker.version>
55         <aai.build.directory>${project.build.directory}/${project.artifactId}-build/
56         </aai.build.directory>
57         <aai.docker.namespace>onap</aai.docker.namespace>
58         <aai.base.image>alpine</aai.base.image>
59         <aai.base.image.version>1.6.0</aai.base.image.version>
60
61         <!-- Port Selection. A value of 0 will allow for dynamic port selection.
62            For local testing, you may choose to hardcode this value to something like
63            8080 -->
64         <serverPort>0</serverPort>
65         <sslport>9502</sslport>
66
67         <testRouteOffer>workstation</testRouteOffer>
68         <testEnv>DEV</testEnv>
69         <checkstyle.config.location>google_checks.xml</checkstyle.config.location>
70         <nexusproxy>https://nexus.onap.org</nexusproxy>
71         <!-- Sonar Properties -->
72         <sonar.language>java</sonar.language>
73         <sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
74         <sonar.surefire.reportsPath>${project.build.directory}/surefire-reports</sonar.surefire.reportsPath>
75         <sonar.jacoco.reportPath>${project.build.directory}/coverage-reports/jacoco.exec</sonar.jacoco.reportPath>
76         <sonar.jacoco.reportMissing.force.zero>false</sonar.jacoco.reportMissing.force.zero>
77         <sonar.projectVersion>${project.version}</sonar.projectVersion>
78         <logback.version>1.2.3</logback.version>
79         <version.com.google.guava>16.0.1</version.com.google.guava>
80         <shemaUnpackVersion>onap</shemaUnpackVersion>
81         <jacoco.line.coverage.limit>0.58</jacoco.line.coverage.limit>
82         <!-- This will be used for the docker images as the default format of maven build has issues -->
83         <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
84     </properties>
85
86     <dependencies>
87         <dependency>
88             <groupId>ch.qos.logback</groupId>
89             <artifactId>logback-core</artifactId>
90             <version>${logback.version}</version>
91         </dependency>
92         <dependency>
93             <groupId>ch.qos.logback</groupId>
94             <artifactId>logback-classic</artifactId>
95             <version>${logback.version}</version>
96         </dependency>
97         <dependency>
98             <groupId>ch.qos.logback</groupId>
99             <artifactId>logback-access</artifactId>
100             <version>${logback.version}</version>
101         </dependency>
102         <dependency>
103             <groupId>org.apache.camel</groupId>
104             <artifactId>camel-spring-boot-starter</artifactId>
105         </dependency>
106         <dependency>
107             <groupId>org.apache.camel</groupId>
108             <artifactId>camel-core</artifactId>
109             <version>${camel-spring-boot.version}</version>
110         </dependency>
111         <dependency>
112             <groupId>org.apache.camel</groupId>
113             <artifactId>camel-servlet-starter</artifactId>
114         </dependency>
115         <dependency>
116             <groupId>org.apache.camel</groupId>
117             <artifactId>camel-cxf</artifactId>
118             <version>${camel-spring-boot.version}</version>
119         </dependency>
120         <!-- Spring dependencies -->
121         <dependency>
122             <groupId>org.springframework.boot</groupId>
123             <artifactId>spring-boot-starter-web</artifactId>
124             <exclusions>
125                 <exclusion>
126                     <groupId>org.springframework.boot</groupId>
127                     <artifactId>spring-boot-starter-tomcat</artifactId>
128                 </exclusion>
129             </exclusions>
130         </dependency>
131         <dependency>
132             <groupId>org.springframework.boot</groupId>
133             <artifactId>spring-boot-starter-jetty</artifactId>
134         </dependency>
135         <dependency>
136             <groupId>org.springframework.boot</groupId>
137             <artifactId>spring-boot-starter</artifactId>
138         </dependency>
139         <dependency>
140             <groupId>org.springframework.boot</groupId>
141             <artifactId>spring-boot-starter-actuator</artifactId>
142         </dependency>
143         <dependency>
144             <groupId>javax.ws.rs</groupId>
145             <artifactId>javax.ws.rs-api</artifactId>
146             <version>2.1</version>
147         </dependency>
148         <dependency>
149             <groupId>org.powermock</groupId>
150             <artifactId>powermock-module-junit4</artifactId>
151             <version>1.6.2</version>
152             <scope>test</scope>
153         </dependency>
154
155         <dependency>
156             <groupId>org.assertj</groupId>
157             <artifactId>assertj-core</artifactId>
158             <version>3.10.0</version>
159             <scope>test</scope>
160         </dependency>
161         <dependency>
162             <groupId>org.powermock</groupId>
163             <artifactId>powermock-api-mockito</artifactId>
164             <version>1.6.2</version>
165             <scope>test</scope>
166         </dependency>
167
168         <dependency>
169             <groupId>org.powermock</groupId>
170             <artifactId>powermock-module-javaagent</artifactId>
171             <version>1.6.2</version>
172             <scope>test</scope>
173         </dependency>
174
175         <dependency>
176             <groupId>org.powermock</groupId>
177             <artifactId>powermock-module-junit4-rule-agent</artifactId>
178             <version>1.6.2</version>
179             <scope>test</scope>
180         </dependency>
181         <dependency>
182             <groupId>org.dom4j</groupId>
183             <artifactId>dom4j</artifactId>
184             <scope>provided</scope>
185             <version>2.1.1</version>
186         </dependency>
187
188         <dependency>
189             <groupId>com.att.aft</groupId>
190             <artifactId>dme2</artifactId>
191             <version>3.1.200-oss</version>
192             <scope>provided</scope>
193         </dependency>
194
195         <dependency>
196             <groupId>org.onap.aai.router-core</groupId>
197             <artifactId>router-core</artifactId>
198             <version>1.5.0</version>
199         </dependency>
200
201         <dependency>
202             <groupId>org.json</groupId>
203             <artifactId>json</artifactId>
204         </dependency>
205
206         <dependency>
207             <groupId>com.google.code.gson</groupId>
208             <artifactId>gson</artifactId>
209             <version>2.6.2</version>
210         </dependency>
211
212         <dependency>
213             <groupId>org.eclipse.persistence</groupId>
214             <artifactId>eclipselink</artifactId>
215             <version>2.6.2</version>
216         </dependency>
217
218         <dependency>
219             <groupId>org.onap.aai.logging-service</groupId>
220             <artifactId>common-logging</artifactId>
221             <version>1.5.0</version>
222         </dependency>
223
224         <dependency>
225             <groupId>org.onap.aai.logging-service</groupId>
226             <artifactId>logging-api</artifactId>
227             <version>1.5.0</version>
228         </dependency>
229
230         <dependency>
231             <groupId>org.onap.aai</groupId>
232             <artifactId>rest-client</artifactId>
233             <version>1.2.1</version>
234         </dependency>
235
236         <dependency>
237             <groupId>com.google.guava</groupId>
238             <artifactId>guava</artifactId>
239             <version>${version.com.google.guava}</version>
240         </dependency>
241
242     </dependencies>
243
244     <profiles>
245         <profile>
246             <id>docker</id>
247             <build>
248                 <plugins>
249                     <plugin>
250                         <groupId>org.codehaus.mojo</groupId>
251                         <artifactId>build-helper-maven-plugin</artifactId>
252                         <version>3.0.0</version>
253                         <executions>
254                             <execution>
255                                 <phase>pre-clean</phase>
256                                 <id>parse-version</id>
257                                 <goals>
258                                     <goal>parse-version</goal>
259                                 </goals>
260                             </execution>
261                         </executions>
262                     </plugin>
263                     <plugin>
264                         <groupId>org.codehaus.groovy.maven</groupId>
265                         <artifactId>gmaven-plugin</artifactId>
266                         <version>1.0</version>
267                         <executions>
268                             <execution>
269                                 <phase>pre-clean</phase>
270                                 <goals>
271                                     <goal>execute</goal>
272                                 </goals>
273                                 <configuration>
274                                     <source>
275                                         def userAaiBaseImage = session.userProperties['aai.base.image']
276                                         def userAaiCommonVersion = session.userProperties['aai.base.image.version']
277                                         if (userAaiCommonVersion != null) {
278                                             project.properties['aai.base.image.version'] = userAaiCommonVersion
279                                         }
280                                         if (userAaiBaseImage != null) {
281                                             project.properties['aai.base.image'] = userAaiBaseImage
282                                         }
283                                         log.info 'Base image flavour: ' + project.properties['aai.base.image']
284                                         log.info 'Base image version: ' + project.properties['aai.base.image.version']
285                                     </source>
286                                 </configuration>
287                             </execution>
288                         </executions>
289                     </plugin>
290                     <plugin>
291                         <groupId>io.fabric8</groupId>
292                         <artifactId>docker-maven-plugin</artifactId>
293                         <version>${docker.fabric.version}</version>
294                         <configuration>
295                             <verbose>true</verbose>
296                             <apiVersion>1.23</apiVersion>
297                             <images>
298                                 <image>
299                                     <name>${docker.push.registry}/${aai.docker.namespace}/${project.artifactId}:%l
300                                     </name>
301                                     <build>
302                                         <filter>@</filter>
303                                         <tags>
304                                             <tag>latest</tag>
305                                             <tag>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}-STAGING-latest</tag>
306                                             <tag>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}-STAGING-${maven.build.timestamp}</tag>
307                                         </tags>
308                                         <cleanup>try</cleanup>
309                                         <dockerFileDir>${project.basedir}/src/main/docker</dockerFileDir>
310                                         <assembly>
311                                             <inline>
312                                                 <fileSets>
313                                                     <fileSet>
314                                                         <directory>${aai.build.directory}</directory>
315                                                         <outputDirectory>/${project.artifactId}</outputDirectory>
316                                                     </fileSet>
317                                                 </fileSets>
318                                             </inline>
319                                         </assembly>
320                                     </build>
321                                 </image>
322                             </images>
323                         </configuration>
324                         <executions>
325                             <execution>
326                                 <id>clean-images</id>
327                                 <phase>pre-clean</phase>
328                                 <goals>
329                                     <goal>remove</goal>
330                                 </goals>
331                                 <configuration>
332                                     <removeAll>true</removeAll>
333                                 </configuration>
334                             </execution>
335                             <execution>
336                                 <id>generate-images</id>
337                                 <phase>package</phase>
338                                 <goals>
339                                     <goal>build</goal>
340                                 </goals>
341                             </execution>
342                             <execution>
343                                 <id>push-images</id>
344                                 <phase>deploy</phase>
345                                 <goals>
346                                     <goal>push</goal>
347                                 </goals>
348                             </execution>
349                         </executions>
350                     </plugin>
351                 </plugins>
352             </build>
353         </profile>
354     </profiles>
355
356     <build>
357         <finalName>${project.artifactId}</finalName>
358         <plugins>
359             <!-- jacoco-maven-plugin provides the basic report creation during unit testing, such as code-coverage, sonar, etc. -->
360             <plugin>
361                 <groupId>org.jacoco</groupId>
362                 <artifactId>jacoco-maven-plugin</artifactId>
363                 <executions>
364                     <!-- Prepares the property pointing to the JaCoCo runtime agent which
365                          is passed as VM argument when Maven the Surefire plugin is executed. -->
366                     <execution>
367                         <id>pre-unit-test</id>
368                         <goals>
369                             <goal>prepare-agent</goal>
370                         </goals>
371                         <configuration>
372                             <!-- Sets the path to the file which contains the execution data. -->
373                             <destFile>${sonar.jacoco.reportPath}</destFile>
374                             <propertyName>surefireArgLine</propertyName>
375                         </configuration>
376                     </execution>
377                     <!-- Ensures that the code coverage report for unit tests is created
378                          after unit tests have been run. -->
379                     <execution>
380                         <id>post-unit-test</id>
381                         <phase>test</phase>
382                         <goals>
383                             <goal>report</goal>
384                         </goals>
385                         <configuration>
386                             <!-- Sets the path to the file which contains the execution data. -->
387                             <dataFile>${sonar.jacoco.reportPath}</dataFile>
388                             <!-- Sets the output directory for the code coverage report. -->
389                             <outputDirectory>${jacoco.path}</outputDirectory>
390                         </configuration>
391                     </execution>
392                     <!-- Prepares the property pointing to the JaCoCo runtime agent which
393                          is passed as VM argument when Maven the Failsafe plugin is executed. -->
394                     <execution>
395                         <id>pre-integration-test</id>
396                         <phase>pre-integration-test</phase>
397                         <goals>
398                             <goal>prepare-agent</goal>
399                         </goals>
400                         <configuration>
401                             <!-- Sets the path to the file which contains the execution data. -->
402                             <destFile>${sonar.jacoco.itReportPath}</destFile>
403                             <!-- Sets the name of the property containing the settings for JaCoCo
404                                  runtime agent. -->
405                             <propertyName>failsafeArgLine</propertyName>
406                         </configuration>
407                     </execution>
408                     <!-- Ensures that the code coverage report for integration tests after
409                          integration tests have been run. -->
410                     <execution>
411                         <id>post-integration-test</id>
412                         <phase>post-integration-test</phase>
413                         <goals>
414                             <goal>report</goal>
415                         </goals>
416                         <configuration>
417                             <!-- Sets the path to the file which contains the execution data. -->
418                             <dataFile>${sonar.jacoco.itReportPath}/</dataFile>
419                             <!-- Sets the output directory for the code coverage report. -->
420                             <outputDirectory>${jacoco.itPath}</outputDirectory>
421                         </configuration>
422                     </execution>
423                 </executions>
424             </plugin>
425             <!-- Checkstyle plugin - used to report on compliance with -->
426             <!-- the Google style guide. -->
427             <plugin>
428                 <groupId>org.apache.maven.plugins</groupId>
429                 <artifactId>maven-site-plugin</artifactId>
430                 <version>3.3</version>
431                 <configuration>
432                     <reportPlugins>
433                         <plugin>
434                             <groupId>org.apache.maven.plugins</groupId>
435                             <artifactId>maven-checkstyle-plugin</artifactId>
436                             <version>2.17</version>
437                             <reportSets>
438                                 <reportSet>
439                                     <reports>
440                                         <report>checkstyle</report>
441                                     </reports>
442                                 </reportSet>
443                             </reportSets>
444                         </plugin>
445                     </reportPlugins>
446                 </configuration>
447             </plugin>
448
449             <plugin>
450                 <groupId>org.springframework.boot</groupId>
451                 <artifactId>spring-boot-maven-plugin</artifactId>
452             </plugin>
453
454             <plugin>
455                 <artifactId>maven-assembly-plugin</artifactId>
456                 <configuration>
457                     <descriptors>
458                         <descriptor>src/main/assembly/descriptor.xml</descriptor>
459                     </descriptors>
460                 </configuration>
461                 <executions>
462                     <execution>
463                         <id>make-assembly</id>
464                         <phase>package</phase>
465                         <goals>
466                             <goal>single</goal>
467                         </goals>
468                     </execution>
469                 </executions>
470             </plugin>
471
472             <plugin>
473                 <artifactId>maven-surefire-plugin</artifactId>
474                 <version>2.21.0</version>
475                 <configuration>
476                     <systemPropertyVariables>
477                         <OXM_LOCATION>${aai.build.directory}</OXM_LOCATION>
478                         <CONFIG_HOME>${project.basedir}/src/test/resources/config</CONFIG_HOME>
479                         <SERVICE_BEANS>${project.basedir}/src/test/resources/spring-beans</SERVICE_BEANS>
480                         <testShemaUnpackVersion>${shemaUnpackVersion}</testShemaUnpackVersion>
481                     </systemPropertyVariables>
482                 </configuration>
483             </plugin>
484
485             <plugin>
486                 <groupId>org.apache.maven.plugins</groupId>
487                 <artifactId>maven-dependency-plugin</artifactId>
488                 <executions>
489                     <execution>
490                         <id>unpack</id>
491                         <phase>initialize</phase>
492                         <goals>
493                             <goal>unpack</goal>
494                         </goals>
495                         <configuration>
496                             <artifactItems>
497                                 <artifactItem>
498                                     <groupId>org.onap.aai.schema-service</groupId>
499                                     <artifactId>aai-schema</artifactId>
500                                     <version>${version.aai-schema}</version>
501                                     <type>jar</type>
502                                     <includes>/${shemaUnpackVersion}/oxm/</includes>
503                                     <outputDirectory>${aai.build.directory}</outputDirectory>
504                                 </artifactItem>
505                             </artifactItems>
506                         </configuration>
507                     </execution>
508                 </executions>
509             </plugin>
510             <!-- license plugin -->
511             <!-- Uncomment this to add a license header to every source file
512      <plugin>
513        <groupId>com.mycila</groupId>
514        <artifactId>license-maven-plugin</artifactId>
515        <version>3.0</version>
516        <configuration>
517          <header>License.txt</header>
518          <includes>
519            <include>src/main/java/**</include>
520            <include>src/test/java/**</include>
521          </includes>
522        </configuration>
523        <executions>
524          <execution>
525            <goals>
526              <goal>format</goal>
527            </goals>
528            <phase>process-sources</phase>
529          </execution>
530        </executions>
531      </plugin> -->
532             <plugin>
533                 <groupId>org.apache.maven.plugins</groupId>
534                 <artifactId>maven-deploy-plugin</artifactId>
535             </plugin>
536             <plugin>
537                 <groupId>org.codehaus.mojo</groupId>
538                 <artifactId>sonar-maven-plugin</artifactId>
539                 <version>3.2</version>
540             </plugin>
541             <plugin>
542                 <groupId>org.jacoco</groupId>
543                 <artifactId>jacoco-maven-plugin</artifactId>
544                 <version>0.7.7.201606060606</version>
545                 <configuration>
546                     <dumpOnExit>true</dumpOnExit>
547                 </configuration>
548                 <executions>
549                     <execution>
550                         <id>jacoco-initialize-unit-tests</id>
551                         <goals>
552                             <goal>prepare-agent</goal>
553                         </goals>
554                         <configuration>
555                             <destFile>${project.build.directory}/coverage-reports/jacoco.exec
556                             </destFile>
557                         </configuration>
558                     </execution>
559                     <execution>
560                         <id>default-check</id>
561                         <goals>
562                             <goal>check</goal>
563                         </goals>
564                         <configuration>
565                             <dataFile>${project.build.directory}/coverage-reports/jacoco.exec</dataFile>
566                             <rules>
567                                 <!--  implementation is needed only for Maven 2  -->
568                                 <rule implementation="org.jacoco.maven.RuleConfiguration">
569                                     <element>BUNDLE</element>
570                                     <limits>
571                                         <limit implementation="org.jacoco.report.check.Limit">
572                                             <counter>LINE</counter>
573                                             <value>COVEREDRATIO</value>
574                                             <minimum>${jacoco.line.coverage.limit}</minimum>
575                                         </limit>
576                                     </limits>
577                                 </rule>
578                             </rules>
579                         </configuration>
580                     </execution>
581                 </executions>
582             </plugin>
583
584         </plugins>
585     </build>
586
587
588     <dependencyManagement>
589         <dependencies>
590             <dependency>
591                 <groupId>org.apache.camel</groupId>
592                 <artifactId>camel-spring-boot-dependencies</artifactId>
593                 <version>${camel-spring-boot.version}</version>
594                 <type>pom</type>
595                 <scope>import</scope>
596             </dependency>
597             <dependency>
598                 <groupId>org.apache.httpcomponents</groupId>
599                 <artifactId>httpclient</artifactId>
600                 <version>4.5.5</version>
601             </dependency>
602             <dependency>
603                 <groupId>org.apache.httpcomponents</groupId>
604                 <artifactId>httpcore</artifactId>
605                 <version>4.4.1</version>
606             </dependency>
607             <dependency>
608                 <groupId>org.json</groupId>
609                 <artifactId>json</artifactId>
610                 <version>20131018</version>
611             </dependency>
612         </dependencies>
613     </dependencyManagement>
614     <distributionManagement>
615         <repository>
616             <id>ecomp-releases</id>
617             <name>ECOMP Release Repository</name>
618             <url>${nexusproxy}/content/repositories/releases/</url>
619         </repository>
620         <snapshotRepository>
621             <id>ecomp-snapshots</id>
622             <name>ECOMP Snapshot Repository</name>
623             <url>${nexusproxy}/content/repositories/snapshots/</url>
624         </snapshotRepository>
625     </distributionManagement>
626 </project>