Create 1.13.0 maven release
[aai/babel.git] / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3
4     ============LICENSE_START=======================================================
5     org.onap.aai
6     ================================================================================
7     Copyright (c) 2017-2019 AT&T Intellectual Property. All rights reserved.
8     Copyright (c) 2017-2019 European Software Marketing Ltd.
9     ================================================================================
10     Licensed under the Apache License, Version 2.0 (the "License");
11     you may not use this file except in compliance with the License.
12     You may obtain a copy of the License at
13
14           http://www.apache.org/licenses/LICENSE-2.0
15
16     Unless required by applicable law or agreed to in writing, software
17     distributed under the License is distributed on an "AS IS" BASIS,
18     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19     See the License for the specific language governing permissions and
20     limitations under the License.
21     ============LICENSE_END=========================================================
22 -->
23
24 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
25                  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
26         <modelVersion>4.0.0</modelVersion>
27
28         <parent>
29                 <groupId>org.onap.aai.aai-common</groupId>
30                 <artifactId>aai-parent</artifactId>
31                 <version>1.9.3</version>
32         </parent>
33
34         <groupId>org.onap.aai</groupId>
35         <artifactId>babel</artifactId>
36         <version>1.9.5-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.3</aai.common.version>
91                 <aaf.version>2.1.21</aaf.version>
92                 <common.logging.version>1.2.2</common.logging.version>
93                 <logback.core.version>1.2.7</logback.core.version>
94                 <groovy.version>2.5.15</groovy.version>
95
96                 <commons.compress.version>1.21</commons.compress.version>
97                 <commons.codec.version>1.15</commons.codec.version>
98
99                 <javax.ws.rs.version>2.1</javax.ws.rs.version>
100                 <mvn.jaxb2.version>0.13.3</mvn.jaxb2.version>
101                 <aai-schema.group.id>org.onap.aai.schema-service</aai-schema.group.id>
102
103                 <aai-schema.version>1.9.5</aai-schema.version>
104                 <apache.lang3.version>3.7</apache.lang3.version>
105                 <aai.rest.client.version>1.2.1</aai.rest.client.version>
106
107                 <sdc.distribution.client.version>1.4.1</sdc.distribution.client.version>
108                 <xmlunit.version>1.6</xmlunit.version>
109
110                 <antrun.version>1.8</antrun.version>
111
112                 <javax.activation.version>1.1.1</javax.activation.version>
113                 <!-- This will be used for the docker images as the default format of maven build has issues -->
114                 <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
115
116         </properties>
117
118         <profiles>
119                 <!-- Docker profile to be used for building docker image and pushing to nexus -->
120
121                 <profile>
122                         <id>docker</id>
123                         <build>
124                                 <plugins>
125                                         <plugin>
126                                                 <groupId>org.codehaus.mojo</groupId>
127                                                 <artifactId>build-helper-maven-plugin</artifactId>
128                                                 <version>3.0.0</version>
129                                                 <executions>
130                                                         <execution>
131                                                                 <phase>pre-clean</phase>
132                                                                 <id>parse-version</id>
133                                                                 <goals>
134                                                                         <goal>parse-version</goal>
135                                                                 </goals>
136                                                         </execution>
137                                                 </executions>
138                                         </plugin>
139                                         <plugin>
140                                                 <groupId>org.codehaus.groovy.maven</groupId>
141                                                 <artifactId>gmaven-plugin</artifactId>
142                                                 <version>1.0</version>
143                                                 <executions>
144                                                         <execution>
145                                                                 <phase>pre-clean</phase>
146                                                                 <goals>
147                                                                         <goal>execute</goal>
148                                                                 </goals>
149                                                                 <configuration>
150                                                                         <source>
151                                                                                 def userAaiBaseImage = session.userProperties['aai.base.image'];
152                                                                                 def userAaiCommonVersion = session.userProperties['aai.base.image.version'];
153                                                                                 if (userAaiCommonVersion != null) {
154                                                                                         project.properties['aai.base.image.version'] = userAaiCommonVersion;
155                                                                                 }
156                                                                                 if (userAaiBaseImage != null) {
157                                                                                         project.properties['aai.base.image'] = userAaiBaseImage;
158                                                                                 }
159                                                                                 log.info 'Base image flavour: ' + project.properties['aai.base.image'];
160                                                                                 log.info 'Base image version: ' + project.properties['aai.base.image.version'];
161                                                                         </source>
162                                                                 </configuration>
163                                                         </execution>
164                                                 </executions>
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
176                                                                         </name>
177                                                                         <build>
178                                                                                 <filter>@</filter>
179                                                                                 <tags>
180                                                                                         <tag>latest</tag>
181                                                                                         <tag>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}-STAGING-latest</tag>
182                                                                                         <tag>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}-STAGING-${maven.build.timestamp}</tag>
183                                                                                         <tag>${image.tag}</tag>
184                                                                                 </tags>
185                                                                                 <cleanup>try</cleanup>
186                                                                                 <dockerFileDir>${project.basedir}/src/main/docker</dockerFileDir>
187                                                                                 <assembly>
188                                                                                         <inline>
189                                                                                                 <fileSets>
190                                                                                                         <fileSet>
191                                                                                                                 <directory>${aai.build.directory}</directory>
192                                                                                                                 <outputDirectory>/${project.artifactId}</outputDirectory>
193                                                                                                         </fileSet>
194                                                                                                 </fileSets>
195                                                                                         </inline>
196                                                                                 </assembly>
197                                                                         </build>
198                                                                 </image>
199                                                         </images>
200                                                 </configuration>
201                                                 <executions>
202                                                         <execution>
203                                                                 <id>clean-images</id>
204                                                                 <phase>pre-clean</phase>
205                                                                 <goals>
206                                                                         <goal>remove</goal>
207                                                                 </goals>
208                                                                 <configuration>
209                                                                         <removeAll>true</removeAll>
210                                                                 </configuration>
211                                                         </execution>
212                                                         <execution>
213                                                                 <id>generate-images</id>
214                                                                 <phase>package</phase>
215                                                                 <goals>
216                                                                         <goal>build</goal>
217                                                                 </goals>
218                                                         </execution>
219                                                         <execution>
220                                                                 <id>push-images</id>
221                                                                 <phase>deploy</phase>
222                                                                 <goals>
223                                                                         <goal>push</goal>
224                                                                 </goals>
225                                                         </execution>
226                                                 </executions>
227                                         </plugin>
228                                 </plugins>
229                         </build>
230                 </profile>
231         </profiles>
232
233         <dependencies>
234                 <dependency>
235                         <groupId>org.springframework.boot</groupId>
236                         <artifactId>spring-boot-starter-jetty</artifactId>
237                 </dependency>
238                 <dependency>
239                         <groupId>org.springframework.boot</groupId>
240                         <artifactId>spring-boot-starter-jersey</artifactId>
241                         <exclusions>
242                                 <exclusion>
243                                         <groupId>org.springframework.boot</groupId>
244                                         <artifactId>spring-boot-starter-jetty</artifactId>
245                                 </exclusion>
246                                 <exclusion>
247                                         <groupId>org.springframework.boot</groupId>
248                                         <artifactId>spring-boot-starter-tomcat</artifactId>
249                                 </exclusion>
250                         </exclusions>
251                 </dependency>
252                 <dependency>
253                         <groupId>org.springframework.boot</groupId>
254                         <artifactId>spring-boot-starter-web</artifactId>
255                         <exclusions>
256                                 <exclusion>
257                                         <groupId>org.springframework.boot</groupId>
258                                         <artifactId>spring-boot-starter-jetty</artifactId>
259                                 </exclusion>
260                                 <exclusion>
261                                         <groupId>org.springframework.boot</groupId>
262                                         <artifactId>spring-boot-starter-tomcat</artifactId>
263                                 </exclusion>
264                         </exclusions>
265                 </dependency>
266                 <dependency>
267                         <groupId>org.springframework.boot</groupId>
268                         <artifactId>spring-boot-starter-aop</artifactId>
269                         <exclusions>
270                                 <exclusion>
271                                         <groupId>org.springframework.boot</groupId>
272                                         <artifactId>spring-boot-starter-tomcat</artifactId>
273                                 </exclusion>
274                         </exclusions>
275                 </dependency>
276                 <dependency>
277                         <groupId>org.onap.aai.logging-service</groupId>
278                         <artifactId>common-logging</artifactId>
279                 </dependency>
280                 <dependency>
281                         <groupId>ch.qos.logback</groupId>
282                         <artifactId>logback-classic</artifactId>
283                 </dependency>
284                 <dependency>
285                         <groupId>ch.qos.logback</groupId>
286                         <artifactId>logback-core</artifactId>
287                         <version>${logback.core.version}</version>
288                 </dependency>
289                 <dependency>
290                         <groupId>commons-codec</groupId>
291                         <artifactId>commons-codec</artifactId>
292                         <version>${commons.codec.version}</version>
293                 </dependency>
294                 <dependency>
295                         <groupId>org.apache.commons</groupId>
296                         <artifactId>commons-compress</artifactId>
297                         <version>${commons.compress.version}</version>
298                 </dependency>
299                 <dependency>
300                         <groupId>org.apache.commons</groupId>
301                         <artifactId>commons-lang3</artifactId>
302                 </dependency>
303                 <dependency>
304                         <groupId>javax.ws.rs</groupId>
305                         <artifactId>javax.ws.rs-api</artifactId>
306                         <version>2.1</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>javax.activation</groupId>
409                         <artifactId>activation</artifactId>
410                         <version>${javax.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><!-- Run our script to get latest xsd version -->
528                                                 <id>Get latest xsd version</id>
529                                                 <phase>generate-sources</phase>
530                                                 <goals>
531                                                         <goal>exec</goal>
532                                                 </goals>
533                                                 <configuration>
534                                                         <workingDirectory>${basedir}/scripts</workingDirectory>
535                                                         <executable>bash</executable>
536                                                         <commandlineArgs>get-latest-xsd-version.sh ${basedir}</commandlineArgs>
537                                                 </configuration>
538                                         </execution>
539                                 </executions>
540                         </plugin>
541                         <plugin>
542                                 <artifactId>maven-assembly-plugin</artifactId>
543                                 <configuration>
544                                         <descriptors>
545                                                 <descriptor>src/main/assembly/descriptor.xml</descriptor>
546                                         </descriptors>
547                                 </configuration>
548                                 <executions>
549                                         <execution>
550                                                 <id>make-assembly</id>
551                                                 <phase>package</phase>
552                                                 <goals>
553                                                         <goal>single</goal>
554                                                 </goals>
555                                         </execution>
556                                 </executions>
557                         </plugin>
558                         <plugin>
559                                 <groupId>com.mycila</groupId>
560                                 <artifactId>license-maven-plugin</artifactId>
561                                 <version>3.0</version>
562                                 <configuration>
563                                         <header>License.txt</header>
564                                         <includes>
565                                                 <include>src/main/java/**</include>
566                                                 <include>src/test/java/**</include>
567                                                 <include>pom.xml</include>
568                                         </includes>
569                                         <skipExistingHeaders>true</skipExistingHeaders>
570                                 </configuration>
571                                 <executions>
572                                         <execution>
573                                                 <goals>
574                                                         <!-- Set goal from "check" to "format" to auto update license headers -->
575                                                         <goal>check</goal>
576                                                 </goals>
577                                                 <phase>validate</phase>
578                                         </execution>
579                                 </executions>
580                         </plugin>
581                         <plugin>
582                                 <groupId>org.apache.maven.plugins</groupId>
583                                 <artifactId>maven-compiler-plugin</artifactId>
584                                 <version>${maven-compiler-plugin.version}</version>
585                                 <inherited>true</inherited>
586                                 <configuration>
587                                         <source>${maven-compiler-plugin.source}</source>
588                                         <target>${maven-compiler-plugin.target}</target>
589                                         <testSource>${maven-compiler-plugin.test.source}</testSource>
590                                         <testTarget>${maven-compiler-plugin.test.target}</testTarget>
591                                 </configuration>
592                         </plugin>
593                         <plugin>
594                                 <groupId>org.apache.maven.plugins</groupId>
595                                 <artifactId>maven-jar-plugin</artifactId>
596                                 <version>3.0.2</version>
597                                 <executions>
598                                         <execution>
599                                                 <phase>package</phase>
600                                                 <goals>
601                                                         <goal>jar</goal>
602                                                 </goals>
603                                                 <configuration>
604                                                         <classifier>client</classifier>
605                                                         <includes>
606                                                                 <include>**/babel/service/data/*</include>
607                                                         </includes>
608                                                 </configuration>
609                                         </execution>
610                                 </executions>
611                         </plugin>
612                         <plugin>
613                                 <groupId>org.apache.maven.plugins</groupId>
614                                 <artifactId>maven-deploy-plugin</artifactId>
615                                 <configuration>
616                                         <classifier>client</classifier>
617                                 </configuration>
618                         </plugin>
619
620
621                         <!-- once we connect aai-parent or oparent 3.0+ we can take out this
622                              whole section -->
623
624                         <plugin>
625                                 <groupId>org.jacoco</groupId>
626                                 <artifactId>jacoco-maven-plugin</artifactId>
627                                 <version>${jacoco-maven-plugin.version}</version>
628                                 <configuration>
629                                         <!-- Note: This exclusion list should match <sonar.exclusions> property
630                      above -->
631                                         <excludes>
632                                                 <exclude>**/gen/**</exclude>
633                                                 <exclude>**/generated-sources/**</exclude>
634                                                 <exclude>**/yang-gen/**</exclude>
635                                                 <exclude>**/pax/**</exclude>
636                                                 <exclude>org/onap/aai/babel/xml/generator/xsd/*</exclude>
637                                         </excludes>
638                                 </configuration>
639                                 <executions>
640                                         <!-- Prepares the property pointing to the JaCoCo runtime agent which
641                      is passed as VM argument when Maven the Surefire plugin is executed. -->
642                                         <execution>
643                                                 <id>pre-unit-test</id>
644                                                 <goals>
645                                                         <goal>prepare-agent</goal>
646                                                 </goals>
647                                                 <configuration>
648                                                         <!-- Sets the path to the file which contains the execution data
649                                  . -->
650                                                         <destFile>${project.build.directory}/code-coverage/jacoco-ut.exec</destFile>
651                                                         <!-- Sets the name of the property containing the settings for JaCoCo
652                                  runtime agent. -->
653                                                         <propertyName>surefireArgLine</propertyName>
654                                                 </configuration>
655                                         </execution>
656                                         <!-- Ensures that the code coverage report for unit tests is created
657                      after unit tests have been run. -->
658                                         <execution>
659                                                 <id>post-unit-test</id>
660                                                 <phase>test</phase>
661                                                 <goals>
662                                                         <goal>report</goal>
663                                                 </goals>
664                                                 <configuration>
665                                                         <!-- Sets the path to the file which contains the execution data
666                                  . -->
667                                                         <dataFile>${project.build.directory}/code-coverage/jacoco-ut.exec</dataFile>
668                                                         <!-- Sets the output directory for the code coverage report. -->
669                                                         <outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory>
670                                                 </configuration>
671                                         </execution>
672                                         <execution>
673                                                 <id>pre-integration-test</id>
674                                                 <phase>pre-integration-test</phase>
675                                                 <goals>
676                                                         <goal>prepare-agent</goal>
677                                                 </goals>
678                                                 <configuration>
679                                                         <!-- Sets the path to the file which contains the execution data
680                                  . -->
681                                                         <destFile>${project.build.directory}/code-coverage/jacoco-it.exec</destFile>
682                                                         <!-- Sets the name of the property containing the settings for JaCoCo
683                                  runtime agent. -->
684                                                         <propertyName>failsafeArgLine</propertyName>
685                                                 </configuration>
686                                         </execution>
687                                         <!-- Ensures that the code coverage report for integration tests after
688                      integration tests have been run. -->
689                                         <execution>
690                                                 <id>post-integration-test</id>
691                                                 <phase>post-integration-test</phase>
692                                                 <goals>
693                                                         <goal>report</goal>
694                                                 </goals>
695                                                 <configuration>
696                                                         <!-- Sets the path to the file which contains the execution data
697                                  . -->
698                                                         <dataFile>${project.build.directory}/code-coverage/jacoco-it.exec</dataFile>
699                                                         <!-- Sets the output directory for the code coverage report. -->
700                                                         <outputDirectory>${project.reporting.outputDirectory}/jacoco-it</outputDirectory>
701                                                 </configuration>
702                                         </execution>
703                                         <execution>
704                                                 <id>default-check</id>
705                                                 <goals>
706                                                         <goal>check</goal>
707                                                 </goals>
708                                                 <configuration>
709                                                         <dataFile>${project.build.directory}/code-coverage/jacoco-ut.exec</dataFile>
710                                                         <rules>
711                                                                 <rule implementation="org.jacoco.maven.RuleConfiguration">
712                                                                         <element>BUNDLE</element>
713                                                                         <limits>
714                                                                                 <limit implementation="org.jacoco.report.check.Limit">
715                                                                                         <counter>LINE</counter>
716                                                                                         <value>COVEREDRATIO</value>
717                                                                                         <minimum>${jacoco.line.coverage.limit}</minimum>
718                                                                                 </limit>
719                                                                         </limits>
720                                                                 </rule>
721                                                         </rules>
722                                                 </configuration>
723                                         </execution>
724                                 </executions>
725                         </plugin>
726                         <plugin>
727                                 <groupId>org.apache.maven.plugins</groupId>
728                                 <artifactId>maven-surefire-plugin</artifactId>
729                                 <version>3.0.0-M4</version>
730                                 <configuration>
731                                         <!-- Sets the VM argument line used when unit tests are run. -->
732                                         <reuseForks>false</reuseForks>
733                                         <forkCount>1</forkCount>
734                                         <environmentVariables>
735                                                 <APP_HOME>.</APP_HOME>
736                                                 <CONFIG_HOME>src/test/resources</CONFIG_HOME>
737                                         </environmentVariables>
738                                         <argLine>${surefireArgLine}</argLine>
739                                         <!-- Excludes integration tests when unit tests are run. -->
740                                         <excludes>
741                                                 <exclude>**/IT*.java</exclude>
742                                         </excludes>
743                                 </configuration>
744                         </plugin>
745                         <plugin>
746                                 <groupId>org.apache.maven.plugins</groupId>
747                                 <artifactId>maven-failsafe-plugin</artifactId>
748                                 <version>3.0.0-M5</version>
749                                 <executions>
750                                         <!-- Ensures that both integration-test and verify goals of the Failsafe
751                      Maven plugin are executed. -->
752                                         <execution>
753                                                 <id>integration-tests</id>
754                                                 <goals>
755                                                         <goal>integration-test</goal>
756                                                         <goal>verify</goal>
757                                                 </goals>
758                                                 <configuration>
759                                                         <!-- Sets the VM argument line used when integration tests are run. -->
760                                                         <argLine>${failsafeArgLine}</argLine>
761                                                 </configuration>
762                                         </execution>
763                                 </executions>
764                         </plugin>
765                         <plugin>
766                                 <groupId>org.sonarsource.scanner.maven</groupId>
767                                 <artifactId>sonar-maven-plugin</artifactId>
768                                 <version>${sonar.scanner.version}</version>
769                         </plugin>
770                         <!-- end removable sonar config, note the additional exclusion for babel above
771                              -->
772                 </plugins>
773         </build>
774
775 </project>