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