2f1a7d248a2066c56b6ac023f3300f4577f7443a
[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.2</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>dom4j</groupId>
298                                                 <artifactId>dom4j</artifactId>
299                                 </dependency>
300
301                                 <dependency>
302                                                 <groupId>org.onap.policy.engine</groupId>
303                                                 <artifactId>PolicyEngineAPI</artifactId>
304                                                 <version>1.1.0</version>
305                                                 <exclusions>
306                                                                 <exclusion>
307                                                                                 <artifactId>log4j</artifactId>
308                                                                                 <groupId>log4j</groupId>
309                                                                 </exclusion>
310                                                                 <exclusion>
311                                                                                 <groupId>org.slf4j</groupId>
312                                                                                 <artifactId>slf4j-log4j12</artifactId>
313                                                                 </exclusion>
314                                                                 <exclusion>
315                                                                                 <artifactId>apache-log4j-extras</artifactId>
316                                                                                 <groupId>log4j</groupId>
317                                                                 </exclusion>
318                                                                 <exclusion>
319                                                                                 <artifactId>jackson-databind</artifactId>
320                                                                                 <groupId>com.fasterxml.jackson.core</groupId>
321                                                                 </exclusion>
322                                                                 <exclusion>
323                                                                                 <groupId>mysql</groupId>
324                                                                                 <artifactId>mysql-connector-java</artifactId>
325                                                                 </exclusion>
326                                                                 <exclusion>
327                                                                                 <groupId>commons-io</groupId>
328                                                                                 <artifactId>commons-io</artifactId>
329                                                                 </exclusion>
330                                                 </exclusions>
331                                 </dependency>
332                                 <dependency>
333                                                 <groupId>org.onap.policy.common</groupId>
334                                                 <artifactId>ONAP-Logging</artifactId>
335                                                 <version>1.1.0</version>
336                                                 <exclusions>
337                                                                 <exclusion>
338                                                                                 <artifactId>log4j</artifactId>
339                                                                                 <groupId>log4j</groupId>
340                                                                 </exclusion>
341                                                                 <exclusion>
342                                                                                 <groupId>org.slf4j</groupId>
343                                                                                 <artifactId>slf4j-log4j12</artifactId>
344                                                                 </exclusion>
345                                                                 <exclusion>
346                                                                                 <artifactId>apache-log4j-extras</artifactId>
347                                                                                 <groupId>log4j</groupId>
348                                                                 </exclusion>
349                                                 </exclusions>
350                                 </dependency>
351                                 <dependency>
352                                                 <groupId>org.onap.policy.engine</groupId>
353                                                 <artifactId>PolicyEngineUtils</artifactId>
354                                                 <version>1.1.0</version>
355                                                 <exclusions>
356                                                                 <exclusion>
357                                                                                 <artifactId>log4j</artifactId>
358                                                                                 <groupId>log4j</groupId>
359                                                                 </exclusion>
360                                                                 <exclusion>
361                                                                                 <groupId>org.slf4j</groupId>
362                                                                                 <artifactId>slf4j-log4j12</artifactId>
363                                                                 </exclusion>
364                                                                 <exclusion>
365                                                                                 <artifactId>apache-log4j-extras</artifactId>
366                                                                                 <groupId>log4j</groupId>
367                                                                 </exclusion>
368                                                                 <exclusion>
369                                                                                 <groupId>mysql</groupId>
370                                                                                 <artifactId>mysql-connector-java</artifactId>
371                                                                 </exclusion>
372                                                                 <exclusion>
373                                                                                 <groupId>org.mariadb.jdbc</groupId>
374                                                                                 <artifactId>mariadb-java-client</artifactId>
375                                                                 </exclusion>
376                                                                 <exclusion>
377                                                                                 <groupId>com.att.nsa</groupId>
378                                                                                 <artifactId>dmaapClient</artifactId>
379                                                                 </exclusion>
380                                                 </exclusions>
381                                 </dependency>
382                                 <dependency>
383                                                 <groupId>org.onap.policy.drools-applications</groupId>
384                                                 <artifactId>policy-yaml</artifactId>
385                                                 <version>1.1.0</version>
386                                                 <exclusions>
387                                                                 <exclusion>
388                                                                                 <artifactId>log4j</artifactId>
389                                                                                 <groupId>log4j</groupId>
390                                                                 </exclusion>
391                                                                 <exclusion>
392                                                                                 <groupId>org.slf4j</groupId>
393                                                                                 <artifactId>slf4j-log4j12</artifactId>
394                                                                 </exclusion>
395                                                                 <exclusion>
396                                                                                 <artifactId>apache-log4j-extras</artifactId>
397                                                                                 <groupId>log4j</groupId>
398                                                                 </exclusion>
399                                                 </exclusions>
400                                 </dependency>
401                                 <dependency>
402                                                 <groupId>org.onap.policy.drools-applications</groupId>
403                                                 <artifactId>sdc</artifactId>
404                                                 <version>1.1.0</version>
405                                                 <exclusions>
406                                                                 <exclusion>
407                                                                                 <artifactId>log4j</artifactId>
408                                                                                 <groupId>log4j</groupId>
409                                                                 </exclusion>
410                                                                 <exclusion>
411                                                                                 <groupId>org.slf4j</groupId>
412                                                                                 <artifactId>slf4j-log4j12</artifactId>
413                                                                 </exclusion>
414                                                                 <exclusion>
415                                                                                 <artifactId>apache-log4j-extras</artifactId>
416                                                                                 <groupId>log4j</groupId>
417                                                                 </exclusion>
418                                                 </exclusions>
419                                 </dependency>
420                                 <dependency>
421                                                 <groupId>org.onap.policy.drools-applications</groupId>
422                                                 <artifactId>aai</artifactId>
423                                                 <version>1.1.0</version>
424                                                 <exclusions>
425                                                                 <exclusion>
426                                                                                 <artifactId>log4j</artifactId>
427                                                                                 <groupId>log4j</groupId>
428                                                                 </exclusion>
429                                                                 <exclusion>
430                                                                                 <groupId>org.slf4j</groupId>
431                                                                                 <artifactId>slf4j-log4j12</artifactId>
432                                                                 </exclusion>
433                                                                 <exclusion>
434                                                                                 <artifactId>apache-log4j-extras</artifactId>
435                                                                                 <groupId>log4j</groupId>
436                                                                 </exclusion>
437                                                 </exclusions>
438                                 </dependency>
439                                 <dependency>
440                                                 <groupId>com.fasterxml.jackson.core</groupId>
441                                                 <artifactId>jackson-databind</artifactId>
442                                 </dependency>
443                                 <dependency>
444                                                 <groupId>com.fasterxml.jackson.dataformat</groupId>
445                                                 <artifactId>jackson-dataformat-yaml</artifactId>
446                                 </dependency>
447                                 <dependency>
448                                                 <groupId>org.apache.commons</groupId>
449                                                 <artifactId>commons-csv</artifactId>
450                                                 <version>1.3</version>
451                                 </dependency>
452                                 <dependency>
453                                                 <groupId>com.sun.faces</groupId>
454                                                 <artifactId>jsf-api</artifactId>
455                                                 <version>2.1.7</version>
456                                 </dependency>
457                                 <dependency>
458                                                 <groupId>com.sun.faces</groupId>
459                                                 <artifactId>jsf-impl</artifactId>
460                                                 <version>2.1.7</version>
461                                 </dependency>
462                                 <!-- Other dependencies to fix nexus IQ reported vulnerabilities -->
463                                 <dependency>
464                                         <groupId>org.codehaus.plexus</groupId>
465                                         <artifactId>plexus-utils</artifactId>
466                                         <version>3.0.24</version>
467                                 </dependency>
468                                 <dependency>
469                                         <groupId>commons-fileupload</groupId>
470                                         <artifactId>commons-fileupload</artifactId>
471                                         <version>1.3.3</version>
472                                 </dependency>
473                                 <dependency>
474                                         <groupId>org.jboss.spec.javax.ws.rs</groupId>
475                                         <artifactId>jboss-jaxrs-api_2.0_spec</artifactId>
476                                         <version>1.0.1.Final</version>
477                                 </dependency>
478                                 <!-- Remove the MYSQL connector and replace it by Mariadb -->
479                                 <dependency>
480                                                 <groupId>org.mariadb.jdbc</groupId>
481                                                 <artifactId>mariadb-java-client</artifactId>
482                                                 <version>2.2.1</version>
483                                 </dependency>
484                                 <!-- For SDC Controller -->
485                                 <dependency>
486                                                 <groupId>org.openecomp.sdc.sdc-distribution-client</groupId>
487                                                 <artifactId>sdc-distribution-client</artifactId>
488                                                 <version>1.2.3</version>
489                                 </dependency>
490                 </dependencies>
491
492                 <build>
493                                 <finalName>clamp</finalName>
494
495                                 <testResources>
496                                                 <testResource>
497                                                                 <directory>src/test/resources</directory>
498                                                                 <excludes>
499                                                                                 <exclude>**/*.jks</exclude>
500                                                                 </excludes>
501                                                                 <filtering>true</filtering>
502                                                 </testResource>
503                                                 <testResource>
504                                                                 <directory>src/test/resources/https</directory>
505                                                                 <includes>
506                                                                                 <include>**.jks</include>
507                                                                 </includes>
508                                                                 <filtering>false</filtering>
509                                                                 <targetPath>https</targetPath>
510                                                 </testResource>
511                                 </testResources>
512                                 <resources>
513                                                 <resource>
514                                                                 <directory>src/main/resources</directory>
515                                                                 <filtering>true</filtering>
516                                                 </resource>
517                                                 <resource>
518                                                                 <directory>src/main/docker</directory>
519                                                                 <includes>
520                                                                                 <include>**/*</include>
521                                                                 </includes>
522                                                                 <filtering>true</filtering>
523                                                 </resource>
524                                 </resources>
525
526                                 <plugins>
527                                                 <plugin>
528                                                                 <groupId>org.codehaus.groovy.maven</groupId>
529                                                                 <artifactId>gmaven-plugin</artifactId>
530                                                                 <version>1.0</version>
531                                                                 <executions>
532                                                                                 <execution>
533                                                                                                 <phase>validate</phase>
534                                                                                                 <goals>
535                                                                                                                 <goal>execute</goal>
536                                                                                                 </goals>
537                                                                                                 <configuration>
538                                                                                                                 <source>${project.basedir}/src/main/script/TagVersion.groovy</source>
539                                                                                                 </configuration>
540                                                                                 </execution>
541                                                                 </executions>
542                                                 </plugin>
543                                                 <plugin>
544                                                                 <groupId>org.apache.maven.plugins</groupId>
545                                                                 <artifactId>maven-jar-plugin</artifactId>
546                                                                 <version>3.0.2</version>
547                                                                 <executions>
548                                                                                 <execution>
549                                                                                                 <id>jar-with-only-classes</id>
550                                                                                                 <phase>package</phase>
551                                                                                                 <goals>
552                                                                                                                 <goal>jar</goal>
553                                                                                                 </goals>
554                                                                                                 <configuration>
555                                                                                                                 <classifier>classes</classifier>
556                                                                                                                 <includes>
557                                                                                                                                 <include>org/**</include>
558                                                                                                                 </includes>
559                                                                                                 </configuration>
560                                                                                 </execution>
561                                                                 </executions>
562                                                 </plugin>
563                                                 <plugin>
564                                                                 <groupId>org.codehaus.mojo</groupId>
565                                                                 <artifactId>build-helper-maven-plugin</artifactId>
566                                                                 <version>3.0.0</version>
567                                                                 <executions>
568                                                                                 <execution>
569                                                                                                 <goals>
570                                                                                                                 <goal>attach-artifact</goal>
571                                                                                                 </goals>
572                                                                                                 <phase>package</phase>
573                                                                                                 <configuration>
574                                                                                                                 <artifacts>
575                                                                                                                                 <artifact>
576                                                                                                                                                 <file>${project.build.directory}/clamp-classes.jar</file>
577                                                                                                                                                 <type>jar</type>
578                                                                                                                                                 <classifier>classes</classifier>
579                                                                                                                                 </artifact>
580                                                                                                                 </artifacts>
581                                                                                                 </configuration>
582                                                                                 </execution>
583                                                                 </executions>
584                                                 </plugin>
585
586                                                 <plugin>
587                                                                 <groupId>org.springframework.boot</groupId>
588                                                                 <artifactId>spring-boot-maven-plugin</artifactId>
589                                                                 <version>${springboot.version}</version>
590                                                                 <executions>
591                                                                                 <execution>
592                                                                                                 <goals>
593                                                                                                                 <goal>repackage</goal>
594                                                                                                 </goals>
595                                                                                                 <phase>package</phase>
596                                                                                 </execution>
597                                                                 </executions>
598                                                 </plugin>
599                                                 <plugin>
600                                                                 <groupId>org.sonatype.plugins</groupId>
601                                                                 <artifactId>nexus-staging-maven-plugin</artifactId>
602                                                                 <version>1.6.7</version>
603                                                                 <extensions>true</extensions>
604                                                                 <configuration>
605                                                                                 <nexusUrl>https://nexus.onap.org</nexusUrl>
606                                                                                 <stagingProfileId>176c31dfe190a</stagingProfileId>
607                                                                                 <serverId>ecomp-staging</serverId>
608                                                                                 <skipNexusStagingDeployMojo>${skip.staging.artifacts}</skipNexusStagingDeployMojo>
609                                                                 </configuration>
610                                                 </plugin>
611                                                 <plugin>
612                                                                 <groupId>com.spotify</groupId>
613                                                                 <artifactId>docker-maven-plugin</artifactId>
614                                                                 <version>1.0.0</version>
615                                                                 <configuration>
616                                                                                 <imageName>onap/clamp</imageName>
617                                                                                 <dockerDirectory>src/main/docker</dockerDirectory>
618                                                                                 <serverId>docker-hub</serverId>
619                                                                                 <imageTags>
620                                                                                                 <imageTag>latest</imageTag>
621                                                                                                 <imageTag>${project.docker.latesttagtimestamp.version}</imageTag>
622                                                                                                 <imageTag>${project.docker.latesttag.version}</imageTag>
623                                                                                 </imageTags>
624                                                                                 <forceTags>true</forceTags>
625                                                                                 <resources>
626                                                                                                 <resource>
627                                                                                                                 <targetPath>/</targetPath>
628                                                                                                                 <directory>${project.build.directory}</directory>
629                                                                                                                 <include>${project.build.finalName}.jar</include>
630                                                                                                 </resource>
631                                                                                                 <resource>
632                                                                                                                 <targetPath>/</targetPath>
633                                                                                                                 <directory>${project.build.directory}</directory>
634                                                                                                                 <include>etc/config/**</include>
635                                                                                                 </resource>
636                                                                                                 <resource>
637                                                                                                                 <targetPath>/</targetPath>
638                                                                                                                 <directory>${project.build.directory}</directory>
639                                                                                                                 <include>etc/keystore/**</include>
640                                                                                                 </resource>
641                                                                                 </resources>
642                                                                 </configuration>
643                                                                 <executions>
644                                                                                 <execution>
645                                                                                                 <id>build-image</id>
646                                                                                                 <phase>package</phase>
647                                                                                                 <goals>
648                                                                                                                 <goal>build</goal>
649                                                                                                 </goals>
650                                                                                                 <configuration>
651                                                                                                                 <skipDockerBuild>${skip.docker.build}</skipDockerBuild>
652                                                                                                                 <buildArgs>
653                                                                                                                                 <http_proxy>${env.HTTP_PROXY}</http_proxy>
654                                                                                                                                 <https_proxy>${env.HTTPS_PROXY}</https_proxy>
655                                                                                                                 </buildArgs>
656                                                                                                 </configuration>
657                                                                                 </execution>
658
659                                                                                 <execution>
660                                                                                                 <id>tag-image-latest-timestamp</id>
661                                                                                                 <phase>package</phase>
662                                                                                                 <goals>
663                                                                                                                 <goal>tag</goal>
664                                                                                                 </goals>
665                                                                                                 <configuration>
666                                                                                                                 <image>onap/clamp</image>
667                                                                                                                 <newName>${docker.push.registry}/onap/clamp:${project.docker.latesttagtimestamp.version}</newName>
668                                                                                                                 <skipDockerTag>${skip.docker.push}</skipDockerTag>
669                                                                                                 </configuration>
670                                                                                 </execution>
671                                                                                 <execution>
672                                                                                                 <id>push-image-latest-timestamp</id>
673                                                                                                 <phase>deploy</phase>
674                                                                                                 <goals>
675                                                                                                                 <goal>push</goal>
676                                                                                                 </goals>
677                                                                                                 <configuration>
678                                                                                                                 <imageName>${docker.push.registry}/onap/clamp:${project.docker.latesttagtimestamp.version}</imageName>
679                                                                                                                 <skipDockerPush>${skip.docker.push}</skipDockerPush>
680                                                                                                 </configuration>
681                                                                                 </execution>
682                                                                                 <execution>
683                                                                                                 <id>tag-image-latest</id>
684                                                                                                 <phase>package</phase>
685                                                                                                 <goals>
686                                                                                                                 <goal>tag</goal>
687                                                                                                 </goals>
688                                                                                                 <configuration>
689                                                                                                                 <image>onap/clamp</image>
690                                                                                                                 <newName>${docker.push.registry}/onap/clamp:${project.docker.latesttag.version}</newName>
691                                                                                                                 <skipDockerTag>${skip.docker.push}</skipDockerTag>
692                                                                                                 </configuration>
693                                                                                 </execution>
694                                                                                 <execution>
695                                                                                                 <id>push-image-latest</id>
696                                                                                                 <phase>deploy</phase>
697                                                                                                 <goals>
698                                                                                                                 <goal>push</goal>
699                                                                                                 </goals>
700                                                                                                 <configuration>
701                                                                                                                 <imageName>${docker.push.registry}/onap/clamp:${project.docker.latesttag.version}</imageName>
702                                                                                                                 <skipDockerPush>${skip.docker.push}</skipDockerPush>
703                                                                                                 </configuration>
704                                                                                 </execution>
705                                                                                 <execution>
706                                                                                                 <id>tag-image</id>
707                                                                                                 <phase>package</phase>
708                                                                                                 <goals>
709                                                                                                                 <goal>tag</goal>
710                                                                                                 </goals>
711                                                                                                 <configuration>
712                                                                                                                 <image>onap/clamp</image>
713                                                                                                                 <newName>${docker.push.registry}/onap/clamp:latest</newName>
714                                                                                                                 <skipDockerTag>${skip.docker.push}</skipDockerTag>
715                                                                                                 </configuration>
716                                                                                 </execution>
717                                                                                 <execution>
718                                                                                                 <id>push-image</id>
719                                                                                                 <phase>deploy</phase>
720                                                                                                 <goals>
721                                                                                                                 <goal>push</goal>
722                                                                                                 </goals>
723                                                                                                 <configuration>
724                                                                                                                 <imageName>${docker.push.registry}/onap/clamp:latest</imageName>
725                                                                                                                 <skipDockerPush>${skip.docker.push}</skipDockerPush>
726                                                                                                 </configuration>
727                                                                                 </execution>
728                                                                 </executions>
729                                                 </plugin>
730                                                 <plugin>
731                                                                 <groupId>org.apache.maven.plugins</groupId>
732                                                                 <artifactId>maven-surefire-plugin</artifactId>
733                                                                 <version>2.19.1</version>
734                                                                 <configuration>
735                                                                                 <forkCount>1</forkCount>
736                                                                                 <reuseForks>false</reuseForks>
737                                                                 </configuration>
738                                                 </plugin>
739
740                                                 <plugin>
741                                                                 <groupId>org.apache.maven.plugins</groupId>
742                                                                 <artifactId>maven-failsafe-plugin</artifactId>
743                                                                 <version>2.16</version>
744
745                                                                 <executions>
746                                                                                 <execution>
747                                                                                                 <id>integration-tests</id>
748                                                                                                 <goals>
749                                                                                                                 <goal>integration-test</goal>
750                                                                                                                 <goal>verify</goal>
751                                                                                                 </goals>
752                                                                                                 <configuration>
753                                                                                                                 <includes>
754                                                                                                                                 <include>**/*ItCase.java</include>
755                                                                                                                 </includes>
756                                                                                                                 <forkCount>1</forkCount>
757                                                                                                                 <reuseForks>false</reuseForks>
758                                                                                                 </configuration>
759                                                                                 </execution>
760                                                                 </executions>
761
762                                                 </plugin>
763                                                 <plugin>
764                                                                 <groupId>io.fabric8</groupId>
765                                                                 <artifactId>docker-maven-plugin</artifactId>
766                                                                 <version>0.16.5</version>
767                                                                 <configuration>
768                                                                                 <verbose>true</verbose>
769                                                                                 <apiVersion>1.23</apiVersion>
770                                                                                 <images>
771                                                                                                 <image>
772                                                                                                                 <name>mariadb:10.1.11</name>
773                                                                                                                 <alias>mariadb</alias>
774                                                                                                                 <run>
775                                                                                                                                 <env>
776                                                                                                                                                 <MYSQL_ROOT_PASSWORD>strong_pitchou</MYSQL_ROOT_PASSWORD>
777                                                                                                                                 </env>
778                                                                                                                                 <hostname>mariadb</hostname>
779                                                                                                                                 <volumes>
780                                                                                                                                                 <bind>
781                                                                                                                                                                 <volume>${project.basedir}/extra/sql/:/docker-entrypoint-initdb.d</volume>
782                                                                                                                                                                 <volume>${project.basedir}/extra/docker/mariadb/conf1:/etc/mysql/conf.d</volume>
783                                                                                                                                                 </bind>
784                                                                                                                                 </volumes>
785                                                                                                                                 <wait>
786                                                                                                                                                 <log>socket: '/var/run/mysqld/mysqld.sock'  port: 3306  mariadb.org binary distribution</log>
787                                                                                                                                                 <time>600000</time>
788                                                                                                                                 </wait>
789                                                                                                                                 <ports>
790                                                                                                                                                 <port>${docker.mariadb.port.host}:3306</port>
791                                                                                                                                 </ports>
792                                                                                                                 </run>
793                                                                                                 </image>
794                                                                                                 <image>
795                                                                                                                 <name>python:2-slim</name>
796                                                                                                                 <alias>python</alias>
797                                                                                                                 <run>
798                                                                                                                                 <hostname>python</hostname>
799                                                                                                                                 <volumes>
800                                                                                                                                                 <bind>
801                                                                                                                                                                 <volume>${project.basedir}/src/test/resources/http-cache/:/usr/src/http-cache-app</volume>
802                                                                                                                                                                 <volume>${project.basedir}/src/test/resources/http-cache/sdc-example/:/usr/src/http-cache-app/data-cache</volume>
803                                                                                                                                                 </bind>
804                                                                                                                                 </volumes>
805                                                                                                                                 <wait>
806                                                                                                                                                 <tcp>
807                                                                                                                                                                 <ports>
808                                                                                                                                                                                 <port>8080</port>
809                                                                                                                                                                 </ports>
810                                                                                                                                                                 <mode>direct</mode>
811                                                                                                                                                 </tcp>
812                                                                                                                                                 <time>120000</time>
813                                                                                                                                 </wait>
814                                                                                                                                 <ports>
815                                                                                                                                                 <port>${docker.http-cache.port.host}:8080</port>
816                                                                                                                                 </ports>
817                                                                                                                                 <workingDir>/usr/src/http-cache-app</workingDir>
818                                                                                                                                 <cmd>
819                                                                                                                                                 <shell>./start_http_cache.sh ${http.proxy}</shell>
820                                                                                                                                 </cmd>
821                                                                                                                 </run>
822                                                                                                 </image>
823                                                                                 </images>
824                                                                                 <skip>${skipITs}</skip>
825                                                                 </configuration>
826
827                                                                 <executions>
828                                                                                 <execution>
829                                                                                                 <id>docker-start-for-it</id>
830                                                                                                 <phase>pre-integration-test</phase>
831                                                                                                 <goals>
832                                                                                                                 <goal>start</goal>
833                                                                                                 </goals>
834                                                                                                 <configuration>
835                                                                                                                 <skip>${skipITs}</skip>
836                                                                                                 </configuration>
837                                                                                 </execution>
838                                                                                 <execution>
839                                                                                                 <id>docker-stop-for-it</id>
840                                                                                                 <phase>post-integration-test</phase>
841                                                                                                 <goals>
842                                                                                                                 <goal>stop</goal>
843                                                                                                 </goals>
844                                                                                                 <configuration>
845                                                                                                                 <skip>${skipITs}</skip>
846                                                                                                 </configuration>
847                                                                                 </execution>
848                                                                 </executions>
849                                                 </plugin>
850
851                                                 <plugin>
852                                                                 <groupId>org.jacoco</groupId>
853                                                                 <artifactId>jacoco-maven-plugin</artifactId>
854                                                                 <version>0.7.7.201606060606</version>
855                                                                 <configuration>
856                                                                                 <dumpOnExit>true</dumpOnExit>
857                                                                                 <includes>
858                                                                                                 <include>org.onap.clamp.*</include>
859                                                                                 </includes>
860                                                                 </configuration>
861                                                                 <executions>
862                                                                                 <execution>
863                                                                                                 <id>pre-unit-test</id>
864                                                                                                 <goals>
865                                                                                                                 <goal>prepare-agent</goal>
866                                                                                                 </goals>
867                                                                                                 <configuration>
868                                                                                                                 <destFile>${project.build.directory}/coverage-reports/jacoco.exec</destFile>
869                                                                                                                 <!-- <append>true</append> -->
870                                                                                                 </configuration>
871                                                                                 </execution>
872                                                                                 <execution>
873                                                                                                 <id>pre-integration-test</id>
874                                                                                                 <phase>pre-integration-test</phase>
875                                                                                                 <goals>
876                                                                                                                 <goal>prepare-agent</goal>
877                                                                                                 </goals>
878                                                                                                 <configuration>
879                                                                                                                 <destFile>${project.build.directory}/coverage-reports/jacoco-it.exec</destFile>
880                                                                                                                 <!-- <append>true</append> -->
881                                                                                                 </configuration>
882                                                                                 </execution>
883                                                                                 <execution>
884                                                                                                 <goals>
885                                                                                                                 <goal>merge</goal>
886                                                                                                 </goals>
887                                                                                                 <phase>post-integration-test</phase>
888                                                                                                 <configuration>
889                                                                                                                 <fileSets>
890                                                                                                                                 <fileSet implementation="org.apache.maven.shared.model.fileset.FileSet">
891                                                                                                                                                 <directory>${project.build.directory}/coverage-reports</directory>
892                                                                                                                                                 <includes>
893                                                                                                                                                                 <include>*.exec</include>
894                                                                                                                                                 </includes>
895                                                                                                                                 </fileSet>
896                                                                                                                 </fileSets>
897                                                                                                                 <destFile>${project.build.directory}/jacoco-dev.exec</destFile>
898                                                                                                 </configuration>
899                                                                                 </execution>
900                                                                 </executions>
901                                                 </plugin>
902
903                                                 <!-- This plugin will be useful when we will have multi-modules project -->
904                                                 <plugin>
905                                                                 <groupId>org.codehaus.mojo</groupId>
906                                                                 <artifactId>versions-maven-plugin</artifactId>
907                                                                 <version>1.3.1</version>
908                                                 </plugin>
909                                 </plugins>
910                 </build>
911                 <profiles>
912                                 <profile>
913                                                 <id>docker</id>
914                                                 <properties>
915                                                                 <skip.staging.artifacts>true</skip.staging.artifacts>
916                                                                 <skip.docker.build>false</skip.docker.build>
917                                                                 <skip.docker.tag>false</skip.docker.tag>
918                                                                 <skip.docker.push>false</skip.docker.push>
919                                                 </properties>
920                                 </profile>
921                 </profiles>
922 </project>