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.3.1.RELEASE</version>
29       <relativePath />
30    </parent>
31    <groupId>org.onap.aai.data-router</groupId>
32    <artifactId>data-router</artifactId>
33    <version>1.8.0-SNAPSHOT</version>
34    <name>aai-data-router</name>
35
36     <properties>
37         <java.version>1.8</java.version>
38         <camel-spring-boot.version>3.4.0</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.7.9</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.springboot</groupId>
104             <artifactId>camel-spring-boot-starter</artifactId>
105             <version>${camel-spring-boot.version}</version>
106         </dependency>
107         <dependency>
108             <groupId>org.apache.camel</groupId>
109             <artifactId>camel-core</artifactId>
110             <version>${camel-spring-boot.version}</version>
111         </dependency>
112         <dependency>
113             <groupId>org.apache.camel.springboot</groupId>
114             <artifactId>camel-servlet-starter</artifactId>
115             <version>${camel-spring-boot.version}</version>
116         </dependency>
117         <dependency>
118             <groupId>org.apache.camel</groupId>
119             <artifactId>camel-cxf</artifactId>
120             <version>${camel-spring-boot.version}</version>
121         </dependency>
122         <!-- Spring dependencies -->
123         <dependency>
124             <groupId>org.springframework.boot</groupId>
125             <artifactId>spring-boot-starter-web</artifactId>
126             <exclusions>
127                 <exclusion>
128                     <groupId>org.springframework.boot</groupId>
129                     <artifactId>spring-boot-starter-tomcat</artifactId>
130                 </exclusion>
131             </exclusions>
132         </dependency>
133         <dependency>
134             <groupId>org.springframework.boot</groupId>
135             <artifactId>spring-boot-starter-jetty</artifactId>
136         </dependency>
137         <dependency>
138             <groupId>org.springframework.boot</groupId>
139             <artifactId>spring-boot-starter</artifactId>
140         </dependency>
141         <dependency>
142             <groupId>org.springframework.boot</groupId>
143             <artifactId>spring-boot-starter-actuator</artifactId>
144         </dependency>
145         <dependency>
146             <groupId>javax.ws.rs</groupId>
147             <artifactId>javax.ws.rs-api</artifactId>
148             <version>2.1</version>
149         </dependency>
150         <dependency>
151             <groupId>org.powermock</groupId>
152             <artifactId>powermock-module-junit4</artifactId>
153             <version>1.6.2</version>
154             <scope>test</scope>
155         </dependency>
156
157         <dependency>
158             <groupId>org.assertj</groupId>
159             <artifactId>assertj-core</artifactId>
160             <version>3.10.0</version>
161             <scope>test</scope>
162         </dependency>
163         <dependency>
164             <groupId>org.powermock</groupId>
165             <artifactId>powermock-api-mockito</artifactId>
166             <version>1.6.2</version>
167             <scope>test</scope>
168         </dependency>
169
170         <dependency>
171             <groupId>org.powermock</groupId>
172             <artifactId>powermock-module-javaagent</artifactId>
173             <version>1.6.2</version>
174             <scope>test</scope>
175         </dependency>
176
177         <dependency>
178             <groupId>org.powermock</groupId>
179             <artifactId>powermock-module-junit4-rule-agent</artifactId>
180             <version>1.6.2</version>
181             <scope>test</scope>
182         </dependency>
183         <dependency>
184             <groupId>org.dom4j</groupId>
185             <artifactId>dom4j</artifactId>
186             <scope>provided</scope>
187             <version>2.1.1</version>
188         </dependency>
189
190         <dependency>
191             <groupId>com.att.aft</groupId>
192             <artifactId>dme2</artifactId>
193             <version>3.1.200-oss</version>
194             <scope>provided</scope>
195         </dependency>
196
197         <dependency>
198             <groupId>org.onap.aai.router-core</groupId>
199             <artifactId>router-core</artifactId>
200             <version>1.7.0</version>
201         </dependency>
202
203         <dependency>
204             <groupId>org.json</groupId>
205             <artifactId>json</artifactId>
206         </dependency>
207
208         <dependency>
209             <groupId>com.google.code.gson</groupId>
210             <artifactId>gson</artifactId>
211             <version>2.6.2</version>
212         </dependency>
213
214         <dependency>
215             <groupId>org.eclipse.persistence</groupId>
216             <artifactId>eclipselink</artifactId>
217             <version>2.7.7</version>
218         </dependency>
219
220         <dependency>
221             <groupId>org.onap.aai.logging-service</groupId>
222             <artifactId>common-logging</artifactId>
223             <version>1.5.0</version>
224         </dependency>
225
226         <dependency>
227             <groupId>org.onap.aai.logging-service</groupId>
228             <artifactId>logging-api</artifactId>
229             <version>1.5.0</version>
230         </dependency>
231
232         <dependency>
233             <groupId>org.onap.aai</groupId>
234             <artifactId>rest-client</artifactId>
235             <version>1.2.1</version>
236         </dependency>
237
238         <dependency>
239             <groupId>com.google.guava</groupId>
240             <artifactId>guava</artifactId>
241             <version>${version.com.google.guava}</version>
242         </dependency>
243
244         <dependency>
245             <groupId>org.glassfish</groupId>
246             <artifactId>javax.json</artifactId>
247             <version>1.1</version>
248         </dependency>
249
250     </dependencies>
251
252     <profiles>
253         <profile>
254             <id>docker</id>
255             <build>
256                 <plugins>
257                     <plugin>
258                         <groupId>org.codehaus.mojo</groupId>
259                         <artifactId>build-helper-maven-plugin</artifactId>
260                         <version>3.0.0</version>
261                         <executions>
262                             <execution>
263                                 <phase>pre-clean</phase>
264                                 <id>parse-version</id>
265                                 <goals>
266                                     <goal>parse-version</goal>
267                                 </goals>
268                             </execution>
269                         </executions>
270                     </plugin>
271                     <plugin>
272                         <groupId>org.codehaus.groovy.maven</groupId>
273                         <artifactId>gmaven-plugin</artifactId>
274                         <version>1.0</version>
275                         <executions>
276                             <execution>
277                                 <phase>pre-clean</phase>
278                                 <goals>
279                                     <goal>execute</goal>
280                                 </goals>
281                                 <configuration>
282                                     <source>
283                                         def userAaiBaseImage = session.userProperties['aai.base.image']
284                                         def userAaiCommonVersion = session.userProperties['aai.base.image.version']
285                                         if (userAaiCommonVersion != null) {
286                                             project.properties['aai.base.image.version'] = userAaiCommonVersion
287                                         }
288                                         if (userAaiBaseImage != null) {
289                                             project.properties['aai.base.image'] = userAaiBaseImage
290                                         }
291                                         log.info 'Base image flavour: ' + project.properties['aai.base.image']
292                                         log.info 'Base image version: ' + project.properties['aai.base.image.version']
293                                     </source>
294                                 </configuration>
295                             </execution>
296                         </executions>
297                     </plugin>
298                     <plugin>
299                         <groupId>io.fabric8</groupId>
300                         <artifactId>docker-maven-plugin</artifactId>
301                         <version>${docker.fabric.version}</version>
302                         <configuration>
303                             <verbose>true</verbose>
304                             <apiVersion>1.23</apiVersion>
305                             <images>
306                                 <image>
307                                     <name>${docker.push.registry}/${aai.docker.namespace}/${project.artifactId}:%l
308                                     </name>
309                                     <build>
310                                         <filter>@</filter>
311                                         <tags>
312                                             <tag>latest</tag>
313                                             <tag>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}-STAGING-latest</tag>
314                                             <tag>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}-STAGING-${maven.build.timestamp}</tag>
315                                         </tags>
316                                         <cleanup>try</cleanup>
317                                         <dockerFileDir>${project.basedir}/src/main/docker</dockerFileDir>
318                                         <assembly>
319                                             <inline>
320                                                 <fileSets>
321                                                     <fileSet>
322                                                         <directory>${aai.build.directory}</directory>
323                                                         <outputDirectory>/${project.artifactId}</outputDirectory>
324                                                     </fileSet>
325                                                 </fileSets>
326                                             </inline>
327                                         </assembly>
328                                     </build>
329                                 </image>
330                             </images>
331                         </configuration>
332                         <executions>
333                             <execution>
334                                 <id>clean-images</id>
335                                 <phase>pre-clean</phase>
336                                 <goals>
337                                     <goal>remove</goal>
338                                 </goals>
339                                 <configuration>
340                                     <removeAll>true</removeAll>
341                                 </configuration>
342                             </execution>
343                             <execution>
344                                 <id>generate-images</id>
345                                 <phase>package</phase>
346                                 <goals>
347                                     <goal>build</goal>
348                                 </goals>
349                             </execution>
350                             <execution>
351                                 <id>push-images</id>
352                                 <phase>deploy</phase>
353                                 <goals>
354                                     <goal>push</goal>
355                                 </goals>
356                             </execution>
357                         </executions>
358                     </plugin>
359                 </plugins>
360             </build>
361         </profile>
362     </profiles>
363
364     <build>
365         <finalName>${project.artifactId}</finalName>
366         <plugins>
367             <!-- jacoco-maven-plugin provides the basic report creation during unit testing, such as code-coverage, sonar, etc. -->
368             <plugin>
369                 <groupId>org.jacoco</groupId>
370                 <artifactId>jacoco-maven-plugin</artifactId>
371                 <executions>
372                     <!-- Prepares the property pointing to the JaCoCo runtime agent which
373                          is passed as VM argument when Maven the Surefire plugin is executed. -->
374                     <execution>
375                         <id>pre-unit-test</id>
376                         <goals>
377                             <goal>prepare-agent</goal>
378                         </goals>
379                         <configuration>
380                             <!-- Sets the path to the file which contains the execution data. -->
381                             <destFile>${sonar.jacoco.reportPath}</destFile>
382                             <propertyName>surefireArgLine</propertyName>
383                         </configuration>
384                     </execution>
385                     <!-- Ensures that the code coverage report for unit tests is created
386                          after unit tests have been run. -->
387                     <execution>
388                         <id>post-unit-test</id>
389                         <phase>test</phase>
390                         <goals>
391                             <goal>report</goal>
392                         </goals>
393                         <configuration>
394                             <!-- Sets the path to the file which contains the execution data. -->
395                             <dataFile>${sonar.jacoco.reportPath}</dataFile>
396                             <!-- Sets the output directory for the code coverage report. -->
397                             <outputDirectory>${jacoco.path}</outputDirectory>
398                         </configuration>
399                     </execution>
400                     <!-- Prepares the property pointing to the JaCoCo runtime agent which
401                          is passed as VM argument when Maven the Failsafe plugin is executed. -->
402                     <execution>
403                         <id>pre-integration-test</id>
404                         <phase>pre-integration-test</phase>
405                         <goals>
406                             <goal>prepare-agent</goal>
407                         </goals>
408                         <configuration>
409                             <!-- Sets the path to the file which contains the execution data. -->
410                             <destFile>${sonar.jacoco.itReportPath}</destFile>
411                             <!-- Sets the name of the property containing the settings for JaCoCo
412                                  runtime agent. -->
413                             <propertyName>failsafeArgLine</propertyName>
414                         </configuration>
415                     </execution>
416                     <!-- Ensures that the code coverage report for integration tests after
417                          integration tests have been run. -->
418                     <execution>
419                         <id>post-integration-test</id>
420                         <phase>post-integration-test</phase>
421                         <goals>
422                             <goal>report</goal>
423                         </goals>
424                         <configuration>
425                             <!-- Sets the path to the file which contains the execution data. -->
426                             <dataFile>${sonar.jacoco.itReportPath}/</dataFile>
427                             <!-- Sets the output directory for the code coverage report. -->
428                             <outputDirectory>${jacoco.itPath}</outputDirectory>
429                         </configuration>
430                     </execution>
431                 </executions>
432             </plugin>
433             <!-- Checkstyle plugin - used to report on compliance with -->
434             <!-- the Google style guide. -->
435             <plugin>
436                 <groupId>org.apache.maven.plugins</groupId>
437                 <artifactId>maven-site-plugin</artifactId>
438                 <version>3.3</version>
439                 <configuration>
440                     <reportPlugins>
441                         <plugin>
442                             <groupId>org.apache.maven.plugins</groupId>
443                             <artifactId>maven-checkstyle-plugin</artifactId>
444                             <version>2.17</version>
445                             <reportSets>
446                                 <reportSet>
447                                     <reports>
448                                         <report>checkstyle</report>
449                                     </reports>
450                                 </reportSet>
451                             </reportSets>
452                         </plugin>
453                     </reportPlugins>
454                 </configuration>
455             </plugin>
456
457             <plugin>
458                 <groupId>org.springframework.boot</groupId>
459                 <artifactId>spring-boot-maven-plugin</artifactId>
460             </plugin>
461
462             <plugin>
463                 <artifactId>maven-assembly-plugin</artifactId>
464                 <configuration>
465                     <descriptors>
466                         <descriptor>src/main/assembly/descriptor.xml</descriptor>
467                     </descriptors>
468                 </configuration>
469                 <executions>
470                     <execution>
471                         <id>make-assembly</id>
472                         <phase>package</phase>
473                         <goals>
474                             <goal>single</goal>
475                         </goals>
476                     </execution>
477                 </executions>
478             </plugin>
479
480             <plugin>
481                 <artifactId>maven-surefire-plugin</artifactId>
482                 <version>2.21.0</version>
483                 <configuration>
484                     <systemPropertyVariables>
485                         <OXM_LOCATION>${aai.build.directory}</OXM_LOCATION>
486                         <CONFIG_HOME>${project.basedir}/src/test/resources/config</CONFIG_HOME>
487                         <SERVICE_BEANS>${project.basedir}/src/test/resources/spring-beans</SERVICE_BEANS>
488                         <testShemaUnpackVersion>${shemaUnpackVersion}</testShemaUnpackVersion>
489                     </systemPropertyVariables>
490                 </configuration>
491             </plugin>
492
493             <plugin>
494                 <groupId>org.apache.maven.plugins</groupId>
495                 <artifactId>maven-dependency-plugin</artifactId>
496                 <executions>
497                     <execution>
498                         <id>unpack</id>
499                         <phase>initialize</phase>
500                         <goals>
501                             <goal>unpack</goal>
502                         </goals>
503                         <configuration>
504                             <artifactItems>
505                                 <artifactItem>
506                                     <groupId>org.onap.aai.schema-service</groupId>
507                                     <artifactId>aai-schema</artifactId>
508                                     <version>${version.aai-schema}</version>
509                                     <type>jar</type>
510                                     <includes>/${shemaUnpackVersion}/oxm/</includes>
511                                     <outputDirectory>${aai.build.directory}</outputDirectory>
512                                 </artifactItem>
513                             </artifactItems>
514                         </configuration>
515                     </execution>
516                 </executions>
517             </plugin>
518             <!-- license plugin -->
519             <!-- Uncomment this to add a license header to every source file
520      <plugin>
521        <groupId>com.mycila</groupId>
522        <artifactId>license-maven-plugin</artifactId>
523        <version>3.0</version>
524        <configuration>
525          <header>License.txt</header>
526          <includes>
527            <include>src/main/java/**</include>
528            <include>src/test/java/**</include>
529          </includes>
530        </configuration>
531        <executions>
532          <execution>
533            <goals>
534              <goal>format</goal>
535            </goals>
536            <phase>process-sources</phase>
537          </execution>
538        </executions>
539      </plugin> -->
540             <plugin>
541                 <groupId>org.apache.maven.plugins</groupId>
542                 <artifactId>maven-deploy-plugin</artifactId>
543             </plugin>
544             <plugin>
545                 <groupId>org.codehaus.mojo</groupId>
546                 <artifactId>sonar-maven-plugin</artifactId>
547                 <version>3.2</version>
548             </plugin>
549             <plugin>
550                 <groupId>org.jacoco</groupId>
551                 <artifactId>jacoco-maven-plugin</artifactId>
552                 <version>0.8.5</version>
553                 <configuration>
554                     <dumpOnExit>true</dumpOnExit>
555                 </configuration>
556                 <executions>
557                     <execution>
558                         <id>jacoco-initialize-unit-tests</id>
559                         <goals>
560                             <goal>prepare-agent</goal>
561                         </goals>
562                         <configuration>
563                             <destFile>${project.build.directory}/coverage-reports/jacoco.exec
564                             </destFile>
565                         </configuration>
566                     </execution>
567                     <execution>
568                         <id>default-check</id>
569                         <goals>
570                             <goal>check</goal>
571                         </goals>
572                         <configuration>
573                             <dataFile>${project.build.directory}/coverage-reports/jacoco.exec</dataFile>
574                             <rules>
575                                 <!--  implementation is needed only for Maven 2  -->
576                                 <rule implementation="org.jacoco.maven.RuleConfiguration">
577                                     <element>BUNDLE</element>
578                                     <limits>
579                                         <limit implementation="org.jacoco.report.check.Limit">
580                                             <counter>LINE</counter>
581                                             <value>COVEREDRATIO</value>
582                                             <minimum>${jacoco.line.coverage.limit}</minimum>
583                                         </limit>
584                                     </limits>
585                                 </rule>
586                             </rules>
587                         </configuration>
588                     </execution>
589                 </executions>
590             </plugin>
591
592         </plugins>
593     </build>
594
595
596     <dependencyManagement>
597         <dependencies>
598             <dependency>
599                 <groupId>org.apache.camel.springboot</groupId>
600                 <artifactId>camel-spring-boot-dependencies</artifactId>
601                 <version>${camel-spring-boot.version}</version>
602                 <type>pom</type>
603                 <scope>import</scope>
604             </dependency>
605             <dependency>
606                 <groupId>org.apache.httpcomponents</groupId>
607                 <artifactId>httpclient</artifactId>
608                 <version>4.5.5</version>
609             </dependency>
610             <dependency>
611                 <groupId>org.apache.httpcomponents</groupId>
612                 <artifactId>httpcore</artifactId>
613                 <version>4.4.1</version>
614             </dependency>
615             <dependency>
616                 <groupId>org.json</groupId>
617                 <artifactId>json</artifactId>
618                 <version>20131018</version>
619             </dependency>
620
621             <dependency>
622                 <groupId>javax.xml.bind</groupId>
623                 <artifactId>jaxb-api</artifactId>
624                 <version>2.3.0</version>
625             </dependency>
626             <dependency>
627                 <groupId>com.sun.xml.bind</groupId>
628                 <artifactId>jaxb-core</artifactId>
629                 <version>2.3.0</version>
630             </dependency>
631             <dependency>
632                 <groupId>com.sun.xml.bind</groupId>
633                 <artifactId>jaxb-impl</artifactId>
634                 <version>2.3.0</version>
635             </dependency>
636
637         </dependencies>
638     </dependencyManagement>
639     <distributionManagement>
640         <repository>
641             <id>ecomp-releases</id>
642             <name>ECOMP Release Repository</name>
643             <url>${nexusproxy}/content/repositories/releases/</url>
644         </repository>
645         <snapshotRepository>
646             <id>ecomp-snapshots</id>
647             <name>ECOMP Snapshot Repository</name>
648             <url>${nexusproxy}/content/repositories/snapshots/</url>
649         </snapshotRepository>
650     </distributionManagement>
651 </project>