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