Create 1.13.0 maven release
[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.13.3</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>org.hamcrest</groupId>
336       <artifactId>hamcrest</artifactId>
337       <version>2.2</version>
338       <scope>test</scope>
339     </dependency>
340     <dependency>
341       <groupId>org.junit.jupiter</groupId>
342       <artifactId>junit-jupiter</artifactId>
343       <version>5.10.2</version>
344       <scope>test</scope>
345     </dependency>
346     <dependency>
347       <groupId>org.junit.jupiter</groupId>
348       <artifactId>junit-jupiter-api</artifactId>
349       <scope>test</scope>
350     </dependency>
351
352                 <dependency>
353                         <groupId>org.xmlunit</groupId>
354                         <artifactId>xmlunit-legacy</artifactId>
355                         <scope>test</scope>
356                 </dependency>
357                 <dependency>
358                         <groupId>javax.xml.bind</groupId>
359                         <artifactId>jaxb-api</artifactId>
360                 </dependency>
361                 <dependency>
362                         <groupId>javax.xml.ws</groupId>
363                         <artifactId>jaxws-api</artifactId>
364                 </dependency>
365                 <dependency>
366                         <groupId>com.sun.xml.bind</groupId>
367                         <artifactId>jaxb-core</artifactId>
368                 </dependency>
369                 <dependency>
370                         <groupId>com.sun.xml.bind</groupId>
371                         <artifactId>jaxb-impl</artifactId>
372                 </dependency>
373                 <dependency>
374                         <groupId>jakarta.activation</groupId>
375                         <artifactId>jakarta.activation-api</artifactId>
376                         <version>${jakarta.activation.version}</version>
377                 </dependency>
378         </dependencies>
379
380         <build>
381                 <plugins>
382                         <plugin>
383                                 <groupId>org.springframework.boot</groupId>
384                                 <artifactId>spring-boot-maven-plugin</artifactId>
385                                 <version>${spring.boot.version}</version>
386                                 <configuration>
387                                         <jvmArguments>
388                                                 -DCONFIG_HOME=./appconfig-local
389                                                 -DAPP_HOME=.
390                                                 -Dtosca.mappings.config=./appconfig-local/tosca-mappings.json
391                                                 -DKEY_STORE_PASSWORD=${KEY_STORE_PASSWORD}
392                                         </jvmArguments>
393                                 </configuration>
394                                 <executions>
395                                         <execution>
396                                                 <goals>
397                                                         <goal>repackage</goal>
398                                                 </goals>
399                                         </execution>
400                                 </executions>
401                         </plugin>
402                         <plugin>
403                                 <groupId>org.apache.maven.plugins</groupId>
404                                 <artifactId>maven-dependency-plugin</artifactId>
405                                 <executions>
406                                         <execution>
407                                                 <id>unpack</id>
408                                                 <phase>initialize</phase>
409                                                 <goals>
410                                                         <goal>unpack</goal>
411                                                 </goals>
412                                                 <configuration>
413                                                         <artifactItems>
414                                                                 <artifactItem>
415                                                                         <groupId>${aai-schema.group.id}</groupId>
416                                                                         <artifactId>aai-schema</artifactId>
417                                                                         <version>${aai-schema.version}</version>
418                                                                         <type>jar</type>
419                                                                         <includes>${aai.schema.source.folder}/aai_schema_v**.xsd</includes>
420                                                                         <outputDirectory>${project.build.directory}/tmp</outputDirectory>
421                                                                 </artifactItem>
422                                                         </artifactItems>
423                                                 </configuration>
424                                         </execution>
425                                 </executions>
426                         </plugin>
427                         <plugin>
428                                 <groupId>org.apache.maven.plugins</groupId>
429                                 <artifactId>maven-antrun-plugin</artifactId>
430                                 <version>${antrun.version}</version>
431                                 <executions>
432                                         <execution>
433                                                 <id>Flatten XSDs</id>
434                                                 <phase>initialize</phase>
435                                                 <goals>
436                                                         <goal>run</goal>
437                                                 </goals>
438                                                 <configuration>
439                                                         <target>
440                                                                 <copy todir="${aai.schema.target.folder}" flatten="true">
441                                                                         <fileset dir="${project.build.directory}/tmp">
442                                                                                 <include name="**/*.xsd" />
443                                                                         </fileset>
444                                                                 </copy>
445                                                         </target>
446                                                 </configuration>
447                                         </execution>
448                                 </executions>
449                         </plugin>
450                         <plugin>
451                                 <groupId>org.jvnet.jaxb2.maven2</groupId>
452                                 <artifactId>maven-jaxb2-plugin</artifactId>
453                                 <version>${mvn.jaxb2.version}</version>
454                                 <executions>
455                                         <execution>
456                                                 <phase>process-sources</phase>
457                                                 <goals>
458                                                         <goal>generate</goal>
459                                                 </goals>
460                                         </execution>
461                                 </executions>
462                                 <configuration>
463                                         <schemaDirectory>${aai.schema.target.folder}</schemaDirectory>
464                                         <generatePackage>org.onap.aai.babel.xml.generator.xsd</generatePackage>
465                                         <generateDirectory>${project.build.directory}/generated-sources</generateDirectory>
466                                         <schemaIncludes>
467                                                 <include>aai_schema_latest.xsd</include>
468                                         </schemaIncludes>
469                                         <extension>true</extension>
470                                         <args>
471                                                 <arg>-Xannotate</arg>
472                                         </args>
473                                         <plugins>
474                                                 <plugin>
475                                                         <groupId>org.jvnet.jaxb2_commons</groupId>
476                                                         <artifactId>jaxb2-basics-annotate</artifactId>
477                                                         <version>0.6.4</version>
478                                                 </plugin>
479                                                 <!-- Add the dependencies with your annotations as 'plugins' below -->
480                                                 <plugin>
481                                                         <groupId>org.jvnet.jaxb2_commons</groupId>
482                                                         <artifactId>jaxb2-annotate-plugin-test-annox-annotations</artifactId>
483                                                         <version>1.0.0</version>
484                                                 </plugin>
485                                         </plugins>
486                                 </configuration>
487                         </plugin>
488                         <plugin>
489                                 <artifactId>exec-maven-plugin</artifactId>
490                                 <groupId>org.codehaus.mojo</groupId>
491                                 <version>1.5.0</version>
492                                 <executions>
493                                         <execution>
494                                                 <!-- Run our script to get latest xsd version -->
495                                                 <id>Get latest xsd version</id>
496                                                 <phase>generate-sources</phase>
497                                                 <goals>
498                                                         <goal>exec</goal>
499                                                 </goals>
500                                                 <configuration>
501                                                         <workingDirectory>${basedir}/scripts</workingDirectory>
502                                                         <executable>bash</executable>
503                                                         <commandlineArgs>get-latest-xsd-version.sh ${basedir}</commandlineArgs>
504                                                 </configuration>
505                                         </execution>
506                                 </executions>
507                         </plugin>
508                         <plugin>
509                                 <artifactId>maven-assembly-plugin</artifactId>
510                                 <configuration>
511                                         <descriptors>
512                                                 <descriptor>src/main/assembly/descriptor.xml</descriptor>
513                                         </descriptors>
514                                 </configuration>
515                                 <executions>
516                                         <execution>
517                                                 <id>make-assembly</id>
518                                                 <phase>package</phase>
519                                                 <goals>
520                                                         <goal>single</goal>
521                                                 </goals>
522                                         </execution>
523                                 </executions>
524                         </plugin>
525                         <plugin>
526                                 <groupId>com.mycila</groupId>
527                                 <artifactId>license-maven-plugin</artifactId>
528                                 <version>3.0</version>
529                                 <configuration>
530                                         <header>License.txt</header>
531                                         <includes>
532                                                 <include>src/main/java/**</include>
533                                                 <include>src/test/java/**</include>
534                                                 <include>pom.xml</include>
535                                         </includes>
536                                         <skipExistingHeaders>true</skipExistingHeaders>
537                                 </configuration>
538                                 <executions>
539                                         <execution>
540                                                 <goals>
541                                                         <!-- Set goal from "check" to "format" to auto update license headers -->
542                                                         <goal>check</goal>
543                                                 </goals>
544                                                 <phase>validate</phase>
545                                         </execution>
546                                 </executions>
547                         </plugin>
548                         <plugin>
549                                 <groupId>org.apache.maven.plugins</groupId>
550                                 <artifactId>maven-compiler-plugin</artifactId>
551                                 <version>${maven-compiler-plugin.version}</version>
552                                 <inherited>true</inherited>
553                                 <configuration>
554                                         <source>${maven-compiler-plugin.source}</source>
555                                         <target>${maven-compiler-plugin.target}</target>
556                                         <testSource>${maven-compiler-plugin.test.source}</testSource>
557                                         <testTarget>${maven-compiler-plugin.test.target}</testTarget>
558                                 </configuration>
559                         </plugin>
560                         <plugin>
561                                 <groupId>org.apache.maven.plugins</groupId>
562                                 <artifactId>maven-jar-plugin</artifactId>
563                                 <version>3.0.2</version>
564                                 <executions>
565                                         <execution>
566                                                 <phase>package</phase>
567                                                 <goals>
568                                                         <goal>jar</goal>
569                                                 </goals>
570                                                 <configuration>
571                                                         <classifier>client</classifier>
572                                                         <includes>
573                                                                 <include>**/babel/service/data/*</include>
574                                                         </includes>
575                                                 </configuration>
576                                         </execution>
577                                 </executions>
578                         </plugin>
579                         <plugin>
580                                 <groupId>org.apache.maven.plugins</groupId>
581                                 <artifactId>maven-deploy-plugin</artifactId>
582                                 <configuration>
583                                         <classifier>client</classifier>
584                                 </configuration>
585                         </plugin>
586
587
588                         <!-- once we connect aai-parent or oparent 3.0+ we can take out this
589                  whole section -->
590
591                         <plugin>
592                                 <groupId>org.jacoco</groupId>
593                                 <artifactId>jacoco-maven-plugin</artifactId>
594                                 <version>${jacoco-maven-plugin.version}</version>
595                                 <configuration>
596                                         <!-- Note: This exclusion list should match <sonar.exclusions> property
597                      above -->
598                                         <excludes>
599                                                 <exclude>**/gen/**</exclude>
600                                                 <exclude>**/generated-sources/**</exclude>
601                                                 <exclude>**/yang-gen/**</exclude>
602                                                 <exclude>**/pax/**</exclude>
603                                                 <exclude>org/onap/aai/babel/xml/generator/xsd/*</exclude>
604                                         </excludes>
605                                 </configuration>
606                                 <executions>
607                                         <!-- Prepares the property pointing to the JaCoCo runtime agent which
608                      is passed as VM argument when Maven the Surefire plugin is executed. -->
609                                         <execution>
610                                                 <id>pre-unit-test</id>
611                                                 <goals>
612                                                         <goal>prepare-agent</goal>
613                                                 </goals>
614                                                 <configuration>
615                                                         <!-- Sets the path to the file which contains the execution data
616                                  . -->
617                                                         <destFile>${project.build.directory}/code-coverage/jacoco-ut.exec</destFile>
618                                                         <!-- Sets the name of the property containing the settings for JaCoCo
619                                  runtime agent. -->
620                                                         <propertyName>surefireArgLine</propertyName>
621                                                 </configuration>
622                                         </execution>
623                                         <!-- Ensures that the code coverage report for unit tests is created
624                      after unit tests have been run. -->
625                                         <execution>
626                                                 <id>post-unit-test</id>
627                                                 <phase>test</phase>
628                                                 <goals>
629                                                         <goal>report</goal>
630                                                 </goals>
631                                                 <configuration>
632                                                         <!-- Sets the path to the file which contains the execution data
633                                  . -->
634                                                         <dataFile>${project.build.directory}/code-coverage/jacoco-ut.exec</dataFile>
635                                                         <!-- Sets the output directory for the code coverage report. -->
636                                                         <outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory>
637                                                 </configuration>
638                                         </execution>
639                                         <execution>
640                                                 <id>pre-integration-test</id>
641                                                 <phase>pre-integration-test</phase>
642                                                 <goals>
643                                                         <goal>prepare-agent</goal>
644                                                 </goals>
645                                                 <configuration>
646                                                         <!-- Sets the path to the file which contains the execution data
647                                  . -->
648                                                         <destFile>${project.build.directory}/code-coverage/jacoco-it.exec</destFile>
649                                                         <!-- Sets the name of the property containing the settings for JaCoCo
650                                  runtime agent. -->
651                                                         <propertyName>failsafeArgLine</propertyName>
652                                                 </configuration>
653                                         </execution>
654                                         <!-- Ensures that the code coverage report for integration tests after
655                      integration tests have been run. -->
656                                         <execution>
657                                                 <id>post-integration-test</id>
658                                                 <phase>post-integration-test</phase>
659                                                 <goals>
660                                                         <goal>report</goal>
661                                                 </goals>
662                                                 <configuration>
663                                                         <!-- Sets the path to the file which contains the execution data
664                                  . -->
665                                                         <dataFile>${project.build.directory}/code-coverage/jacoco-it.exec</dataFile>
666                                                         <!-- Sets the output directory for the code coverage report. -->
667                                                         <outputDirectory>${project.reporting.outputDirectory}/jacoco-it</outputDirectory>
668                                                 </configuration>
669                                         </execution>
670                                         <execution>
671                                                 <id>default-check</id>
672                                                 <goals>
673                                                         <goal>check</goal>
674                                                 </goals>
675                                                 <configuration>
676                                                         <dataFile>${project.build.directory}/code-coverage/jacoco-ut.exec</dataFile>
677                                                         <rules>
678                                                                 <rule implementation="org.jacoco.maven.RuleConfiguration">
679                                                                         <element>BUNDLE</element>
680                                                                         <limits>
681                                                                                 <limit implementation="org.jacoco.report.check.Limit">
682                                                                                         <counter>LINE</counter>
683                                                                                         <value>COVEREDRATIO</value>
684                                                                                         <minimum>${jacoco.line.coverage.limit}</minimum>
685                                                                                 </limit>
686                                                                         </limits>
687                                                                 </rule>
688                                                         </rules>
689                                                 </configuration>
690                                         </execution>
691                                 </executions>
692                         </plugin>
693                         <plugin>
694                                 <groupId>org.apache.maven.plugins</groupId>
695                                 <artifactId>maven-surefire-plugin</artifactId>
696                                 <version>3.0.0-M4</version>
697                                 <configuration>
698                                         <!-- Sets the VM argument line used when unit tests are run. -->
699                                         <reuseForks>false</reuseForks>
700                                         <forkCount>1</forkCount>
701                                         <environmentVariables>
702                                                 <APP_HOME>.</APP_HOME>
703                                                 <CONFIG_HOME>src/test/resources</CONFIG_HOME>
704                                         </environmentVariables>
705                                         <argLine>${surefireArgLine}</argLine>
706                                         <!-- Excludes integration tests when unit tests are run. -->
707                                         <excludes>
708                                                 <exclude>**/IT*.java</exclude>
709                                         </excludes>
710                                 </configuration>
711                         </plugin>
712                         <plugin>
713                                 <groupId>org.apache.maven.plugins</groupId>
714                                 <artifactId>maven-failsafe-plugin</artifactId>
715                                 <version>3.0.0-M5</version>
716                                 <executions>
717                                         <!-- Ensures that both integration-test and verify goals of the Failsafe
718                      Maven plugin are executed. -->
719                                         <execution>
720                                                 <id>integration-tests</id>
721                                                 <goals>
722                                                         <goal>integration-test</goal>
723                                                         <goal>verify</goal>
724                                                 </goals>
725                                                 <configuration>
726                                                         <!-- Sets the VM argument line used when integration tests are run. -->
727                                                         <argLine>${failsafeArgLine}</argLine>
728                                                 </configuration>
729                                         </execution>
730                                 </executions>
731                         </plugin>
732                         <plugin>
733                                 <groupId>org.sonarsource.scanner.maven</groupId>
734                                 <artifactId>sonar-maven-plugin</artifactId>
735                                 <version>${sonar.scanner.version}</version>
736                         </plugin>
737                         <!-- end removable sonar config, note the additional exclusion for babel above -->
738                 </plugins>
739         </build>
740
741 </project>