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