Merge "[AAI] Upgraded microservices to use the latest aai-common 1.9.2"
[aai/babel.git] / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3
4     ============LICENSE_START=======================================================
5     org.onap.aai
6     ================================================================================
7     Copyright (c) 2017-2019 AT&T Intellectual Property. All rights reserved.
8     Copyright (c) 2017-2019 European Software Marketing Ltd.
9     ================================================================================
10     Licensed under the Apache License, Version 2.0 (the "License");
11     you may not use this file except in compliance with the License.
12     You may obtain a copy of the License at
13
14           http://www.apache.org/licenses/LICENSE-2.0
15
16     Unless required by applicable law or agreed to in writing, software
17     distributed under the License is distributed on an "AS IS" BASIS,
18     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19     See the License for the specific language governing permissions and
20     limitations under the License.
21     ============LICENSE_END=========================================================
22 -->
23
24 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
25                  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
26         <modelVersion>4.0.0</modelVersion>
27
28         <parent>
29                 <groupId>org.onap.aai.aai-common</groupId>
30                 <artifactId>aai-parent</artifactId>
31                 <version>1.9.2</version>
32         </parent>
33
34         <groupId>org.onap.aai</groupId>
35         <artifactId>babel</artifactId>
36         <version>1.9.1-SNAPSHOT</version>
37         <packaging>jar</packaging>
38
39         <name>aai-babel</name>
40         <description>ONAP AAI Babel Microservice</description>
41
42         <properties>
43                 <!-- Spring boot version -->
44
45                 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
46                 <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
47
48                 <aai.schema.source.folder>onap/aai_schema</aai.schema.source.folder>
49                 <aai.schema.target.folder>${project.build.directory}/aai-schema</aai.schema.target.folder>
50
51                 <sonar.jacoco.reportPath />
52                 <sonar.jacoco.itReportPath />
53                 <sonar.jacoco.reportMissing.force.zero />
54
55                 <jacoco.report.directory>${project.build.directory}/code-coverage</jacoco.report.directory>
56                 <jacoco.line.coverage.limit>0.90</jacoco.line.coverage.limit>
57                 <sonar.jacoco.reportPath />
58                 <sonar.jacoco.itReportPath />
59                 <sonar.jacoco.reportMissing.force.zero />
60
61                 <jacoco-maven-plugin.version>0.8.6</jacoco-maven-plugin.version>
62
63                 <sonar.core.codeCoveragePlugin>jacoco</sonar.core.codeCoveragePlugin>
64                 <sonar.coverage.jacoco.xmlReportPaths>${project.reporting.outputDirectory}/jacoco-ut/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths>
65                 <sonar.exclusions>**/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/**</sonar.exclusions>
66
67                 <sonar.scanner.version>3.7.0.1746</sonar.scanner.version>
68
69                 <!-- java 11 related properties -->
70                 <maven-javadoc-plugin.version>3.2.0</maven-javadoc-plugin.version>
71                 <maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
72                 <maven-compiler-plugin.source>11</maven-compiler-plugin.source>
73                 <maven-compiler-plugin.target>11</maven-compiler-plugin.target>
74                 <maven-compiler-plugin.test.source>11</maven-compiler-plugin.test.source>
75                 <maven-compiler-plugin.test.target>11</maven-compiler-plugin.test.target>
76                 <sonar-maven-plugin.version>3.7.0.1746</sonar-maven-plugin.version>
77
78                 <!-- docker related properties -->
79                 <docker.fabric.version>0.28.0</docker.fabric.version>
80                 <aai.docker.version>1.0.0</aai.docker.version>
81                 <aai.build.directory>${project.build.directory}/${project.artifactId}-${project.version}-build/
82                 </aai.build.directory>
83                 <aai.docker.namespace>onap</aai.docker.namespace>
84                 <aai.base.image>alpine</aai.base.image>
85                 <aai.base.image.version>1.9.0</aai.base.image.version>
86
87                 <!-- Dependency Versions -->
88                 <sdc.tosca.version>1.5.1</sdc.tosca.version>
89
90                 <aai.common.version>1.9.2</aai.common.version>
91                 <aaf.version>2.1.21</aaf.version>
92                 <common.logging.version>1.2.2</common.logging.version>
93
94                 <commons.compress.version>1.19</commons.compress.version>
95
96                 <javax.ws.rs.version>2.1</javax.ws.rs.version>
97                 <mvn.jaxb2.version>0.13.3</mvn.jaxb2.version>
98                 <aai-schema.group.id>org.onap.aai.schema-service</aai-schema.group.id>
99
100                 <aai-schema.version>1.9.1</aai-schema.version>
101                 <apache.lang3.version>3.7</apache.lang3.version>
102                 <aai.rest.client.version>1.2.1</aai.rest.client.version>
103
104                 <sdc.distribution.client.version>1.4.1</sdc.distribution.client.version>
105                 <xmlunit.version>1.6</xmlunit.version>
106
107                 <antrun.version>1.8</antrun.version>
108
109                 <javax.activation.version>1.1.1</javax.activation.version>
110                 <!-- This will be used for the docker images as the default format of maven build has issues -->
111                 <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
112
113         </properties>
114
115         <profiles>
116                 <!-- Docker profile to be used for building docker image and pushing to nexus -->
117
118                 <profile>
119                         <id>docker</id>
120                         <build>
121                                 <plugins>
122                                         <plugin>
123                                                 <groupId>org.codehaus.mojo</groupId>
124                                                 <artifactId>build-helper-maven-plugin</artifactId>
125                                                 <version>3.0.0</version>
126                                                 <executions>
127                                                         <execution>
128                                                                 <phase>pre-clean</phase>
129                                                                 <id>parse-version</id>
130                                                                 <goals>
131                                                                         <goal>parse-version</goal>
132                                                                 </goals>
133                                                         </execution>
134                                                 </executions>
135                                         </plugin>
136                                         <plugin>
137                                                 <groupId>org.codehaus.groovy.maven</groupId>
138                                                 <artifactId>gmaven-plugin</artifactId>
139                                                 <version>1.0</version>
140                                                 <executions>
141                                                         <execution>
142                                                                 <phase>pre-clean</phase>
143                                                                 <goals>
144                                                                         <goal>execute</goal>
145                                                                 </goals>
146                                                                 <configuration>
147                                                                         <source>
148                                                                                 def userAaiBaseImage = session.userProperties['aai.base.image'];
149                                                                                 def userAaiCommonVersion = session.userProperties['aai.base.image.version'];
150                                                                                 if (userAaiCommonVersion != null) {
151                                                                                         project.properties['aai.base.image.version'] = userAaiCommonVersion;
152                                                                                 }
153                                                                                 if (userAaiBaseImage != null) {
154                                                                                         project.properties['aai.base.image'] = userAaiBaseImage;
155                                                                                 }
156                                                                                 log.info 'Base image flavour: ' + project.properties['aai.base.image'];
157                                                                                 log.info 'Base image version: ' + project.properties['aai.base.image.version'];
158                                                                         </source>
159                                                                 </configuration>
160                                                         </execution>
161                                                 </executions>
162                                         </plugin>
163                                         <plugin>
164                                                 <groupId>io.fabric8</groupId>
165                                                 <artifactId>docker-maven-plugin</artifactId>
166                                                 <version>${docker.fabric.version}</version>
167                                                 <configuration>
168                                                         <verbose>true</verbose>
169                                                         <apiVersion>1.23</apiVersion>
170                                                         <images>
171                                                                 <image>
172                                                                         <name>${docker.push.registry}/${aai.docker.namespace}/${project.artifactId}:%l
173                                                                         </name>
174                                                                         <build>
175                                                                                 <filter>@</filter>
176                                                                                 <tags>
177                                                                                         <tag>latest</tag>
178                                                                                         <tag>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}-STAGING-latest</tag>
179                                                                                         <tag>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}-STAGING-${maven.build.timestamp}</tag>
180                                                                                         <tag>${image.tag}</tag>
181                                                                                 </tags>
182                                                                                 <cleanup>try</cleanup>
183                                                                                 <dockerFileDir>${project.basedir}/src/main/docker</dockerFileDir>
184                                                                                 <assembly>
185                                                                                         <inline>
186                                                                                                 <fileSets>
187                                                                                                         <fileSet>
188                                                                                                                 <directory>${aai.build.directory}</directory>
189                                                                                                                 <outputDirectory>/${project.artifactId}</outputDirectory>
190                                                                                                         </fileSet>
191                                                                                                 </fileSets>
192                                                                                         </inline>
193                                                                                 </assembly>
194                                                                         </build>
195                                                                 </image>
196                                                         </images>
197                                                 </configuration>
198                                                 <executions>
199                                                         <execution>
200                                                                 <id>clean-images</id>
201                                                                 <phase>pre-clean</phase>
202                                                                 <goals>
203                                                                         <goal>remove</goal>
204                                                                 </goals>
205                                                                 <configuration>
206                                                                         <removeAll>true</removeAll>
207                                                                 </configuration>
208                                                         </execution>
209                                                         <execution>
210                                                                 <id>generate-images</id>
211                                                                 <phase>package</phase>
212                                                                 <goals>
213                                                                         <goal>build</goal>
214                                                                 </goals>
215                                                         </execution>
216                                                         <execution>
217                                                                 <id>push-images</id>
218                                                                 <phase>deploy</phase>
219                                                                 <goals>
220                                                                         <goal>push</goal>
221                                                                 </goals>
222                                                         </execution>
223                                                 </executions>
224                                         </plugin>
225                                 </plugins>
226                         </build>
227                 </profile>
228         </profiles>
229
230         <dependencies>
231                 <dependency>
232                         <groupId>org.springframework.boot</groupId>
233                         <artifactId>spring-boot-starter-jetty</artifactId>
234                 </dependency>
235                 <dependency>
236                         <groupId>org.springframework.boot</groupId>
237                         <artifactId>spring-boot-starter-jersey</artifactId>
238                         <exclusions>
239                                 <exclusion>
240                                         <groupId>org.springframework.boot</groupId>
241                                         <artifactId>spring-boot-starter-jetty</artifactId>
242                                 </exclusion>
243                                 <exclusion>
244                                         <groupId>org.springframework.boot</groupId>
245                                         <artifactId>spring-boot-starter-tomcat</artifactId>
246                                 </exclusion>
247                         </exclusions>
248                 </dependency>
249                 <dependency>
250                         <groupId>org.springframework.boot</groupId>
251                         <artifactId>spring-boot-starter-web</artifactId>
252                         <exclusions>
253                                 <exclusion>
254                                         <groupId>org.springframework.boot</groupId>
255                                         <artifactId>spring-boot-starter-jetty</artifactId>
256                                 </exclusion>
257                                 <exclusion>
258                                         <groupId>org.springframework.boot</groupId>
259                                         <artifactId>spring-boot-starter-tomcat</artifactId>
260                                 </exclusion>
261                         </exclusions>
262                 </dependency>
263                 <dependency>
264                         <groupId>org.springframework.boot</groupId>
265                         <artifactId>spring-boot-starter-aop</artifactId>
266                         <exclusions>
267                                 <exclusion>
268                                         <groupId>org.springframework.boot</groupId>
269                                         <artifactId>spring-boot-starter-tomcat</artifactId>
270                                 </exclusion>
271                         </exclusions>
272                 </dependency>
273                 <dependency>
274                         <groupId>org.onap.aai.logging-service</groupId>
275                         <artifactId>common-logging</artifactId>
276                 </dependency>
277                 <dependency>
278                         <groupId>ch.qos.logback</groupId>
279                         <artifactId>logback-classic</artifactId>
280                 </dependency>
281                 <dependency>
282                         <groupId>ch.qos.logback</groupId>
283                         <artifactId>logback-core</artifactId>
284                 </dependency>
285                 <dependency>
286                         <groupId>commons-codec</groupId>
287                         <artifactId>commons-codec</artifactId>
288                 </dependency>
289                 <dependency>
290                         <groupId>org.apache.commons</groupId>
291                         <artifactId>commons-compress</artifactId>
292                 </dependency>
293                 <dependency>
294                         <groupId>org.apache.commons</groupId>
295                         <artifactId>commons-lang3</artifactId>
296                 </dependency>
297                 <dependency>
298                         <groupId>javax.ws.rs</groupId>
299                         <artifactId>javax.ws.rs-api</artifactId>
300                         <version>2.1</version>
301                 </dependency>
302                 <dependency>
303                         <groupId>org.codehaus.groovy</groupId>
304                         <artifactId>groovy</artifactId>
305                 </dependency>
306                 <dependency>
307                         <groupId>org.onap.sdc.sdc-tosca</groupId>
308                         <artifactId>sdc-tosca</artifactId>
309                         <version>${sdc.tosca.version}</version>
310                 </dependency>
311                 <dependency>
312                         <groupId>org.onap.aai</groupId>
313                         <artifactId>rest-client</artifactId>
314                 </dependency>
315                 <dependency>
316                         <groupId>org.onap.aai.aai-common</groupId>
317                         <artifactId>aai-aaf-auth</artifactId>
318                         <version>${aai.common.version}</version>
319                         <exclusions>
320                                 <exclusion>
321                                         <groupId>org.springframework.boot</groupId>
322                                         <artifactId>spring-boot-starter-web</artifactId>
323                                 </exclusion>
324                         </exclusions>
325                 </dependency>
326                 <dependency>
327                         <groupId>org.onap.aaf.authz</groupId>
328                         <artifactId>aaf-cadi-core</artifactId>
329                         <version>${aaf.version}</version>
330                         <scope>compile</scope>
331                 </dependency>
332                 <dependency>
333                         <groupId>org.onap.aaf.authz</groupId>
334                         <artifactId>aaf-cadi-aaf</artifactId>
335                         <version>${aaf.version}</version>
336                         <scope>compile</scope>
337                 </dependency>
338                 <dependency>
339                         <groupId>org.onap.aaf.authz</groupId>
340                         <artifactId>aaf-auth-client</artifactId>
341                         <version>${aaf.version}</version>
342                 </dependency>
343                 <dependency>
344                         <groupId>org.onap.aaf.authz</groupId>
345                         <artifactId>aaf-cadi-client</artifactId>
346                         <version>${aaf.version}</version>
347                 </dependency>
348                 <dependency>
349                         <groupId>org.onap.aaf.authz</groupId>
350                         <artifactId>aaf-misc-env</artifactId>
351                         <version>${aaf.version}</version>
352                 </dependency>
353                 <dependency>
354                         <groupId>org.onap.aaf.authz</groupId>
355                         <artifactId>aaf-misc-rosetta</artifactId>
356                         <version>${aaf.version}</version>
357                 </dependency>
358
359                 <!-- Testing -->
360                 <dependency>
361                         <groupId>org.springframework.boot</groupId>
362                         <artifactId>spring-boot-starter-test</artifactId>
363                         <scope>test</scope>
364                 </dependency>
365                 <dependency>
366                         <groupId>org.onap.sdc.sdc-distribution-client</groupId>
367                         <artifactId>sdc-distribution-client</artifactId>
368                         <version>${sdc.distribution.client.version}</version>
369                         <scope>test</scope>
370                 </dependency>
371                 <dependency>
372                         <groupId>junit</groupId>
373                         <artifactId>junit</artifactId>
374                         <version>4.12</version>
375                         <scope>test</scope>
376                 </dependency>
377
378                 <dependency>
379                         <groupId>xmlunit</groupId>
380                         <artifactId>xmlunit</artifactId>
381                         <version>${xmlunit.version}</version>
382                         <scope>test</scope>
383                 </dependency>
384                 <dependency>
385                         <groupId>javax.xml.bind</groupId>
386                         <artifactId>jaxb-api</artifactId>
387                 </dependency>
388                 <dependency>
389                         <groupId>javax.xml.ws</groupId>
390                         <artifactId>jaxws-api</artifactId>
391                 </dependency>
392                 <dependency>
393                         <groupId>com.sun.xml.bind</groupId>
394                         <artifactId>jaxb-core</artifactId>
395                 </dependency>
396                 <dependency>
397                         <groupId>com.sun.xml.bind</groupId>
398                         <artifactId>jaxb-impl</artifactId>
399                 </dependency>
400                 <dependency>
401                         <groupId>javax.activation</groupId>
402                         <artifactId>activation</artifactId>
403                         <version>${javax.activation.version}</version>
404                 </dependency>
405         </dependencies>
406
407         <build>
408                 <plugins>
409                         <plugin>
410                                 <groupId>org.springframework.boot</groupId>
411                                 <artifactId>spring-boot-maven-plugin</artifactId>
412                                 <version>${spring.boot.version}</version>
413                                 <configuration>
414                                         <jvmArguments>
415                                                 -DCONFIG_HOME=./appconfig-local
416                                                 -DAPP_HOME=.
417                                                 -Dtosca.mappings.config=./appconfig-local/tosca-mappings.json
418                                                 -DKEY_STORE_PASSWORD=${KEY_STORE_PASSWORD}
419                                         </jvmArguments>
420                                 </configuration>
421                                 <executions>
422                                         <execution>
423                                                 <goals>
424                                                         <goal>repackage</goal>
425                                                 </goals>
426                                         </execution>
427                                 </executions>
428                         </plugin>
429                         <plugin>
430                                 <groupId>org.apache.maven.plugins</groupId>
431                                 <artifactId>maven-dependency-plugin</artifactId>
432                                 <executions>
433                                         <execution>
434                                                 <id>unpack</id>
435                                                 <phase>initialize</phase>
436                                                 <goals>
437                                                         <goal>unpack</goal>
438                                                 </goals>
439                                                 <configuration>
440                                                         <artifactItems>
441                                                                 <artifactItem>
442                                                                         <groupId>${aai-schema.group.id}</groupId>
443                                                                         <artifactId>aai-schema</artifactId>
444                                                                         <version>${aai-schema.version}</version>
445                                                                         <type>jar</type>
446                                                                         <includes>${aai.schema.source.folder}/aai_schema_v**.xsd</includes>
447                                                                         <outputDirectory>${project.build.directory}/tmp</outputDirectory>
448                                                                 </artifactItem>
449                                                         </artifactItems>
450                                                 </configuration>
451                                         </execution>
452                                 </executions>
453                         </plugin>
454                         <plugin>
455                                 <groupId>org.apache.maven.plugins</groupId>
456                                 <artifactId>maven-antrun-plugin</artifactId>
457                                 <version>${antrun.version}</version>
458                                 <executions>
459                                         <execution>
460                                                 <id>Flatten XSDs</id>
461                                                 <phase>initialize</phase>
462                                                 <goals>
463                                                         <goal>run</goal>
464                                                 </goals>
465                                                 <configuration>
466                                                         <target>
467                                                                 <copy todir="${aai.schema.target.folder}" flatten="true">
468                                                                         <fileset dir="${project.build.directory}/tmp">
469                                                                                 <include name="**/*.xsd" />
470                                                                         </fileset>
471                                                                 </copy>
472                                                         </target>
473                                                 </configuration>
474                                         </execution>
475                                 </executions>
476                         </plugin>
477                         <plugin>
478                                 <groupId>org.jvnet.jaxb2.maven2</groupId>
479                                 <artifactId>maven-jaxb2-plugin</artifactId>
480                                 <version>${mvn.jaxb2.version}</version>
481                                 <executions>
482                                         <execution>
483                                                 <phase>process-sources</phase>
484                                                 <goals>
485                                                         <goal>generate</goal>
486                                                 </goals>
487                                         </execution>
488                                 </executions>
489                                 <configuration>
490                                         <schemaDirectory>${aai.schema.target.folder}</schemaDirectory>
491                                         <generatePackage>org.onap.aai.babel.xml.generator.xsd</generatePackage>
492                                         <generateDirectory>${project.build.directory}/generated-sources</generateDirectory>
493                                         <schemaIncludes>
494                                                 <include>aai_schema_latest.xsd</include>
495                                         </schemaIncludes>
496                                         <extension>true</extension>
497                                         <args>
498                                                 <arg>-Xannotate</arg>
499                                         </args>
500                                         <plugins>
501                                                 <plugin>
502                                                         <groupId>org.jvnet.jaxb2_commons</groupId>
503                                                         <artifactId>jaxb2-basics-annotate</artifactId>
504                                                         <version>0.6.4</version>
505                                                 </plugin>
506                                                 <!-- Add the dependencies with your annotations as 'plugins' below -->
507                                                 <plugin>
508                                                         <groupId>org.jvnet.jaxb2_commons</groupId>
509                                                         <artifactId>jaxb2-annotate-plugin-test-annox-annotations</artifactId>
510                                                         <version>1.0.0</version>
511                                                 </plugin>
512                                         </plugins>
513                                 </configuration>
514                         </plugin>
515                         <plugin>
516                                 <artifactId>exec-maven-plugin</artifactId>
517                                 <groupId>org.codehaus.mojo</groupId>
518                                 <version>1.5.0</version>
519                                 <executions>
520                                         <execution><!-- Run our script to get latest xsd version -->
521                                                 <id>Get latest xsd version</id>
522                                                 <phase>generate-sources</phase>
523                                                 <goals>
524                                                         <goal>exec</goal>
525                                                 </goals>
526                                                 <configuration>
527                                                         <workingDirectory>${basedir}/scripts</workingDirectory>
528                                                         <executable>bash</executable>
529                                                         <commandlineArgs>get-latest-xsd-version.sh ${basedir}</commandlineArgs>
530                                                 </configuration>
531                                         </execution>
532                                 </executions>
533                         </plugin>
534                         <plugin>
535                                 <artifactId>maven-assembly-plugin</artifactId>
536                                 <configuration>
537                                         <descriptors>
538                                                 <descriptor>src/main/assembly/descriptor.xml</descriptor>
539                                         </descriptors>
540                                 </configuration>
541                                 <executions>
542                                         <execution>
543                                                 <id>make-assembly</id>
544                                                 <phase>package</phase>
545                                                 <goals>
546                                                         <goal>single</goal>
547                                                 </goals>
548                                         </execution>
549                                 </executions>
550                         </plugin>
551                         <plugin>
552                                 <groupId>com.mycila</groupId>
553                                 <artifactId>license-maven-plugin</artifactId>
554                                 <version>3.0</version>
555                                 <configuration>
556                                         <header>License.txt</header>
557                                         <includes>
558                                                 <include>src/main/java/**</include>
559                                                 <include>src/test/java/**</include>
560                                                 <include>pom.xml</include>
561                                         </includes>
562                                         <skipExistingHeaders>true</skipExistingHeaders>
563                                 </configuration>
564                                 <executions>
565                                         <execution>
566                                                 <goals>
567                                                         <!-- Set goal from "check" to "format" to auto update license headers -->
568                                                         <goal>check</goal>
569                                                 </goals>
570                                                 <phase>validate</phase>
571                                         </execution>
572                                 </executions>
573                         </plugin>
574                         <plugin>
575                                 <groupId>org.apache.maven.plugins</groupId>
576                                 <artifactId>maven-compiler-plugin</artifactId>
577                                 <version>${maven-compiler-plugin.version}</version>
578                                 <inherited>true</inherited>
579                                 <configuration>
580                                         <source>${maven-compiler-plugin.source}</source>
581                                         <target>${maven-compiler-plugin.target}</target>
582                                         <testSource>${maven-compiler-plugin.test.source}</testSource>
583                                         <testTarget>${maven-compiler-plugin.test.target}</testTarget>
584                                 </configuration>
585                         </plugin>
586                         <plugin>
587                                 <groupId>org.apache.maven.plugins</groupId>
588                                 <artifactId>maven-jar-plugin</artifactId>
589                                 <version>3.0.2</version>
590                                 <executions>
591                                         <execution>
592                                                 <phase>package</phase>
593                                                 <goals>
594                                                         <goal>jar</goal>
595                                                 </goals>
596                                                 <configuration>
597                                                         <classifier>client</classifier>
598                                                         <includes>
599                                                                 <include>**/babel/service/data/*</include>
600                                                         </includes>
601                                                 </configuration>
602                                         </execution>
603                                 </executions>
604                         </plugin>
605                         <plugin>
606                                 <groupId>org.apache.maven.plugins</groupId>
607                                 <artifactId>maven-deploy-plugin</artifactId>
608                                 <configuration>
609                                         <classifier>client</classifier>
610                                 </configuration>
611                         </plugin>
612
613
614                         <!-- once we connect aai-parent or oparent 3.0+ we can take out this
615                              whole section -->
616
617                         <plugin>
618                                 <groupId>org.jacoco</groupId>
619                                 <artifactId>jacoco-maven-plugin</artifactId>
620                                 <version>${jacoco-maven-plugin.version}</version>
621                                 <configuration>
622                                         <!-- Note: This exclusion list should match <sonar.exclusions> property
623                      above -->
624                                         <excludes>
625                                                 <exclude>**/gen/**</exclude>
626                                                 <exclude>**/generated-sources/**</exclude>
627                                                 <exclude>**/yang-gen/**</exclude>
628                                                 <exclude>**/pax/**</exclude>
629                                                 <exclude>org/onap/aai/babel/xml/generator/xsd/*</exclude>
630                                         </excludes>
631                                 </configuration>
632                                 <executions>
633                                         <!-- Prepares the property pointing to the JaCoCo runtime agent which
634                      is passed as VM argument when Maven the Surefire plugin is executed. -->
635                                         <execution>
636                                                 <id>pre-unit-test</id>
637                                                 <goals>
638                                                         <goal>prepare-agent</goal>
639                                                 </goals>
640                                                 <configuration>
641                                                         <!-- Sets the path to the file which contains the execution data
642                                  . -->
643                                                         <destFile>${project.build.directory}/code-coverage/jacoco-ut.exec</destFile>
644                                                         <!-- Sets the name of the property containing the settings for JaCoCo
645                                  runtime agent. -->
646                                                         <propertyName>surefireArgLine</propertyName>
647                                                 </configuration>
648                                         </execution>
649                                         <!-- Ensures that the code coverage report for unit tests is created
650                      after unit tests have been run. -->
651                                         <execution>
652                                                 <id>post-unit-test</id>
653                                                 <phase>test</phase>
654                                                 <goals>
655                                                         <goal>report</goal>
656                                                 </goals>
657                                                 <configuration>
658                                                         <!-- Sets the path to the file which contains the execution data
659                                  . -->
660                                                         <dataFile>${project.build.directory}/code-coverage/jacoco-ut.exec</dataFile>
661                                                         <!-- Sets the output directory for the code coverage report. -->
662                                                         <outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory>
663                                                 </configuration>
664                                         </execution>
665                                         <execution>
666                                                 <id>pre-integration-test</id>
667                                                 <phase>pre-integration-test</phase>
668                                                 <goals>
669                                                         <goal>prepare-agent</goal>
670                                                 </goals>
671                                                 <configuration>
672                                                         <!-- Sets the path to the file which contains the execution data
673                                  . -->
674                                                         <destFile>${project.build.directory}/code-coverage/jacoco-it.exec</destFile>
675                                                         <!-- Sets the name of the property containing the settings for JaCoCo
676                                  runtime agent. -->
677                                                         <propertyName>failsafeArgLine</propertyName>
678                                                 </configuration>
679                                         </execution>
680                                         <!-- Ensures that the code coverage report for integration tests after
681                      integration tests have been run. -->
682                                         <execution>
683                                                 <id>post-integration-test</id>
684                                                 <phase>post-integration-test</phase>
685                                                 <goals>
686                                                         <goal>report</goal>
687                                                 </goals>
688                                                 <configuration>
689                                                         <!-- Sets the path to the file which contains the execution data
690                                  . -->
691                                                         <dataFile>${project.build.directory}/code-coverage/jacoco-it.exec</dataFile>
692                                                         <!-- Sets the output directory for the code coverage report. -->
693                                                         <outputDirectory>${project.reporting.outputDirectory}/jacoco-it</outputDirectory>
694                                                 </configuration>
695                                         </execution>
696                                         <execution>
697                                                 <id>default-check</id>
698                                                 <goals>
699                                                         <goal>check</goal>
700                                                 </goals>
701                                                 <configuration>
702                                                         <dataFile>${project.build.directory}/code-coverage/jacoco-ut.exec</dataFile>
703                                                         <rules>
704                                                                 <rule implementation="org.jacoco.maven.RuleConfiguration">
705                                                                         <element>BUNDLE</element>
706                                                                         <limits>
707                                                                                 <limit implementation="org.jacoco.report.check.Limit">
708                                                                                         <counter>LINE</counter>
709                                                                                         <value>COVEREDRATIO</value>
710                                                                                         <minimum>${jacoco.line.coverage.limit}</minimum>
711                                                                                 </limit>
712                                                                         </limits>
713                                                                 </rule>
714                                                         </rules>
715                                                 </configuration>
716                                         </execution>
717                                 </executions>
718                         </plugin>
719                         <plugin>
720                                 <groupId>org.apache.maven.plugins</groupId>
721                                 <artifactId>maven-surefire-plugin</artifactId>
722                                 <version>3.0.0-M4</version>
723                                 <configuration>
724                                         <!-- Sets the VM argument line used when unit tests are run. -->
725                                         <reuseForks>false</reuseForks>
726                                         <forkCount>1</forkCount>
727                                         <environmentVariables>
728                                                 <APP_HOME>.</APP_HOME>
729                                                 <CONFIG_HOME>src/test/resources</CONFIG_HOME>
730                                         </environmentVariables>
731                                         <argLine>${surefireArgLine}</argLine>
732                                         <!-- Excludes integration tests when unit tests are run. -->
733                                         <excludes>
734                                                 <exclude>**/IT*.java</exclude>
735                                         </excludes>
736                                 </configuration>
737                         </plugin>
738                         <plugin>
739                                 <groupId>org.apache.maven.plugins</groupId>
740                                 <artifactId>maven-failsafe-plugin</artifactId>
741                                 <version>3.0.0-M5</version>
742                                 <executions>
743                                         <!-- Ensures that both integration-test and verify goals of the Failsafe
744                      Maven plugin are executed. -->
745                                         <execution>
746                                                 <id>integration-tests</id>
747                                                 <goals>
748                                                         <goal>integration-test</goal>
749                                                         <goal>verify</goal>
750                                                 </goals>
751                                                 <configuration>
752                                                         <!-- Sets the VM argument line used when integration tests are run. -->
753                                                         <argLine>${failsafeArgLine}</argLine>
754                                                 </configuration>
755                                         </execution>
756                                 </executions>
757                         </plugin>
758                         <plugin>
759                                 <groupId>org.sonarsource.scanner.maven</groupId>
760                                 <artifactId>sonar-maven-plugin</artifactId>
761                                 <version>${sonar.scanner.version}</version>
762                         </plugin>
763                         <!-- end removable sonar config, note the additional exclusion for babel above
764                              -->
765                 </plugins>
766         </build>
767
768 </project>