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