blob: d133eb4bdbc55d0e42345f8646aa7c7f0a0c4bf5 [file] [log] [blame]
Lee, Tian (tl5884)e651abe2018-04-27 17:50:07 +01001<?xml version="1.0" encoding="UTF-8"?>
Lee, Tian (tl5884)9d81a172018-04-17 15:31:49 +01002<!--
3
mark.j.leonard1bde7e32018-08-06 16:58:34 +01004 ============LICENSE_START=======================================================
Lee, Tian (tl5884)9d81a172018-04-17 15:31:49 +01005 org.onap.aai
6 ================================================================================
mark.j.leonardd2215b52019-03-25 15:50:45 +00007 Copyright (c) 2017-2019 AT&T Intellectual Property. All rights reserved.
8 Copyright (c) 2017-2019 European Software Marketing Ltd.
Lee, Tian (tl5884)9d81a172018-04-17 15:31:49 +01009 ================================================================================
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-->
Lee, Tian (tl5884)9a526162019-10-03 12:22:40 +010024<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>
Edwin Lawrance1433a672017-09-22 16:55:07 +010027
Lee, Tian (tl5884)9a526162019-10-03 12:22:40 +010028 <parent>
29 <groupId>org.onap.oparent</groupId>
30 <artifactId>oparent</artifactId>
Forsyth, James (jf2512)e5f7f4d2020-02-14 15:46:08 -050031 <version>2.1.0</version>
Lee, Tian (tl5884)9a526162019-10-03 12:22:40 +010032 <relativePath />
33 </parent>
Lee, Tian (tl5884)e651abe2018-04-27 17:50:07 +010034
Lee, Tian (tl5884)9a526162019-10-03 12:22:40 +010035 <groupId>org.onap.aai</groupId>
36 <artifactId>babel</artifactId>
efiacorfb8f84d2020-08-30 12:46:28 +010037 <version>1.7.1-SNAPSHOT</version>
Lee, Tian (tl5884)9a526162019-10-03 12:22:40 +010038 <packaging>jar</packaging>
Lee, Tian (tl5884)e651abe2018-04-27 17:50:07 +010039
Lee, Tian (tl5884)9a526162019-10-03 12:22:40 +010040 <name>aai-babel</name>
41 <description>ONAP AAI Babel Microservice</description>
Edwin Lawrance1433a672017-09-22 16:55:07 +010042
Lee, Tian (tl5884)9a526162019-10-03 12:22:40 +010043 <properties>
44 <!-- Spring boot version -->
Jimmy Forsyth4bc46182020-04-08 10:31:19 -040045 <spring.boot.version>2.1.12.RELEASE</spring.boot.version>
Edwin Lawrance1433a672017-09-22 16:55:07 +010046
Lee, Tian (tl5884)9a526162019-10-03 12:22:40 +010047 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
48 <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
49 <java.version>1.8</java.version>
50 <aai.schema.source.folder>onap/aai_schema</aai.schema.source.folder>
51 <aai.schema.target.folder>${project.build.directory}/aai-schema</aai.schema.target.folder>
Forsyth, James (jf2512)e5f7f4d2020-02-14 15:46:08 -050052
53 <sonar.jacoco.reportPath />
54 <sonar.jacoco.itReportPath />
55 <sonar.jacoco.reportMissing.force.zero />
56
Lee, Tian (tl5884)9a526162019-10-03 12:22:40 +010057 <jacoco.line.coverage.limit>0.90</jacoco.line.coverage.limit>
Forsyth, James (jf2512)e5f7f4d2020-02-14 15:46:08 -050058 <jacoco.version>0.8.5</jacoco.version>
59 <sonar-jacoco-listeners.version>3.2</sonar-jacoco-listeners.version>
60 <sonar.core.codeCoveragePlugin>jacoco</sonar.core.codeCoveragePlugin>
61 <sonar.coverage.jacoco.xmlReportPaths>${project.reporting.outputDirectory}/jacoco-ut/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths>
62 <sonar.exclusions>**/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/**</sonar.exclusions>
63
64 <sonar.scanner.version>3.7.0.1746</sonar.scanner.version>
Edwin Lawrance1433a672017-09-22 16:55:07 +010065
Dmitry Puzikov1a0b2332019-04-16 16:53:15 +020066 <!-- docker related properties -->
Lee, Tian (tl5884)9a526162019-10-03 12:22:40 +010067 <docker.fabric.version>0.28.0</docker.fabric.version>
68 <aai.docker.version>1.0.0</aai.docker.version>
69 <aai.build.directory>${project.build.directory}/${project.artifactId}-${project.version}-build/
70 </aai.build.directory>
71 <aai.docker.namespace>onap</aai.docker.namespace>
72 <aai.base.image>alpine</aai.base.image>
73 <aai.base.image.version>1.6.0</aai.base.image.version>
Edwin Lawrance1433a672017-09-22 16:55:07 +010074
Lee, Tian (tl5884)9a526162019-10-03 12:22:40 +010075 <!-- Dependency Versions -->
76 <common.logging.version>1.2.2</common.logging.version>
77 <sdc.tosca.version>1.5.1</sdc.tosca.version>
78 <commons.compress.version>1.18</commons.compress.version>
79 <javax.ws.rs.version>2.1</javax.ws.rs.version>
80 <mvn.jaxb2.version>0.13.2</mvn.jaxb2.version>
81 <aai-schema.group.id>org.onap.aai.schema-service</aai-schema.group.id>
efiacor237b2102020-08-27 13:07:44 +010082 <aai-schema.version>1.7.6</aai-schema.version>
Lee, Tian (tl5884)9a526162019-10-03 12:22:40 +010083 <aai.rest.client.version>1.2.1</aai.rest.client.version>
84 <sdc.distribution.client.version>1.3.0</sdc.distribution.client.version>
85 <xmlunit.version>1.6</xmlunit.version>
86 <logback.version>1.2.3</logback.version>
87 <antrun.version>1.8</antrun.version>
Chris AndreĢ66001752020-07-10 11:44:49 -040088 <jaxb.version>2.2.11</jaxb.version>
89 <javax.activation.version>1.1.1</javax.activation.version>
Dmitry Puzikov1a0b2332019-04-16 16:53:15 +020090 <!-- This will be used for the docker images as the default format of maven build has issues -->
Lee, Tian (tl5884)9a526162019-10-03 12:22:40 +010091 <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
92 </properties>
Lee, Tian (tl5884)e651abe2018-04-27 17:50:07 +010093
Lee, Tian (tl5884)9a526162019-10-03 12:22:40 +010094 <dependencyManagement>
95 <dependencies>
96 <dependency>
97 <!-- Import dependency management from Spring Boot -->
98 <groupId>org.springframework.boot</groupId>
99 <artifactId>spring-boot-dependencies</artifactId>
100 <version>${spring.boot.version}</version>
101 <type>pom</type>
102 <scope>import</scope>
103 </dependency>
104 </dependencies>
105 </dependencyManagement>
Edwin Lawrance1433a672017-09-22 16:55:07 +0100106
Lee, Tian (tl5884)9a526162019-10-03 12:22:40 +0100107 <profiles>
Dmitry Puzikov1a0b2332019-04-16 16:53:15 +0200108 <!-- Docker profile to be used for building docker image and pushing to nexus -->
Lee, Tian (tl5884)9a526162019-10-03 12:22:40 +0100109 <profile>
110 <id>docker</id>
111 <build>
112 <plugins>
113 <plugin>
114 <groupId>org.codehaus.mojo</groupId>
115 <artifactId>build-helper-maven-plugin</artifactId>
116 <version>3.0.0</version>
117 <executions>
118 <execution>
119 <phase>pre-clean</phase>
120 <id>parse-version</id>
121 <goals>
122 <goal>parse-version</goal>
123 </goals>
124 </execution>
125 </executions>
126 </plugin>
127 <plugin>
128 <groupId>org.codehaus.groovy.maven</groupId>
129 <artifactId>gmaven-plugin</artifactId>
130 <version>1.0</version>
131 <executions>
132 <execution>
133 <phase>pre-clean</phase>
134 <goals>
135 <goal>execute</goal>
136 </goals>
137 <configuration>
138 <source>
139 def userAaiBaseImage = session.userProperties['aai.base.image'];
140 def userAaiCommonVersion = session.userProperties['aai.base.image.version'];
141 if (userAaiCommonVersion != null) {
142 project.properties['aai.base.image.version'] = userAaiCommonVersion;
143 }
144 if (userAaiBaseImage != null) {
145 project.properties['aai.base.image'] = userAaiBaseImage;
146 }
147 log.info 'Base image flavour: ' + project.properties['aai.base.image'];
148 log.info 'Base image version: ' + project.properties['aai.base.image.version'];
149 </source>
150 </configuration>
151 </execution>
152 </executions>
153 </plugin>
154 <plugin>
155 <groupId>io.fabric8</groupId>
156 <artifactId>docker-maven-plugin</artifactId>
157 <version>${docker.fabric.version}</version>
158 <configuration>
159 <verbose>true</verbose>
160 <apiVersion>1.23</apiVersion>
161 <images>
162 <image>
163 <name>${docker.push.registry}/${aai.docker.namespace}/${project.artifactId}:%l
164 </name>
165 <build>
166 <filter>@</filter>
167 <tags>
168 <tag>latest</tag>
169 <tag>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}-STAGING-latest</tag>
170 <tag>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}-STAGING-${maven.build.timestamp}</tag>
171 </tags>
172 <cleanup>try</cleanup>
173 <dockerFileDir>${project.basedir}/src/main/docker</dockerFileDir>
174 <assembly>
175 <inline>
176 <fileSets>
177 <fileSet>
178 <directory>${aai.build.directory}</directory>
179 <outputDirectory>/${project.artifactId}</outputDirectory>
180 </fileSet>
181 </fileSets>
182 </inline>
183 </assembly>
184 </build>
185 </image>
186 </images>
187 </configuration>
188 <executions>
189 <execution>
190 <id>clean-images</id>
191 <phase>pre-clean</phase>
192 <goals>
193 <goal>remove</goal>
194 </goals>
195 <configuration>
196 <removeAll>true</removeAll>
197 </configuration>
198 </execution>
199 <execution>
200 <id>generate-images</id>
201 <phase>package</phase>
202 <goals>
203 <goal>build</goal>
204 </goals>
205 </execution>
206 <execution>
207 <id>push-images</id>
208 <phase>deploy</phase>
209 <goals>
210 <goal>push</goal>
211 </goals>
212 </execution>
213 </executions>
214 </plugin>
215 </plugins>
216 </build>
217 </profile>
218 </profiles>
219 <dependencies>
220 <dependency>
221 <groupId>org.springframework.boot</groupId>
222 <artifactId>spring-boot-starter-jetty</artifactId>
223 </dependency>
224 <dependency>
225 <groupId>org.springframework.boot</groupId>
226 <artifactId>spring-boot-starter-jersey</artifactId>
227 <exclusions>
228 <exclusion>
229 <groupId>org.springframework.boot</groupId>
230 <artifactId>spring-boot-starter-tomcat</artifactId>
231 </exclusion>
232 </exclusions>
233 </dependency>
234 <dependency>
235 <groupId>org.onap.aai.logging-service</groupId>
236 <artifactId>common-logging</artifactId>
237 <version>${common.logging.version}</version>
238 </dependency>
239 <dependency>
240 <groupId>ch.qos.logback</groupId>
241 <artifactId>logback-classic</artifactId>
242 <version>${logback.version}</version><!--$NO-MVN-MAN-VER$-->
243 </dependency>
244 <dependency>
245 <groupId>ch.qos.logback</groupId>
246 <artifactId>logback-core</artifactId>
247 <version>${logback.version}</version><!--$NO-MVN-MAN-VER$-->
248 </dependency>
249 <dependency>
250 <groupId>commons-codec</groupId>
251 <artifactId>commons-codec</artifactId>
252 </dependency>
253 <dependency>
254 <groupId>org.apache.commons</groupId>
255 <artifactId>commons-compress</artifactId>
256 <version>${commons.compress.version}</version>
257 </dependency>
258 <dependency>
259 <groupId>org.apache.commons</groupId>
260 <artifactId>commons-lang3</artifactId>
261 </dependency>
262 <dependency>
263 <groupId>javax.ws.rs</groupId>
264 <artifactId>javax.ws.rs-api</artifactId>
265 <version>${javax.ws.rs.version}</version>
266 </dependency>
267 <dependency>
268 <groupId>org.codehaus.groovy</groupId>
269 <artifactId>groovy</artifactId>
270 </dependency>
271 <dependency>
272 <groupId>org.onap.sdc.sdc-tosca</groupId>
273 <artifactId>sdc-tosca</artifactId>
274 <version>${sdc.tosca.version}</version>
275 </dependency>
276 <dependency>
277 <groupId>org.onap.aai</groupId>
278 <artifactId>rest-client</artifactId>
279 <version>${aai.rest.client.version}</version>
280 </dependency>
281
282 <!-- Testing -->
283 <dependency>
284 <groupId>org.springframework.boot</groupId>
285 <artifactId>spring-boot-starter-test</artifactId>
286 <scope>test</scope>
287 </dependency>
288 <dependency>
289 <groupId>org.onap.sdc.sdc-distribution-client</groupId>
290 <artifactId>sdc-distribution-client</artifactId>
291 <version>${sdc.distribution.client.version}</version>
292 <scope>test</scope>
293 </dependency>
294 <dependency>
295 <groupId>xmlunit</groupId>
296 <artifactId>xmlunit</artifactId>
297 <version>${xmlunit.version}</version>
298 <scope>test</scope>
299 </dependency>
Chris AndreĢ66001752020-07-10 11:44:49 -0400300 <dependency>
301 <groupId>javax.xml.bind</groupId>
302 <artifactId>jaxb-api</artifactId>
303 <version>${jaxb.version}</version>
304 </dependency>
305 <dependency>
306 <groupId>com.sun.xml.bind</groupId>
307 <artifactId>jaxb-core</artifactId>
308 <version>${jaxb.version}</version>
309 </dependency>
310 <dependency>
311 <groupId>com.sun.xml.bind</groupId>
312 <artifactId>jaxb-impl</artifactId>
313 <version>${jaxb.version}</version>
314 </dependency>
315 <dependency>
316 <groupId>javax.activation</groupId>
317 <artifactId>activation</artifactId>
318 <version>${javax.activation.version}</version>
319 </dependency>
Lee, Tian (tl5884)9a526162019-10-03 12:22:40 +0100320 </dependencies>
Dmitry Puzikov1a0b2332019-04-16 16:53:15 +0200321
Lee, Tian (tl5884)9a526162019-10-03 12:22:40 +0100322 <build>
323 <plugins>
324 <plugin>
325 <groupId>org.springframework.boot</groupId>
326 <artifactId>spring-boot-maven-plugin</artifactId>
327 <version>${spring.boot.version}</version>
328 <configuration>
329 <jvmArguments>
330 -DCONFIG_HOME=./appconfig-local
331 -DAPP_HOME=.
332 -Dtosca.mappings.config=./appconfig-local/tosca-mappings.json
333 -DKEY_STORE_PASSWORD=${KEY_STORE_PASSWORD}
334 </jvmArguments>
335 </configuration>
336 <executions>
337 <execution>
338 <goals>
339 <goal>repackage</goal>
340 </goals>
341 </execution>
342 </executions>
343 </plugin>
344 <plugin>
345 <groupId>org.apache.maven.plugins</groupId>
346 <artifactId>maven-dependency-plugin</artifactId>
347 <executions>
348 <execution>
349 <id>unpack</id>
350 <phase>initialize</phase>
351 <goals>
352 <goal>unpack</goal>
353 </goals>
354 <configuration>
355 <artifactItems>
356 <artifactItem>
357 <groupId>${aai-schema.group.id}</groupId>
358 <artifactId>aai-schema</artifactId>
359 <version>${aai-schema.version}</version>
360 <type>jar</type>
361 <includes>${aai.schema.source.folder}/aai_schema_v**.xsd</includes>
362 <outputDirectory>${project.build.directory}/tmp</outputDirectory>
363 </artifactItem>
364 </artifactItems>
365 </configuration>
366 </execution>
367 </executions>
368 </plugin>
369 <plugin>
370 <groupId>org.apache.maven.plugins</groupId>
371 <artifactId>maven-antrun-plugin</artifactId>
372 <version>${antrun.version}</version>
373 <executions>
374 <execution>
375 <id>Flatten XSDs</id>
376 <phase>initialize</phase>
377 <goals>
378 <goal>run</goal>
379 </goals>
380 <configuration>
381 <target>
382 <copy todir="${aai.schema.target.folder}" flatten="true">
383 <fileset dir="${project.build.directory}/tmp">
384 <include name="**/*.xsd" />
385 </fileset>
386 </copy>
387 </target>
388 </configuration>
389 </execution>
390 </executions>
391 </plugin>
392 <plugin>
393 <groupId>org.jvnet.jaxb2.maven2</groupId>
394 <artifactId>maven-jaxb2-plugin</artifactId>
395 <version>${mvn.jaxb2.version}</version>
396 <executions>
397 <execution>
398 <phase>process-sources</phase>
399 <goals>
400 <goal>generate</goal>
401 </goals>
402 </execution>
403 </executions>
404 <configuration>
405 <schemaDirectory>${aai.schema.target.folder}</schemaDirectory>
406 <generatePackage>org.onap.aai.babel.xml.generator.xsd</generatePackage>
407 <generateDirectory>${project.build.directory}/generated-sources</generateDirectory>
408 <schemaIncludes>
409 <include>aai_schema_latest.xsd</include>
410 </schemaIncludes>
411 <extension>true</extension>
412 <args>
413 <arg>-Xannotate</arg>
414 </args>
415 <plugins>
416 <plugin>
417 <groupId>org.jvnet.jaxb2_commons</groupId>
418 <artifactId>jaxb2-basics-annotate</artifactId>
419 <version>0.6.4</version>
420 </plugin>
421 <!-- Add the dependencies with your annotations as 'plugins' below -->
422 <plugin>
423 <groupId>org.jvnet.jaxb2_commons</groupId>
424 <artifactId>jaxb2-annotate-plugin-test-annox-annotations</artifactId>
425 <version>1.0.0</version>
426 </plugin>
427 </plugins>
428 </configuration>
429 </plugin>
430 <plugin>
431 <artifactId>exec-maven-plugin</artifactId>
432 <groupId>org.codehaus.mojo</groupId>
433 <version>1.5.0</version>
434 <executions>
435 <execution><!-- Run our script to get latest xsd version -->
436 <id>Get latest xsd version</id>
437 <phase>generate-sources</phase>
438 <goals>
439 <goal>exec</goal>
440 </goals>
441 <configuration>
442 <workingDirectory>${basedir}/scripts</workingDirectory>
443 <executable>bash</executable>
444 <commandlineArgs>get-latest-xsd-version.sh ${basedir}</commandlineArgs>
445 </configuration>
446 </execution>
447 </executions>
448 </plugin>
449 <plugin>
450 <artifactId>maven-assembly-plugin</artifactId>
451 <configuration>
452 <descriptors>
453 <descriptor>src/main/assembly/descriptor.xml</descriptor>
454 </descriptors>
455 </configuration>
456 <executions>
457 <execution>
458 <id>make-assembly</id>
459 <phase>package</phase>
460 <goals>
461 <goal>single</goal>
462 </goals>
463 </execution>
464 </executions>
465 </plugin>
466 <plugin>
467 <groupId>com.mycila</groupId>
468 <artifactId>license-maven-plugin</artifactId>
469 <version>3.0</version>
470 <configuration>
471 <header>License.txt</header>
472 <includes>
473 <include>src/main/java/**</include>
474 <include>src/test/java/**</include>
475 <include>pom.xml</include>
476 </includes>
477 <skipExistingHeaders>true</skipExistingHeaders>
478 </configuration>
479 <executions>
480 <execution>
481 <goals>
482 <!-- Set goal from "check" to "format" to auto update license headers -->
483 <goal>check</goal>
484 </goals>
485 <phase>validate</phase>
486 </execution>
487 </executions>
488 </plugin>
489 <plugin>
490 <groupId>org.apache.maven.plugins</groupId>
491 <artifactId>maven-surefire-plugin</artifactId>
492 <configuration>
493 <reuseForks>false</reuseForks>
494 <forkCount>1</forkCount>
495 <environmentVariables>
496 <APP_HOME>.</APP_HOME>
497 <CONFIG_HOME>src/test/resources</CONFIG_HOME>
498 </environmentVariables>
499 </configuration>
500 </plugin>
501 <plugin>
502 <groupId>org.apache.maven.plugins</groupId>
503 <artifactId>maven-jar-plugin</artifactId>
504 <version>3.0.2</version>
505 <executions>
506 <execution>
507 <phase>package</phase>
508 <goals>
509 <goal>jar</goal>
510 </goals>
511 <configuration>
512 <classifier>client</classifier>
513 <includes>
514 <include>**/babel/service/data/*</include>
515 </includes>
516 </configuration>
517 </execution>
518 </executions>
519 </plugin>
520 <plugin>
521 <groupId>org.apache.maven.plugins</groupId>
522 <artifactId>maven-deploy-plugin</artifactId>
523 <configuration>
524 <classifier>client</classifier>
525 </configuration>
526 </plugin>
Forsyth, James (jf2512)e5f7f4d2020-02-14 15:46:08 -0500527
528
529 <!-- once we connect aai-parent or oparent 3.0+ we can take out this
530 whole section -->
531
Lee, Tian (tl5884)9a526162019-10-03 12:22:40 +0100532 <plugin>
Forsyth, James (jf2512)e5f7f4d2020-02-14 15:46:08 -0500533 <groupId>org.jacoco</groupId>
534 <artifactId>jacoco-maven-plugin</artifactId>
535 <version>${jacoco.version}</version>
536 <configuration>
537 <!-- Note: This exclusion list should match <sonar.exclusions> property
538 above -->
539 <excludes>
540 <exclude>**/gen/**</exclude>
541 <exclude>**/generated-sources/**</exclude>
542 <exclude>**/yang-gen/**</exclude>
543 <exclude>**/pax/**</exclude>
544 <exclude>org/onap/aai/babel/xml/generator/xsd/*</exclude>
545 </excludes>
546 </configuration>
547 <executions>
548 <!-- Prepares the property pointing to the JaCoCo runtime agent which
549 is passed as VM argument when Maven the Surefire plugin is executed. -->
550 <execution>
551 <id>pre-unit-test</id>
552 <goals>
553 <goal>prepare-agent</goal>
554 </goals>
555 <configuration>
556 <!-- Sets the path to the file which contains the execution data
557 . -->
558 <destFile>${project.build.directory}/code-coverage/jacoco-ut.exec</destFile>
559 <!-- Sets the name of the property containing the settings for JaCoCo
560 runtime agent. -->
561 <propertyName>surefireArgLine</propertyName>
562 </configuration>
563 </execution>
564 <!-- Ensures that the code coverage report for unit tests is created
565 after unit tests have been run. -->
566 <execution>
567 <id>post-unit-test</id>
568 <phase>test</phase>
569 <goals>
570 <goal>report</goal>
571 </goals>
572 <configuration>
573 <!-- Sets the path to the file which contains the execution data
574 . -->
575 <dataFile>${project.build.directory}/code-coverage/jacoco-ut.exec</dataFile>
576 <!-- Sets the output directory for the code coverage report. -->
577 <outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory>
578 </configuration>
579 </execution>
580 <execution>
581 <id>pre-integration-test</id>
582 <phase>pre-integration-test</phase>
583 <goals>
584 <goal>prepare-agent</goal>
585 </goals>
586 <configuration>
587 <!-- Sets the path to the file which contains the execution data
588 . -->
589 <destFile>${project.build.directory}/code-coverage/jacoco-it.exec</destFile>
590 <!-- Sets the name of the property containing the settings for JaCoCo
591 runtime agent. -->
592 <propertyName>failsafeArgLine</propertyName>
593 </configuration>
594 </execution>
595 <!-- Ensures that the code coverage report for integration tests after
596 integration tests have been run. -->
597 <execution>
598 <id>post-integration-test</id>
599 <phase>post-integration-test</phase>
600 <goals>
601 <goal>report</goal>
602 </goals>
603 <configuration>
604 <!-- Sets the path to the file which contains the execution data
605 . -->
606 <dataFile>${project.build.directory}/code-coverage/jacoco-it.exec</dataFile>
607 <!-- Sets the output directory for the code coverage report. -->
608 <outputDirectory>${project.reporting.outputDirectory}/jacoco-it</outputDirectory>
609 </configuration>
610 </execution>
611 <execution>
612 <id>default-check</id>
613 <goals>
614 <goal>check</goal>
615 </goals>
616 <configuration>
617 <dataFile>${project.build.directory}/code-coverage/jacoco-ut.exec</dataFile>
618 <rules>
619 <rule implementation="org.jacoco.maven.RuleConfiguration">
620 <element>BUNDLE</element>
621 <limits>
622 <limit implementation="org.jacoco.report.check.Limit">
623 <counter>LINE</counter>
624 <value>COVEREDRATIO</value>
625 <minimum>${jacoco.line.coverage.limit}</minimum>
626 </limit>
627 </limits>
628 </rule>
629 </rules>
630 </configuration>
631 </execution>
632 </executions>
Lee, Tian (tl5884)9a526162019-10-03 12:22:40 +0100633 </plugin>
Forsyth, James (jf2512)e5f7f4d2020-02-14 15:46:08 -0500634 <plugin>
635 <groupId>org.apache.maven.plugins</groupId>
636 <artifactId>maven-surefire-plugin</artifactId>
637 <version>3.0.0-M4</version>
638 <configuration>
639 <!-- Sets the VM argument line used when unit tests are run. -->
640 <argLine>${surefireArgLine}</argLine>
641 <!-- Excludes integration tests when unit tests are run. -->
642 <excludes>
643 <exclude>**/IT*.java</exclude>
644 </excludes>
645 </configuration>
646 </plugin>
647 <plugin>
648 <groupId>org.apache.maven.plugins</groupId>
649 <artifactId>maven-failsafe-plugin</artifactId>
650 <version>3.0.0-M4</version>
651 <executions>
652 <!-- Ensures that both integration-test and verify goals of the Failsafe
653 Maven plugin are executed. -->
654 <execution>
655 <id>integration-tests</id>
656 <goals>
657 <goal>integration-test</goal>
658 <goal>verify</goal>
659 </goals>
660 <configuration>
661 <!-- Sets the VM argument line used when integration tests are run. -->
662 <argLine>${failsafeArgLine}</argLine>
663 </configuration>
664 </execution>
665 </executions>
666 </plugin>
667 <plugin>
668 <groupId>org.sonarsource.scanner.maven</groupId>
669 <artifactId>sonar-maven-plugin</artifactId>
670 <version>${sonar.scanner.version}</version>
671 </plugin>
672 <!-- end removable sonar config, note the additional exclusion for babel above
673 -->
Lee, Tian (tl5884)9a526162019-10-03 12:22:40 +0100674 </plugins>
675 </build>
Edwin Lawrance1433a672017-09-22 16:55:07 +0100676
Edwin Lawrance1433a672017-09-22 16:55:07 +0100677</project>