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