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