e76cbf383836911a0bf77c470eaaa34b122baff6
[clamp.git] / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4         <modelVersion>4.0.0</modelVersion>
5         <groupId>org.onap.clamp</groupId>
6         <artifactId>clds</artifactId>
7         <version>1.0.1-SNAPSHOT</version>
8         <name>ONAP CLAMP</name>
9
10         <description>
11            This project build the ONAP CLAMP JAR that contains AJSC + CLAMP code.
12
13            By Default "mvn clean install" command will execute also the unit tests
14            and the integration tests. The integration tests require a docker engine running.
15
16            If you want to skip the intergation test you can by doing:
17            "mvn clean install -DskipITs=true"
18
19            For Spring it's possible to specify the application.properties location
20            "mvn clean install -Dspring.config.location=classpath:application-test.properties"
21
22            The application.properties contains the location of the CLAMP parameters files:
23            clds-policy-config.properties and clds-reference.properties
24     </description>
25
26         <properties>
27                 <maven.compiler.source>1.8</maven.compiler.source>
28                 <maven.compiler.target>1.8</maven.compiler.target>
29                 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
30                 <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
31
32                 <docker.mariadb.port.host>3306</docker.mariadb.port.host>
33                 <sdk.java.common.logging>0.0.3-oss</sdk.java.common.logging>
34                 <project.scm.id>git-server</project.scm.id>
35                 <java.version>1.8</java.version>
36                 <csi.logging>6.1.0.6-oss</csi.logging>
37                 <sdk.camel.rest>6.2.0.6-oss</sdk.camel.rest>
38                 <sdk.camunda.core>6.1.0.3-oss</sdk.camunda.core>
39
40                 <sonar.language>java</sonar.language>
41                 <sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
42                 <sonar.surefire.reportsPath>${project.build.directory}/surefire-reports</sonar.surefire.reportsPath>
43                 <sonar.jacoco.reportPath>${project.build.directory}/coverage-reports/jacoco.exec</sonar.jacoco.reportPath>
44                 <sonar.jacoco.itReportPath>${project.build.directory}/coverage-reports/jacoco-it.exec</sonar.jacoco.itReportPath>
45                 <sonar.jacoco.reportMissing.force.zero>true</sonar.jacoco.reportMissing.force.zero>
46                 <sonar.projectVersion>${project.version}</sonar.projectVersion>
47
48                 <docker.push.registry>localhost:5000</docker.push.registry>
49                 <skip.docker.build>true</skip.docker.build>
50                 <skip.docker.tag>true</skip.docker.tag>
51                 <skip.docker.push>true</skip.docker.push>
52                 <skip.staging.artifacts>false</skip.staging.artifacts>
53
54                 <nexusproxy>https://nexus.onap.org</nexusproxy>
55                 <snapshotNexusPath>/content/repositories/snapshots/</snapshotNexusPath>
56                 <releaseNexusPath>/content/repositories/releases/</releaseNexusPath>
57                 <stagingNexusPath>/content/repositories/staging/</stagingNexusPath>
58                 <sitePath>/content/sites/site/org/onap/clamp/${project.version}</sitePath>
59         </properties>
60
61         <distributionManagement>
62                 <repository>
63                         <id>ecomp-releases</id>
64                         <name>Clamp Release Repository</name>
65                         <url>${nexusproxy}/${releaseNexusPath}</url>
66                 </repository>
67                 <snapshotRepository>
68                         <id>ecomp-snapshots</id>
69                         <name>Clamp Snapshot Repository</name>
70                         <url>${nexusproxy}/${snapshotNexusPath}</url>
71                 </snapshotRepository>
72                 <site>
73                         <id>ecomp-site</id>
74                         <url>dav:${nexusproxy}${sitePath}</url>
75                 </site>
76         </distributionManagement>
77
78         <repositories>
79                 <repository>
80                         <id>central</id>
81                         <name>Maven 2 repository 2</name>
82                         <url>http://repo2.maven.org/maven2/</url>
83                 </repository>
84                 <repository>
85                         <id>ecomp-releases</id>
86                         <name>ONAP Release Repository</name>
87                         <url>${nexusproxy}/${releaseNexusPath}</url>
88                 </repository>
89                 <repository>
90                         <id>ecomp-staging</id>
91                         <name>ONAP Staging Repository</name>
92                         <url>${nexusproxy}/${stagingNexusPath}</url>
93                 </repository>
94                 <repository>
95                         <id>ecomp-snapshots</id>
96                         <name>ONAP Snapshot Repository</name>
97                         <url>${nexusproxy}/${snapshotNexusPath}</url>
98                         <snapshots>
99                                 <enabled>true</enabled>
100                         </snapshots>
101                         <releases>
102                                 <enabled>false</enabled>
103                         </releases>
104                 </repository>
105                 <repository>
106                         <id>spring-repo</id>
107                         <name>Spring repo</name>
108                         <url>https://artifacts.alfresco.com/nexus/content/repositories/public/</url>
109                 </repository>
110                 <repository>
111                         <id>repository.jboss.org-public</id>
112                         <name>JBoss.org Maven repository</name>
113                         <url>https://repository.jboss.org/nexus/content/groups/public</url>
114                 </repository>
115         </repositories>
116
117         <dependencyManagement>
118                 <dependencies>
119                         <dependency>
120                                 <!-- Import dependency management from Spring Boot -->
121                                 <groupId>org.springframework.boot</groupId>
122                                 <artifactId>spring-boot-dependencies</artifactId>
123                                 <version>1.4.1.RELEASE</version>
124                                 <type>pom</type>
125                                 <scope>import</scope>
126                         </dependency>
127                 </dependencies>
128         </dependencyManagement>
129
130         <dependencies>
131
132                 <dependency>
133                         <groupId>com.googlecode.json-simple</groupId>
134                         <artifactId>json-simple</artifactId>
135                         <version>1.1</version>
136                 </dependency>
137                 <dependency>
138                         <groupId>org.apache.commons</groupId>
139                         <artifactId>commons-vfs2</artifactId>
140                         <version>2.0</version>
141                 </dependency>
142
143                 <dependency>
144                         <groupId>org.springframework.security</groupId>
145                         <artifactId>spring-security-test</artifactId>
146
147                         <scope>test</scope>
148                 </dependency>
149
150
151                 <!-- Dependencies of parent pom start -->
152                 <dependency>
153                         <groupId>com.att.ajsc</groupId>
154                         <artifactId>sdk-java-common-logging</artifactId>
155                         <version>${sdk.java.common.logging}</version>
156                 </dependency>
157                 <dependency>
158                         <groupId>org.springframework.boot</groupId>
159                         <artifactId>spring-boot-starter-tomcat</artifactId>
160                         <scope>compile</scope>
161                 </dependency>
162                 <dependency>
163                         <groupId>org.springframework.boot</groupId>
164                         <artifactId>spring-boot-starter-actuator</artifactId>
165                 </dependency>
166                 <dependency>
167                         <groupId>org.springframework.boot</groupId>
168                         <artifactId>spring-boot-starter-security</artifactId>
169                 </dependency>
170                 <dependency>
171                         <groupId>org.springframework.boot</groupId>
172                         <artifactId>spring-boot-starter-test</artifactId>
173                         <scope>test</scope>
174                 </dependency>
175                 <dependency>
176                         <groupId>joda-time</groupId>
177                         <artifactId>joda-time</artifactId>
178                 </dependency>
179                 <dependency>
180                         <groupId>org.springframework</groupId>
181                         <artifactId>spring-context</artifactId>
182                 </dependency>
183                 <dependency>
184                         <groupId>org.slf4j</groupId>
185                         <artifactId>slf4j-api</artifactId>
186                 </dependency>
187                 <dependency>
188                         <groupId>javax.ws.rs</groupId>
189                         <artifactId>javax.ws.rs-api</artifactId>
190                         <version>2.0</version>
191                 </dependency>
192                 <dependency>
193                         <groupId>org.springframework</groupId>
194                         <artifactId>spring-test</artifactId>
195                 </dependency>
196                 <dependency>
197                         <groupId>junit</groupId>
198                         <artifactId>junit</artifactId>
199                 </dependency>
200                 <dependency>
201                         <groupId>org.mockito</groupId>
202                         <artifactId>mockito-all</artifactId>
203                         <version>1.9.5</version>
204                 </dependency>
205                 <dependency>
206                         <groupId>commons-logging</groupId>
207                         <artifactId>commons-logging</artifactId>
208                         <version>1.1.1</version>
209                 </dependency>
210                 <dependency>
211                         <groupId>org.springframework</groupId>
212                         <artifactId>spring-aspects</artifactId>
213                 </dependency>
214                 <dependency>
215                         <groupId>com.fasterxml.jackson.core</groupId>
216                         <artifactId>jackson-core</artifactId>
217                 </dependency>
218                 <dependency>
219                         <groupId>com.fasterxml.jackson.core</groupId>
220                         <artifactId>jackson-databind</artifactId>
221                 </dependency>
222                 <dependency>
223                         <groupId>org.springframework</groupId>
224                         <artifactId>spring-webmvc</artifactId>
225                 </dependency>
226                 <dependency>
227                         <groupId>org.springframework.boot</groupId>
228                         <artifactId>spring-boot-starter-web</artifactId>
229                 </dependency>
230                 <dependency>
231                         <groupId>log4j</groupId>
232                         <artifactId>log4j</artifactId>
233                         <version>1.2.17</version>
234                 </dependency>
235                 <dependency>
236                         <groupId>org.springframework.boot</groupId>
237                         <artifactId>spring-boot</artifactId>
238                 </dependency>
239                 <dependency>
240                         <groupId>org.springframework.boot</groupId>
241                         <artifactId>spring-boot-autoconfigure</artifactId>
242                 </dependency>
243                 <dependency>
244                         <groupId>javax.transaction</groupId>
245                         <artifactId>jta</artifactId>
246                         <version>1.1</version>
247                 </dependency>
248                 <dependency>
249                         <groupId>javax.persistence</groupId>
250                         <artifactId>persistence-api</artifactId>
251                         <version>1.0.2</version>
252                 </dependency>
253                 <dependency>
254                         <groupId>org.hibernate</groupId>
255                         <artifactId>hibernate-annotations</artifactId>
256                         <version>3.5.6-Final</version>
257                 </dependency>
258                 <dependency>
259                         <groupId>org.apache.geronimo.specs</groupId>
260                         <artifactId>geronimo-jpa_2.0_spec</artifactId>
261                         <version>1.1</version>
262                 </dependency>
263                 <dependency>
264                         <groupId>dom4j</groupId>
265                         <artifactId>dom4j</artifactId>
266                         <version>1.6.1</version>
267                 </dependency>
268                 <!-- Dependencies of parent pom end -->
269                 <dependency>
270                         <groupId>com.att.ajsc</groupId>
271                         <artifactId>sdk-java-camel-rest</artifactId>
272                         <version>${sdk.camel.rest}</version>
273                 </dependency>
274                 <dependency>
275                         <groupId>io.swagger</groupId>
276                         <artifactId>swagger-core</artifactId>
277                         <version>1.5.8</version>
278                 </dependency>
279                 <dependency>
280                         <groupId>io.swagger</groupId>
281                         <artifactId>swagger-annotations</artifactId>
282                         <version>1.5.8</version>
283                 </dependency>
284                 <!-- Camunda Core -->
285                 <dependency>
286                         <groupId>com.att.ajsc</groupId>
287                         <artifactId>sdk-java-camunda-core</artifactId>
288                         <version>${sdk.camunda.core}</version>
289                 </dependency>
290                 <!-- Spring Mail -->
291                 <dependency>
292                         <groupId>org.springframework</groupId>
293                         <artifactId>spring-context-support</artifactId>
294                 </dependency>
295                 <!-- CSI Logging -->
296                 <dependency>
297                         <groupId>com.att.ajsc</groupId>
298                         <artifactId>sdk-java-common-interceptors</artifactId>
299                         <version>${csi.logging}</version>
300                         <exclusions>
301                                 <exclusion>
302                                         <groupId>org.eclipse.jetty.orbit</groupId>
303                                         <artifactId>javax.servlet</artifactId>
304                                 </exclusion>
305                                 <exclusion>
306                                         <groupId>com.att.ajsc</groupId>
307                                         <artifactId>ajsc-core</artifactId>
308                                 </exclusion>
309                         </exclusions>
310                 </dependency>
311                 <!-- CSI Logging End -->
312                 <dependency>
313                         <groupId>org.onap.policy.engine</groupId>
314                         <artifactId>PolicyEngineAPI</artifactId>
315                         <version>1.1.0-SNAPSHOT</version>
316                         <exclusions>
317                                 <exclusion>
318                                         <artifactId>log4j</artifactId>
319                                         <groupId>log4j</groupId>
320                                 </exclusion>
321                                 <exclusion>
322                                         <groupId>org.slf4j</groupId>
323                                         <artifactId>slf4j-log4j12</artifactId>
324                                 </exclusion>
325                                 <exclusion>
326                                         <artifactId>apache-log4j-extras</artifactId>
327                                         <groupId>log4j</groupId>
328                                 </exclusion>
329                                 <exclusion>
330                                         <artifactId>jackson-databind</artifactId>
331                                         <groupId>com.fasterxml.jackson.core</groupId>
332                                 </exclusion>
333                         </exclusions>
334                 </dependency>
335                 <dependency>
336                         <groupId>org.onap.policy.common</groupId>
337                         <artifactId>ONAP-Logging</artifactId>
338                         <version>1.1.0-SNAPSHOT</version>
339                         <exclusions>
340                                 <exclusion>
341                                         <artifactId>log4j</artifactId>
342                                         <groupId>log4j</groupId>
343                                 </exclusion>
344                                 <exclusion>
345                                         <groupId>org.slf4j</groupId>
346                                         <artifactId>slf4j-log4j12</artifactId>
347                                 </exclusion>
348                                 <exclusion>
349                                         <artifactId>apache-log4j-extras</artifactId>
350                                         <groupId>log4j</groupId>
351                                 </exclusion>
352                         </exclusions>
353                 </dependency>
354                 <dependency>
355                         <groupId>org.onap.policy.engine</groupId>
356                         <artifactId>ControlloopPolicy</artifactId>
357                         <version>1.1.0-SNAPSHOT</version>
358                         <exclusions>
359                                 <exclusion>
360                                         <artifactId>log4j</artifactId>
361                                         <groupId>log4j</groupId>
362                                 </exclusion>
363                                 <exclusion>
364                                         <groupId>org.slf4j</groupId>
365                                         <artifactId>slf4j-log4j12</artifactId>
366                                 </exclusion>
367                                 <exclusion>
368                                         <artifactId>apache-log4j-extras</artifactId>
369                                         <groupId>log4j</groupId>
370                                 </exclusion>
371                         </exclusions>
372                 </dependency>
373
374                 <dependency>
375                         <groupId>com.fasterxml.jackson.core</groupId>
376                         <artifactId>jackson-databind</artifactId>
377                         <version>2.6.3</version>
378                 </dependency>
379                 <dependency>
380                         <groupId>com.fasterxml.jackson.dataformat</groupId>
381                         <artifactId>jackson-dataformat-yaml</artifactId>
382                         <version>2.6.3</version>
383                 </dependency>
384                 <dependency>
385                         <groupId>org.apache.commons</groupId>
386                         <artifactId>commons-csv</artifactId>
387                         <version>1.3</version>
388                 </dependency>
389                 <dependency>
390                         <groupId>org.jboss.resteasy</groupId>
391                         <artifactId>resteasy-client</artifactId>
392                         <version>3.0.8.Final</version>
393                 </dependency>
394                 <dependency>
395                         <groupId>com.sun.faces</groupId>
396                         <artifactId>jsf-api</artifactId>
397                         <version>2.1.7</version>
398                 </dependency>
399                 <dependency>
400                         <groupId>com.sun.faces</groupId>
401                         <artifactId>jsf-impl</artifactId>
402                         <version>2.1.7</version>
403                 </dependency>
404
405         </dependencies>
406
407         <build>
408                 <finalName>clamp</finalName>
409
410                 <testResources>
411                         <testResource>
412                                 <directory>src/test/resources</directory>
413                                 <includes>
414                                         <include>**/*</include>
415                                 </includes>
416                                 <filtering>true</filtering>
417                         </testResource>
418                 </testResources>
419                 <resources>
420                         <resource>
421                                 <directory>src/main/resources</directory>
422                                 <filtering>true</filtering>
423                         </resource>
424                         <resource>
425                                 <directory>src/main/docker</directory>
426                                 <includes>
427                                         <include>**/*</include>
428                                 </includes>
429                                 <filtering>true</filtering>
430                         </resource>
431                         <resource>
432                                 <directory>src/main/doxygen</directory>
433                                 <includes>
434                                         <include>**/*</include>
435                                 </includes>
436                                 <filtering>true</filtering>
437                         </resource>
438                 </resources>
439
440
441
442                 <plugins>
443                         <plugin>
444                                 <groupId>org.apache.maven.plugins</groupId>
445                                 <artifactId>maven-jar-plugin</artifactId>
446                                 <version>3.0.2</version>
447                                 <executions>
448                                         <execution>
449                                                 <id>jar-with-only-classes</id>
450                                                 <phase>package</phase>
451                                                 <goals>
452                                                         <goal>jar</goal>
453                                                 </goals>
454                                                 <configuration>
455                                                         <classifier>classes</classifier>
456                                                         <includes>
457                                                                 <include>org/**</include>
458                                                         </includes>
459                                                 </configuration>
460                                         </execution>
461                                 </executions>
462                         </plugin>
463                         <plugin>
464                                 <groupId>com.github.kongchen</groupId>
465                                 <artifactId>swagger-maven-plugin</artifactId>
466                                 <version>3.1.5</version>
467                                 <executions>
468                                         <execution>
469                                                 <phase>compile</phase>
470                                                 <goals>
471                                                         <goal>generate</goal>
472                                                 </goals>
473                                                 <configuration>
474                                                         <apiSources>
475                                                                 <apiSource>
476                                                                         <locations>
477                                                                                 <location>org.onap.clamp.clds.service</location>
478                                                                         </locations>
479                                                                         <basePath>/</basePath>
480                                                                         <info>
481                                                                                 <title>${project.artifactId} Service</title>
482                                                                                 <version>${project.version}</version>
483                                                                         </info>
484                                                                         <swaggerDirectory>${project.build.directory}/classes/META-INF/resources/icd</swaggerDirectory>
485                                                                 </apiSource>
486                                                         </apiSources>
487                                                 </configuration>
488                                         </execution>
489                                 </executions>
490                         </plugin>
491                         <plugin>
492                                 <groupId>org.codehaus.mojo</groupId>
493                                 <artifactId>build-helper-maven-plugin</artifactId>
494                                 <version>3.0.0</version>
495                                 <executions>
496                                         <execution>
497                                                 <goals>
498                                                         <goal>attach-artifact</goal>
499                                                 </goals>
500                                                 <phase>package</phase>
501                                                 <configuration>
502                                                         <artifacts>
503                                                                 <artifact>
504                                                                         <file>${project.build.directory}/clamp-classes.jar</file>
505                                                                         <type>jar</type>
506                                                                         <classifier>classes</classifier>
507                                                                 </artifact>
508                                                         </artifacts>
509                                                 </configuration>
510                                         </execution>
511                                 </executions>
512                         </plugin>
513
514                         <plugin>
515                                 <groupId>org.springframework.boot</groupId>
516                                 <artifactId>spring-boot-maven-plugin</artifactId>
517                                 <version>1.5.3.RELEASE</version>
518                                 <executions>
519                                         <execution>
520                                                 <goals>
521                                                         <goal>repackage</goal>
522                                                 </goals>
523                                                 <phase>package</phase>
524                                         </execution>
525                                 </executions>
526                         </plugin>
527                         <plugin>
528                                 <groupId>org.apache.maven.plugins</groupId>
529                                 <artifactId>maven-gpg-plugin</artifactId>
530                                 <version>1.5</version>
531                                 <configuration>
532                                         <skip>true</skip>
533                                 </configuration>
534                                 <executions>
535                                         <execution>
536                                                 <id>sign-artifacts</id>
537                                                 <phase>verify</phase>
538                                                 <goals>
539                                                         <goal>sign</goal>
540                                                 </goals>
541                                         </execution>
542                                 </executions>
543                         </plugin>
544                         <plugin>
545                                 <groupId>org.sonatype.plugins</groupId>
546                                 <artifactId>nexus-staging-maven-plugin</artifactId>
547                                 <version>1.6.7</version>
548                                 <extensions>true</extensions>
549                                 <configuration>
550                                         <serverId>ossrhajsc</serverId>
551                                         <nexusUrl>https://oss.sonatype.org/</nexusUrl>
552                                         <autoReleaseAfterClose>true</autoReleaseAfterClose>
553                                         <skipNexusStagingDeployMojo>${skip.staging.artifacts}</skipNexusStagingDeployMojo>
554                                 </configuration>
555                         </plugin>
556                         <plugin>
557                                 <groupId>com.spotify</groupId>
558                                 <artifactId>docker-maven-plugin</artifactId>
559                                 <version>0.4.11</version>
560                                 <configuration>
561                                         <imageName>onap/clamp</imageName>
562                                         <dockerDirectory>src/main/docker</dockerDirectory>
563                                         <serverId>docker-hub</serverId>
564                                         <imageTags>
565                                                 <imageTag>${project.version}</imageTag>
566                                                 <imageTag>latest</imageTag>
567                                         </imageTags>
568                                         <forceTags>true</forceTags>
569                                         <resources>
570                                                 <resource>
571                                                         <targetPath>/</targetPath>
572                                                         <directory>${project.build.directory}</directory>
573                                                         <include>${project.build.finalName}.jar</include>
574                                                 </resource>
575                                                 <resource>
576                                                         <targetPath>/</targetPath>
577                                                         <directory>${project.build.directory}</directory>
578                                                         <include>etc/config/**</include>
579                                                 </resource>
580                                                 <resource>
581                                                         <targetPath>/</targetPath>
582                                                         <directory>${project.build.directory}</directory>
583                                                         <include>etc/keystore/**</include>
584                                                 </resource>
585                                         </resources>
586                                 </configuration>
587                                 <executions>
588                                         <execution>
589                                                 <id>build-image</id>
590                                                 <phase>package</phase>
591                                                 <goals>
592                                                         <goal>build</goal>
593                                                 </goals>
594                                                 <configuration>
595                                                         <skipDockerBuild>${skip.docker.build}</skipDockerBuild>
596                                                         <buildArgs>
597                                                                 <http_proxy>${env.HTTP_PROXY}</http_proxy>
598                                                                 <https_proxy>${env.HTTPS_PROXY}</https_proxy>
599                                                         </buildArgs>
600                                                 </configuration>
601                                         </execution>
602                                         <execution>
603                                                 <id>push-image</id>
604                                                 <phase>deploy</phase>
605                                                 <goals>
606                                                         <goal>push</goal>
607                                                 </goals>
608                                                 <configuration>
609                                                     <imageName>onap/clamp</imageName>
610                                                         <skipDockerPush>${skip.docker.push}</skipDockerPush>
611                                                 </configuration>
612                                         </execution>
613                                 </executions>
614                         </plugin>
615                         <plugin>
616                                 <groupId>org.apache.maven.plugins</groupId>
617                                 <artifactId>maven-surefire-plugin</artifactId>
618                                 <version>2.19.1</version>
619                                 <configuration>
620                                         <forkCount>1</forkCount>
621                                         <reuseForks>false</reuseForks>
622                                 </configuration>
623                         </plugin>
624
625                         <plugin>
626                                 <groupId>org.apache.maven.plugins</groupId>
627                                 <artifactId>maven-failsafe-plugin</artifactId>
628                                 <version>2.16</version>
629
630                                 <executions>
631                                         <execution>
632                                                 <goals>
633                                                         <goal>integration-test</goal>
634                                                         <goal>verify</goal>
635                                                 </goals>
636                                                 <configuration>
637                                                         <forkCount>1</forkCount>
638                                                         <reuseForks>false</reuseForks>
639                                                 </configuration>
640                                         </execution>
641                                 </executions>
642
643                         </plugin>
644                         <plugin>
645                                 <groupId>io.fabric8</groupId>
646                                 <artifactId>docker-maven-plugin</artifactId>
647                                 <version>0.16.5</version>
648                                 <configuration>
649                                         <verbose>true</verbose>
650                                         <apiVersion>1.23</apiVersion>
651                                         <images>
652                                                 <image>
653                                                         <name>mariadb:10.1.11</name>
654                                                         <alias>mariadb</alias>
655                                                         <run>
656                                                                 <env>
657                                                                         <MYSQL_ROOT_PASSWORD>strong_pitchou</MYSQL_ROOT_PASSWORD>
658                                                                 </env>
659                                                                 <hostname>mariadb</hostname>
660                                                                 <volumes>
661                                                                         <bind>
662                                                                                 <volume>${project.basedir}/extra/sql/:/docker-entrypoint-initdb.d</volume>
663                                                                                 <volume>${project.basedir}/extra/docker/mariadb/conf1:/etc/mysql/conf.d</volume>
664                                                                         </bind>
665                                                                 </volumes>
666                                                                 <wait>
667                                                                         <log>socket: '/var/run/mysqld/mysqld.sock'  port: 3306  mariadb.org binary distribution</log>
668                                                                         <time>300000</time>
669                                                                 </wait>
670                                                                 <ports>
671                                                                         <port>${docker.mariadb.port.host}:3306</port>
672                                                                 </ports>
673                                                         </run>
674                                                 </image>
675                                         </images>
676                                 </configuration>
677
678                                 <executions>
679                                         <execution>
680                                                 <id>mariadb-start-for-it</id>
681                                                 <phase>pre-integration-test</phase>
682                                                 <goals>
683                                                         <goal>start</goal>
684                                                 </goals>
685                                                 <configuration>
686                                                         <skip>${skipITs}</skip>
687                                                 </configuration>
688                                         </execution>
689                                         <execution>
690                                                 <id>mariadb-stop-for-it</id>
691                                                 <phase>post-integration-test</phase>
692                                                 <goals>
693                                                         <goal>stop</goal>
694                                                 </goals>
695                                                 <configuration>
696                                                         <skip>${skipITs}</skip>
697                                                 </configuration>
698                                         </execution>
699                                 </executions>
700                         </plugin>
701
702                         <plugin>
703                                 <groupId>org.jacoco</groupId>
704                                 <artifactId>jacoco-maven-plugin</artifactId>
705                                 <version>0.7.7.201606060606</version>
706                                 <configuration>
707                                         <dumpOnExit>true</dumpOnExit>
708                                         <includes>
709                                                 <include>org.onap.clamp.*</include>
710                                         </includes>
711                                 </configuration>
712                                 <executions>
713                                         <execution>
714                                                 <id>jacoco-unit-tests</id>
715                                                 <goals>
716                                                         <goal>prepare-agent</goal>
717                                                 </goals>
718                                                 <configuration>
719                                                         <destFile>${project.build.directory}/coverage-reports/jacoco.exec</destFile>
720                                                         <!-- <append>true</append> -->
721                                                 </configuration>
722                                         </execution>
723                                         <execution>
724                                                 <id>jacoco-integration-tests</id>
725                                                 <phase>pre-integration-test</phase>
726                                                 <goals>
727                                                         <goal>prepare-agent</goal>
728                                                 </goals>
729                                                 <configuration>
730                                                         <destFile>${project.build.directory}/coverage-reports/jacoco-it.exec</destFile>
731                                                         <!-- <append>true</append> -->
732                                                 </configuration>
733                                         </execution>
734                                         <execution>
735                                                 <goals>
736                                                         <goal>merge</goal>
737                                                 </goals>
738                                                 <phase>post-integration-test</phase>
739                                                 <configuration>
740                                                         <fileSets>
741                                                                 <fileSet implementation="org.apache.maven.shared.model.fileset.FileSet">
742                                                                         <directory>${project.build.directory}/coverage-reports</directory>
743                                                                         <includes>
744                                                                                 <include>*.exec</include>
745                                                                         </includes>
746                                                                 </fileSet>
747                                                         </fileSets>
748                                                         <destFile>${project.build.directory}/jacoco-dev.exec</destFile>
749                                                 </configuration>
750                                         </execution>
751                                 </executions>
752                         </plugin>
753
754                         <!-- This plugin will be useful when we will have multi-modules project -->
755                         <plugin>
756                                 <groupId>org.codehaus.mojo</groupId>
757                                 <artifactId>versions-maven-plugin</artifactId>
758                                 <version>1.3.1</version>
759                         </plugin>
760                 </plugins>
761         </build>
762         <profiles>
763                 <profile>
764                         <id>docker</id>
765                         <properties>
766                                 <skip.staging.artifacts>true</skip.staging.artifacts>
767                                 <skip.docker.build>false</skip.docker.build>
768                         </properties>
769                 </profile>
770         </profiles>
771 </project>