Remove aaf dependencies in babel
[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.4</version>
32         </parent>
33
34         <groupId>org.onap.aai</groupId>
35         <artifactId>babel</artifactId>
36         <version>1.12.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.6.5</sdc.tosca.version>
89
90                 <aai.common.version>1.9.4</aai.common.version>
91                 <logback.core.version>1.2.11</logback.core.version>
92                 <groovy.version>3.0.13</groovy.version>
93
94                 <commons.compress.version>1.22</commons.compress.version>
95                 <commons.codec.version>1.15</commons.codec.version>
96
97                 <javax.ws.rs.version>2.1.1</javax.ws.rs.version>
98                 <mvn.jaxb2.version>0.15.1</mvn.jaxb2.version>
99                 <aai-schema.group.id>org.onap.aai.schema-service</aai-schema.group.id>
100
101                 <aai-schema.version>1.12.3</aai-schema.version>
102                 <commons.lang3.version>3.12.0</commons.lang3.version>
103                 <aai.rest.client.version>1.6.4</aai.rest.client.version>
104
105                 <sdc.distribution.client.version>1.4.5</sdc.distribution.client.version>
106                 <!-- TODO: use xml-legacy -->
107                 <xmlunit.version>1.6</xmlunit.version>
108
109                 <antrun.version>3.1.0</antrun.version>
110                 <jakarta.activation.version>1.2.2</jakarta.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                 <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.3.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.gmavenplus</groupId>
138                                                 <artifactId>gmavenplus-plugin</artifactId>
139                                                 <version>1.13.1</version>
140                                                 <executions>
141                                                         <execution>
142                                                                 <phase>pre-clean</phase>
143                                                                 <goals>
144                                                                         <goal>execute</goal>
145                                                                 </goals>
146                                                         </execution>
147                                                 </executions>
148                                                 <configuration>
149                                                         <scripts>
150                                                                 <script>
151                                                                         def userAaiBaseImage = session.userProperties['aai.base.image'];
152                                                                         def userAaiCommonVersion = session.userProperties['aai.base.image.version'];
153                                                                         if (userAaiCommonVersion != null) {
154                                                                                 project.properties['aai.base.image.version'] = userAaiCommonVersion;
155                                                                         }
156                                                                         if (userAaiBaseImage != null) {
157                                                                                 project.properties['aai.base.image'] = userAaiBaseImage;
158                                                                         }
159                                                                         log.info 'Base image flavour: ' + project.properties['aai.base.image'];
160                                                                         log.info 'Base image version: ' + project.properties['aai.base.image.version'];
161                                                                 </script>
162                                                         </scripts>
163                                                 </configuration>
164                                         </plugin>
165                                         <plugin>
166                                                 <groupId>io.fabric8</groupId>
167                                                 <artifactId>docker-maven-plugin</artifactId>
168                                                 <version>${docker.fabric.version}</version>
169                                                 <configuration>
170                                                         <verbose>true</verbose>
171                                                         <apiVersion>1.23</apiVersion>
172                                                         <images>
173                                                                 <image>
174                                                                         <name>${docker.push.registry}/${aai.docker.namespace}/${project.artifactId}:%l</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                         <version>${logback.core.version}</version>
286                 </dependency>
287                 <dependency>
288                         <groupId>commons-codec</groupId>
289                         <artifactId>commons-codec</artifactId>
290                         <version>${commons.codec.version}</version>
291                 </dependency>
292                 <dependency>
293                         <groupId>org.apache.commons</groupId>
294                         <artifactId>commons-compress</artifactId>
295                         <version>${commons.compress.version}</version>
296                 </dependency>
297                 <dependency>
298                         <groupId>org.apache.commons</groupId>
299                         <artifactId>commons-lang3</artifactId>
300                         <version>${commons.lang3.version}</version>
301                 </dependency>
302                 <dependency>
303                         <groupId>javax.ws.rs</groupId>
304                         <artifactId>javax.ws.rs-api</artifactId>
305                         <version>${javax.ws.rs.version}</version>
306                 </dependency>
307                 <dependency>
308                         <groupId>org.codehaus.groovy</groupId>
309                         <artifactId>groovy</artifactId>
310                         <version>${groovy.version}</version>
311                 </dependency>
312                 <dependency>
313                         <groupId>org.onap.sdc.sdc-tosca</groupId>
314                         <artifactId>sdc-tosca</artifactId>
315                         <version>${sdc.tosca.version}</version>
316                 </dependency>
317                 <dependency>
318                         <groupId>org.onap.aai</groupId>
319                         <artifactId>rest-client</artifactId>
320                 </dependency>
321
322                 <!-- Testing -->
323                 <dependency>
324                         <groupId>org.springframework.boot</groupId>
325                         <artifactId>spring-boot-starter-test</artifactId>
326                         <scope>test</scope>
327                 </dependency>
328                 <dependency>
329                         <groupId>org.onap.sdc.sdc-distribution-client</groupId>
330                         <artifactId>sdc-distribution-client</artifactId>
331                         <version>${sdc.distribution.client.version}</version>
332                         <scope>test</scope>
333                 </dependency>
334                 <dependency>
335                         <groupId>junit</groupId>
336                         <artifactId>junit</artifactId>
337                         <version>4.12</version>
338                         <scope>test</scope>
339                 </dependency>
340
341                 <dependency>
342                         <groupId>xmlunit</groupId>
343                         <artifactId>xmlunit</artifactId>
344                         <version>${xmlunit.version}</version>
345                         <scope>test</scope>
346                 </dependency>
347                 <dependency>
348                         <groupId>javax.xml.bind</groupId>
349                         <artifactId>jaxb-api</artifactId>
350                 </dependency>
351                 <dependency>
352                         <groupId>javax.xml.ws</groupId>
353                         <artifactId>jaxws-api</artifactId>
354                 </dependency>
355                 <dependency>
356                         <groupId>com.sun.xml.bind</groupId>
357                         <artifactId>jaxb-core</artifactId>
358                 </dependency>
359                 <dependency>
360                         <groupId>com.sun.xml.bind</groupId>
361                         <artifactId>jaxb-impl</artifactId>
362                 </dependency>
363                 <dependency>
364                         <groupId>jakarta.activation</groupId>
365                         <artifactId>jakarta.activation-api</artifactId>
366                         <version>${jakarta.activation.version}</version>
367                 </dependency>
368         </dependencies>
369
370         <build>
371                 <plugins>
372                         <plugin>
373                                 <groupId>org.springframework.boot</groupId>
374                                 <artifactId>spring-boot-maven-plugin</artifactId>
375                                 <version>${spring.boot.version}</version>
376                                 <configuration>
377                                         <jvmArguments>
378                                                 -DCONFIG_HOME=./appconfig-local
379                                                 -DAPP_HOME=.
380                                                 -Dtosca.mappings.config=./appconfig-local/tosca-mappings.json
381                                                 -DKEY_STORE_PASSWORD=${KEY_STORE_PASSWORD}
382                                         </jvmArguments>
383                                 </configuration>
384                                 <executions>
385                                         <execution>
386                                                 <goals>
387                                                         <goal>repackage</goal>
388                                                 </goals>
389                                         </execution>
390                                 </executions>
391                         </plugin>
392                         <plugin>
393                                 <groupId>org.apache.maven.plugins</groupId>
394                                 <artifactId>maven-dependency-plugin</artifactId>
395                                 <executions>
396                                         <execution>
397                                                 <id>unpack</id>
398                                                 <phase>initialize</phase>
399                                                 <goals>
400                                                         <goal>unpack</goal>
401                                                 </goals>
402                                                 <configuration>
403                                                         <artifactItems>
404                                                                 <artifactItem>
405                                                                         <groupId>${aai-schema.group.id}</groupId>
406                                                                         <artifactId>aai-schema</artifactId>
407                                                                         <version>${aai-schema.version}</version>
408                                                                         <type>jar</type>
409                                                                         <includes>${aai.schema.source.folder}/aai_schema_v**.xsd</includes>
410                                                                         <outputDirectory>${project.build.directory}/tmp</outputDirectory>
411                                                                 </artifactItem>
412                                                         </artifactItems>
413                                                 </configuration>
414                                         </execution>
415                                 </executions>
416                         </plugin>
417                         <plugin>
418                                 <groupId>org.apache.maven.plugins</groupId>
419                                 <artifactId>maven-antrun-plugin</artifactId>
420                                 <version>${antrun.version}</version>
421                                 <executions>
422                                         <execution>
423                                                 <id>Flatten XSDs</id>
424                                                 <phase>initialize</phase>
425                                                 <goals>
426                                                         <goal>run</goal>
427                                                 </goals>
428                                                 <configuration>
429                                                         <target>
430                                                                 <copy todir="${aai.schema.target.folder}" flatten="true">
431                                                                         <fileset dir="${project.build.directory}/tmp">
432                                                                                 <include name="**/*.xsd" />
433                                                                         </fileset>
434                                                                 </copy>
435                                                         </target>
436                                                 </configuration>
437                                         </execution>
438                                 </executions>
439                         </plugin>
440                         <plugin>
441                                 <groupId>org.jvnet.jaxb2.maven2</groupId>
442                                 <artifactId>maven-jaxb2-plugin</artifactId>
443                                 <version>${mvn.jaxb2.version}</version>
444                                 <executions>
445                                         <execution>
446                                                 <phase>process-sources</phase>
447                                                 <goals>
448                                                         <goal>generate</goal>
449                                                 </goals>
450                                         </execution>
451                                 </executions>
452                                 <configuration>
453                                         <schemaDirectory>${aai.schema.target.folder}</schemaDirectory>
454                                         <generatePackage>org.onap.aai.babel.xml.generator.xsd</generatePackage>
455                                         <generateDirectory>${project.build.directory}/generated-sources</generateDirectory>
456                                         <schemaIncludes>
457                                                 <include>aai_schema_latest.xsd</include>
458                                         </schemaIncludes>
459                                         <extension>true</extension>
460                                         <args>
461                                                 <arg>-Xannotate</arg>
462                                         </args>
463                                         <plugins>
464                                                 <plugin>
465                                                         <groupId>org.jvnet.jaxb2_commons</groupId>
466                                                         <artifactId>jaxb2-basics-annotate</artifactId>
467                                                         <version>0.6.4</version>
468                                                 </plugin>
469                                                 <!-- Add the dependencies with your annotations as 'plugins' below -->
470                                                 <plugin>
471                                                         <groupId>org.jvnet.jaxb2_commons</groupId>
472                                                         <artifactId>jaxb2-annotate-plugin-test-annox-annotations</artifactId>
473                                                         <version>1.0.0</version>
474                                                 </plugin>
475                                         </plugins>
476                                 </configuration>
477                         </plugin>
478                         <plugin>
479                                 <artifactId>exec-maven-plugin</artifactId>
480                                 <groupId>org.codehaus.mojo</groupId>
481                                 <version>1.5.0</version>
482                                 <executions>
483                                         <execution>
484                                                 <!-- Run our script to get latest xsd version -->
485                                                 <id>Get latest xsd version</id>
486                                                 <phase>generate-sources</phase>
487                                                 <goals>
488                                                         <goal>exec</goal>
489                                                 </goals>
490                                                 <configuration>
491                                                         <workingDirectory>${basedir}/scripts</workingDirectory>
492                                                         <executable>bash</executable>
493                                                         <commandlineArgs>get-latest-xsd-version.sh ${basedir}</commandlineArgs>
494                                                 </configuration>
495                                         </execution>
496                                 </executions>
497                         </plugin>
498                         <plugin>
499                                 <artifactId>maven-assembly-plugin</artifactId>
500                                 <configuration>
501                                         <descriptors>
502                                                 <descriptor>src/main/assembly/descriptor.xml</descriptor>
503                                         </descriptors>
504                                 </configuration>
505                                 <executions>
506                                         <execution>
507                                                 <id>make-assembly</id>
508                                                 <phase>package</phase>
509                                                 <goals>
510                                                         <goal>single</goal>
511                                                 </goals>
512                                         </execution>
513                                 </executions>
514                         </plugin>
515                         <plugin>
516                                 <groupId>com.mycila</groupId>
517                                 <artifactId>license-maven-plugin</artifactId>
518                                 <version>3.0</version>
519                                 <configuration>
520                                         <header>License.txt</header>
521                                         <includes>
522                                                 <include>src/main/java/**</include>
523                                                 <include>src/test/java/**</include>
524                                                 <include>pom.xml</include>
525                                         </includes>
526                                         <skipExistingHeaders>true</skipExistingHeaders>
527                                 </configuration>
528                                 <executions>
529                                         <execution>
530                                                 <goals>
531                                                         <!-- Set goal from "check" to "format" to auto update license headers -->
532                                                         <goal>check</goal>
533                                                 </goals>
534                                                 <phase>validate</phase>
535                                         </execution>
536                                 </executions>
537                         </plugin>
538                         <plugin>
539                                 <groupId>org.apache.maven.plugins</groupId>
540                                 <artifactId>maven-compiler-plugin</artifactId>
541                                 <version>${maven-compiler-plugin.version}</version>
542                                 <inherited>true</inherited>
543                                 <configuration>
544                                         <source>${maven-compiler-plugin.source}</source>
545                                         <target>${maven-compiler-plugin.target}</target>
546                                         <testSource>${maven-compiler-plugin.test.source}</testSource>
547                                         <testTarget>${maven-compiler-plugin.test.target}</testTarget>
548                                 </configuration>
549                         </plugin>
550                         <plugin>
551                                 <groupId>org.apache.maven.plugins</groupId>
552                                 <artifactId>maven-jar-plugin</artifactId>
553                                 <version>3.0.2</version>
554                                 <executions>
555                                         <execution>
556                                                 <phase>package</phase>
557                                                 <goals>
558                                                         <goal>jar</goal>
559                                                 </goals>
560                                                 <configuration>
561                                                         <classifier>client</classifier>
562                                                         <includes>
563                                                                 <include>**/babel/service/data/*</include>
564                                                         </includes>
565                                                 </configuration>
566                                         </execution>
567                                 </executions>
568                         </plugin>
569                         <plugin>
570                                 <groupId>org.apache.maven.plugins</groupId>
571                                 <artifactId>maven-deploy-plugin</artifactId>
572                                 <configuration>
573                                         <classifier>client</classifier>
574                                 </configuration>
575                         </plugin>
576
577
578                         <!-- once we connect aai-parent or oparent 3.0+ we can take out this
579                  whole section -->
580
581                         <plugin>
582                                 <groupId>org.jacoco</groupId>
583                                 <artifactId>jacoco-maven-plugin</artifactId>
584                                 <version>${jacoco-maven-plugin.version}</version>
585                                 <configuration>
586                                         <!-- Note: This exclusion list should match <sonar.exclusions> property
587                      above -->
588                                         <excludes>
589                                                 <exclude>**/gen/**</exclude>
590                                                 <exclude>**/generated-sources/**</exclude>
591                                                 <exclude>**/yang-gen/**</exclude>
592                                                 <exclude>**/pax/**</exclude>
593                                                 <exclude>org/onap/aai/babel/xml/generator/xsd/*</exclude>
594                                         </excludes>
595                                 </configuration>
596                                 <executions>
597                                         <!-- Prepares the property pointing to the JaCoCo runtime agent which
598                      is passed as VM argument when Maven the Surefire plugin is executed. -->
599                                         <execution>
600                                                 <id>pre-unit-test</id>
601                                                 <goals>
602                                                         <goal>prepare-agent</goal>
603                                                 </goals>
604                                                 <configuration>
605                                                         <!-- Sets the path to the file which contains the execution data
606                                  . -->
607                                                         <destFile>${project.build.directory}/code-coverage/jacoco-ut.exec</destFile>
608                                                         <!-- Sets the name of the property containing the settings for JaCoCo
609                                  runtime agent. -->
610                                                         <propertyName>surefireArgLine</propertyName>
611                                                 </configuration>
612                                         </execution>
613                                         <!-- Ensures that the code coverage report for unit tests is created
614                      after unit tests have been run. -->
615                                         <execution>
616                                                 <id>post-unit-test</id>
617                                                 <phase>test</phase>
618                                                 <goals>
619                                                         <goal>report</goal>
620                                                 </goals>
621                                                 <configuration>
622                                                         <!-- Sets the path to the file which contains the execution data
623                                  . -->
624                                                         <dataFile>${project.build.directory}/code-coverage/jacoco-ut.exec</dataFile>
625                                                         <!-- Sets the output directory for the code coverage report. -->
626                                                         <outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory>
627                                                 </configuration>
628                                         </execution>
629                                         <execution>
630                                                 <id>pre-integration-test</id>
631                                                 <phase>pre-integration-test</phase>
632                                                 <goals>
633                                                         <goal>prepare-agent</goal>
634                                                 </goals>
635                                                 <configuration>
636                                                         <!-- Sets the path to the file which contains the execution data
637                                  . -->
638                                                         <destFile>${project.build.directory}/code-coverage/jacoco-it.exec</destFile>
639                                                         <!-- Sets the name of the property containing the settings for JaCoCo
640                                  runtime agent. -->
641                                                         <propertyName>failsafeArgLine</propertyName>
642                                                 </configuration>
643                                         </execution>
644                                         <!-- Ensures that the code coverage report for integration tests after
645                      integration tests have been run. -->
646                                         <execution>
647                                                 <id>post-integration-test</id>
648                                                 <phase>post-integration-test</phase>
649                                                 <goals>
650                                                         <goal>report</goal>
651                                                 </goals>
652                                                 <configuration>
653                                                         <!-- Sets the path to the file which contains the execution data
654                                  . -->
655                                                         <dataFile>${project.build.directory}/code-coverage/jacoco-it.exec</dataFile>
656                                                         <!-- Sets the output directory for the code coverage report. -->
657                                                         <outputDirectory>${project.reporting.outputDirectory}/jacoco-it</outputDirectory>
658                                                 </configuration>
659                                         </execution>
660                                         <execution>
661                                                 <id>default-check</id>
662                                                 <goals>
663                                                         <goal>check</goal>
664                                                 </goals>
665                                                 <configuration>
666                                                         <dataFile>${project.build.directory}/code-coverage/jacoco-ut.exec</dataFile>
667                                                         <rules>
668                                                                 <rule implementation="org.jacoco.maven.RuleConfiguration">
669                                                                         <element>BUNDLE</element>
670                                                                         <limits>
671                                                                                 <limit implementation="org.jacoco.report.check.Limit">
672                                                                                         <counter>LINE</counter>
673                                                                                         <value>COVEREDRATIO</value>
674                                                                                         <minimum>${jacoco.line.coverage.limit}</minimum>
675                                                                                 </limit>
676                                                                         </limits>
677                                                                 </rule>
678                                                         </rules>
679                                                 </configuration>
680                                         </execution>
681                                 </executions>
682                         </plugin>
683                         <plugin>
684                                 <groupId>org.apache.maven.plugins</groupId>
685                                 <artifactId>maven-surefire-plugin</artifactId>
686                                 <version>3.0.0-M4</version>
687                                 <configuration>
688                                         <!-- Sets the VM argument line used when unit tests are run. -->
689                                         <reuseForks>false</reuseForks>
690                                         <forkCount>1</forkCount>
691                                         <environmentVariables>
692                                                 <APP_HOME>.</APP_HOME>
693                                                 <CONFIG_HOME>src/test/resources</CONFIG_HOME>
694                                         </environmentVariables>
695                                         <argLine>${surefireArgLine}</argLine>
696                                         <!-- Excludes integration tests when unit tests are run. -->
697                                         <excludes>
698                                                 <exclude>**/IT*.java</exclude>
699                                         </excludes>
700                                 </configuration>
701                         </plugin>
702                         <plugin>
703                                 <groupId>org.apache.maven.plugins</groupId>
704                                 <artifactId>maven-failsafe-plugin</artifactId>
705                                 <version>3.0.0-M5</version>
706                                 <executions>
707                                         <!-- Ensures that both integration-test and verify goals of the Failsafe
708                      Maven plugin are executed. -->
709                                         <execution>
710                                                 <id>integration-tests</id>
711                                                 <goals>
712                                                         <goal>integration-test</goal>
713                                                         <goal>verify</goal>
714                                                 </goals>
715                                                 <configuration>
716                                                         <!-- Sets the VM argument line used when integration tests are run. -->
717                                                         <argLine>${failsafeArgLine}</argLine>
718                                                 </configuration>
719                                         </execution>
720                                 </executions>
721                         </plugin>
722                         <plugin>
723                                 <groupId>org.sonarsource.scanner.maven</groupId>
724                                 <artifactId>sonar-maven-plugin</artifactId>
725                                 <version>${sonar.scanner.version}</version>
726                         </plugin>
727                         <!-- end removable sonar config, note the additional exclusion for babel above -->
728                 </plugins>
729         </build>
730
731 </project>