Merge "Enable multithread for failsafe"
[clamp.git] / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3   ============LICENSE_START=======================================================
4   ONAP CLAMP
5   ================================================================================
6   Copyright (C) 2017-2019 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 -->
23 <project xmlns="http://maven.apache.org/POM/4.0.0"
24         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
25         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
26         <modelVersion>4.0.0</modelVersion>
27         <groupId>org.onap.clamp</groupId>
28         <artifactId>clds</artifactId>
29         <version>4.2.0-SNAPSHOT</version>
30         <name>clamp</name>
31
32
33         <parent>
34                 <groupId>org.onap.oparent</groupId>
35                 <artifactId>oparent</artifactId>
36                 <version>2.1.0</version>
37         </parent>
38
39         <description>
40                This is the MAVEN project that builds everything for ONAP CLAMP.
41                Docker engine is normally requires to perfom all possible tasks (including integration tests)
42                
43            It can build:
44            - The ONAP CLAMP JAR that contains CLAMP back-end code.
45            - The DOCKER images for:
46                 * CLAMP backend (Java Spring)
47                 * CLAMP frontend (Javscript React)
48                 * The dashboard - Elastic search
49                 * The dashboard - Logstash
50                 * The dashboard - Kibana
51
52            It can test:
53             - The CLAMP backend, JAVA unit testing
54             - The CLAMP backend, JAVA integration tests (with Spring + docker mariadb database + docker policy/dcae emulator written in python)
55             - The CLAMP frontend, Javascrip tests (NodeJS(NPM) + JEST + Enzyme fro React)
56            
57            The test coverage for dev's can be found after a "clean install" build in:
58             - Clamp backend: target/jacoco-dev.exec (unit tests + integration tests merged)
59                 or separately target/coverage-reports/jacoco.exec and target/coverage-reports/jacoco-it.exec
60             - Clamp frontend: target/ui-react/coverage
61
62            Useful mvn commands:
63             - mvn clean install: Build Clamp backend JAR + unit tests + integration tests + NPM tests (+coverage for all)
64             - mvn clean install -DskipITs=true: Build Clamp backend JAR + unit tests + NPM tests (+coverage for all), it does not require a DOCKER engine
65             - mvn clean install -DskipTests -P docker: Build Clamp backend JAR + all docker images
66
67            To start CLAMP (Build it before):
68             - Use docker-compose file in ./extra/docker/clamp/docker-compose.yml
69             - Use the script located in ./extra/bin/start-backend.sh + start-frontend.sh
70             - Use your IDE to use the Jar or start NVM/NPM
71
72         </description>
73
74         <properties>
75                 <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
76                 <clamp.project.version>${project.version}</clamp.project.version>
77                 <clamp.build.timestamp>${maven.build.timestamp}</clamp.build.timestamp>
78                 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
79                 <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
80
81                 <eelf.core.version>1.0.0</eelf.core.version>
82                 <camel.version>2.24.0</camel.version>
83                 <springboot.version>2.2.0.RELEASE</springboot.version>
84
85                 <sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
86                 <sonar.surefire.reportsPath>${project.build.directory}/surefire-reports</sonar.surefire.reportsPath>
87                 <!-- The value below comes from the jacoco maven plugin output, sonar now takes xml only -->
88                 <sonar.coverage.jacoco.xmlReportPaths>${project.build.directory}/jacoco-html-xml-reports/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths>
89                 <!-- <sonar.jacoco.reportPath>${project.build.directory}/coverage-reports/jacoco.exec</sonar.jacoco.reportPath>
90                 <sonar.jacoco.itReportPath>${project.build.directory}/coverage-reports/jacoco-it.exec</sonar.jacoco.itReportPath> -->
91                 <sonar.jacoco.reportMissing.force.zero>true</sonar.jacoco.reportMissing.force.zero>
92                 <sonar.projectVersion>${project.version}</sonar.projectVersion>
93                 <!-- Enable language to disable javascript analysis -->
94                 <!-- <sonar.language>java</sonar.language> -->
95                 <!-- Parameters for Javascript coverage -->
96                 <sonar.log.level>DEBUG</sonar.log.level>
97         <sonar.nodejs.executable>${project.build.directory}/${ui.react.src}/node/node</sonar.nodejs.executable>
98         <sonar.verbose>true</sonar.verbose>
99                 <sonar.sources>src/main,${project.build.directory}/${ui.react.src}/src</sonar.sources>
100                 <sonar.exclusions>src/main/resources/**</sonar.exclusions>
101                 <sonar.scm.exclusions.disabled>true</sonar.scm.exclusions.disabled>
102                 <sonar.javascript.lcov.reportPaths>${project.build.directory}/${ui.react.src}/coverage/lcov.info</sonar.javascript.lcov.reportPaths>
103                 <sonar.coverage.exclusions>src/main/resources/**,target/ui-react/src/**/*.test.js,target/ui-react/src/setupTests.js,src/main/docker/kibana/*.py</sonar.coverage.exclusions>
104                 <docker.push.registry>localhost:5000</docker.push.registry>
105                 <docker.pull.registry>nexus3.onap.org:10001</docker.pull.registry>
106                 <docker.skip.build>true</docker.skip.build>
107                 <docker.skip.push>true</docker.skip.push>
108                 <docker.skip.tag>true</docker.skip.tag>
109                 <skip.staging.artifacts>false</skip.staging.artifacts>
110                 <python.http.proxy.param />
111                 <tomcat.version>9.0.27</tomcat.version>
112                 <ui.react.src>ui-react</ui.react.src>
113                 <npm.publish.url>https://nexus3.onap.org/repository/npm.release/</npm.publish.url>
114         </properties>
115
116         <profiles>
117                 <profile>
118                         <id>without-test</id>
119                         <activation>
120                                 <property>
121                                         <name>maven.test.skip</name>
122                                         <value>true</value>
123                                 </property>
124                         </activation>
125                         <properties>
126                                 <docker.skip.run>true</docker.skip.run>
127                                 <docker.skip>true</docker.skip>
128                         </properties>
129                 </profile>
130                 <profile>
131                         <id>without-IT-only</id>
132                         <activation>
133                                 <property>
134                                         <name>skipITs</name>
135                                         <value>true</value>
136                                 </property>
137                         </activation>
138                         <properties>
139                                 <docker.skip.run>true</docker.skip.run>
140                                 <docker.skip>true</docker.skip>
141                         </properties>
142                 </profile>
143                 <profile>
144                         <id>without-IT-only2</id>
145                         <activation>
146                                 <property>
147                                         <name>skipTests</name>
148                                         <value>true</value>
149                                 </property>
150                         </activation>
151                         <properties>
152                                 <docker.skip.run>true</docker.skip.run>
153                                 <docker.skip>true</docker.skip>
154                         </properties>
155                 </profile>
156                 <profile>
157                         <id>docker</id>
158                         <properties>
159                                 <skip.staging.artifacts>true</skip.staging.artifacts>
160                                 <docker.skip.build>false</docker.skip.build>
161                                 <docker.skip.tag>false</docker.skip.tag>
162                                 <docker.skip.push>false</docker.skip.push>
163                                 <docker.skip>false</docker.skip>
164                         </properties>
165                 </profile>
166         </profiles>
167
168         <distributionManagement>
169                 <repository>
170                         <id>ecomp-releases</id>
171                         <name>Clamp Release Repository</name>
172                         <url>https://nexus.onap.org/content/repositories/releases/</url>
173                 </repository>
174                 <snapshotRepository>
175                         <id>ecomp-snapshots</id>
176                         <name>Clamp Snapshot Repository</name>
177                         <url>https://nexus.onap.org/content/repositories/snapshots/</url>
178                 </snapshotRepository>
179                 <site>
180                         <id>ecomp-site</id>
181                         <url>dav:https://nexus.onap.org/content/sites/site/org/onap/clamp/${project.version}</url>
182                 </site>
183         </distributionManagement>
184
185         <repositories>
186                 <repository>
187                         <id>onap-public</id>
188                         <name>onap-public</name>
189                         <url>https://nexus.onap.org/content/repositories/public/</url>
190                         <releases>
191                                 <enabled>true</enabled>
192                         </releases>
193                         <snapshots>
194                                 <enabled>false</enabled>
195                         </snapshots>
196                 </repository>
197                 <repository>
198                         <id>ecomp-releases</id>
199                         <name>ONAP Release Repository</name>
200                         <url>https://nexus.onap.org/content/repositories/releases/</url>
201                 </repository>
202                 <repository>
203                         <id>ecomp-staging</id>
204                         <name>ONAP Staging Repository</name>
205                         <url>https://nexus.onap.org/content/repositories/staging/</url>
206                 </repository>
207                 <repository>
208                         <id>ecomp-snapshots</id>
209                         <name>ONAP Snapshot Repository</name>
210                         <url>https://nexus.onap.org/content/repositories/snapshots/</url>
211                         <snapshots>
212                                 <enabled>true</enabled>
213                         </snapshots>
214                         <releases>
215                                 <enabled>false</enabled>
216                         </releases>
217                 </repository>
218                 <repository>
219                         <id>central</id>
220                         <url>http://repo1.maven.org/maven2/</url>
221                 </repository>
222         </repositories>
223         <pluginRepositories>
224                 <pluginRepository>
225                         <id>onap-public</id>
226                         <name>onap-public</name>
227                         <url>https://nexus.onap.org/content/repositories/public/</url>
228                         <releases>
229                                 <enabled>true</enabled>
230                         </releases>
231                         <snapshots>
232                                 <enabled>false</enabled>
233                         </snapshots>
234                 </pluginRepository>
235                 <pluginRepository>
236                         <id>central</id>
237                         <url>http://repo1.maven.org/maven2/</url>
238                 </pluginRepository>
239         </pluginRepositories>
240
241         <dependencyManagement>
242                 <dependencies>
243                         <!-- Spring Boot BOM -->
244                         <dependency>
245                                 <groupId>org.springframework.boot</groupId>
246                                 <artifactId>spring-boot-dependencies</artifactId>
247                                 <version>${springboot.version}</version>
248                                 <type>pom</type>
249                                 <scope>import</scope>
250                         </dependency>
251                         <!-- Camel BOM -->
252                         <dependency>
253                                 <groupId>org.apache.camel</groupId>
254                                 <artifactId>camel-spring-boot-dependencies</artifactId>
255                                 <version>${camel.version}</version>
256                                 <type>pom</type>
257                                 <scope>import</scope>
258                         </dependency>
259                 </dependencies>
260         </dependencyManagement>
261
262         <dependencies>
263                 <dependency>
264                         <groupId>org.apache.xmlgraphics</groupId>
265                         <artifactId>batik-svggen</artifactId>
266                         <version>1.11</version>
267                         <exclusions>
268                         <exclusion>
269                                 <groupId>xml-apis</groupId>
270                                 <artifactId>xml-apis</artifactId>
271                         </exclusion>
272                         </exclusions>
273                 </dependency>
274                 <dependency>
275                         <groupId>org.apache.xmlgraphics</groupId>
276                         <artifactId>batik-svg-dom</artifactId>
277                         <version>1.11</version>
278                         <exclusions>
279                                 <exclusion>
280                                         <groupId>xml-apis</groupId>
281                                         <artifactId>xml-apis</artifactId>
282                                 </exclusion>
283                         </exclusions>
284                 </dependency>
285                 <dependency>
286                         <groupId>org.apache.xmlgraphics</groupId>
287                         <artifactId>batik-transcoder</artifactId>
288                         <version>1.11</version>
289                         <exclusions>
290                                 <exclusion>
291                                         <groupId>xml-apis</groupId>
292                                         <artifactId>xml-apis</artifactId>
293                                 </exclusion>
294                         </exclusions>
295                 </dependency>
296                 <dependency>
297                         <groupId>com.att.eelf</groupId>
298                         <artifactId>eelf-core</artifactId>
299                         <version>${eelf.core.version}</version>
300                         <exclusions>
301                                 <exclusion>
302                                         <groupId>org.powermock</groupId>
303                                         <artifactId>powermock-module-junit4</artifactId>
304                                 </exclusion>
305                                 <exclusion>
306                                         <groupId>org.powermock</groupId>
307                                         <artifactId>powermock-api-mockito</artifactId>
308                                 </exclusion>
309                         </exclusions>
310                 </dependency>
311                 <dependency>
312                         <groupId>org.codehaus.janino</groupId>
313                         <artifactId>janino</artifactId>
314                         <version>3.0.8</version>
315                 </dependency>
316                 <dependency>
317                         <groupId>org.apache.tomcat.embed</groupId>
318                         <artifactId>tomcat-embed-core</artifactId>
319                         <version>${tomcat.version}</version>
320                 </dependency>
321                 <dependency>
322                         <groupId>org.apache.tomcat.embed</groupId>
323                         <artifactId>tomcat-embed-el</artifactId>
324                         <version>${tomcat.version}</version>
325                 </dependency>
326                 <dependency>
327                         <groupId>org.apache.tomcat.embed</groupId>
328                         <artifactId>tomcat-embed-websocket</artifactId>
329                         <version>${tomcat.version}</version>
330                 </dependency>
331                 <dependency>
332                         <groupId>org.apache.tomcat</groupId>
333                         <artifactId>tomcat-annotations-api</artifactId>
334                         <version>${tomcat.version}</version>
335                 </dependency>
336                 <!-- For CAMEL -->
337                 <dependency>
338                         <groupId>org.apache.camel</groupId>
339                         <artifactId>camel-http4-starter</artifactId>
340                 </dependency>
341                 <dependency>
342                         <groupId>org.apache.camel</groupId>
343                         <artifactId>camel-spring-boot-starter</artifactId>
344                 </dependency>
345                 <dependency>
346                         <groupId>org.apache.camel</groupId>
347                         <artifactId>camel-jaxb-starter</artifactId>
348                 </dependency>
349                 <dependency>
350                         <groupId>org.apache.camel</groupId>
351                         <artifactId>camel-servlet-starter</artifactId>
352                 </dependency>
353                 <dependency>
354                         <groupId>org.apache.camel</groupId>
355                         <artifactId>camel-gson-starter</artifactId>
356                 </dependency>
357                 <dependency>
358                         <groupId>org.apache.camel</groupId>
359                         <artifactId>camel-swagger-java-starter</artifactId>
360                         <exclusions>
361                                 <exclusion>
362                                         <groupId>javax.ws.rs</groupId>
363                                         <artifactId>jsr311-api</artifactId>
364                                 </exclusion>
365                                 <exclusion>
366                                         <groupId>org.slf4j</groupId>
367                                         <artifactId>slf4j-ext</artifactId>
368                                 </exclusion>
369                                 <exclusion>
370                                         <groupId>com.fasterxml.jackson.core</groupId>
371                                         <artifactId>jackson-databind</artifactId>
372                                 </exclusion>
373                         </exclusions>
374                 </dependency>
375                 <dependency>
376                         <groupId>javax.xml.bind</groupId>
377                         <artifactId>jaxb-api</artifactId>
378                         <version>2.3.0</version>
379                 </dependency>
380                 <dependency>
381                         <groupId>org.glassfish.jersey.core</groupId>
382                         <artifactId>jersey-common</artifactId>
383                         <version>2.27</version>
384                 </dependency>
385                 <!-- Spring famework -->
386                 <dependency>
387                         <groupId>org.springframework.boot</groupId>
388                         <artifactId>spring-boot-starter-web</artifactId>
389                         <exclusions>
390                                 <exclusion>
391                                         <groupId>org.springframework.boot</groupId>
392                                         <artifactId>spring-boot-starter-json</artifactId>
393                                 </exclusion>
394                         </exclusions>
395                 </dependency>
396                 <dependency>
397                         <groupId>org.springframework.boot</groupId>
398                         <artifactId>spring-boot-starter-tomcat</artifactId>
399                 </dependency>
400                 <dependency>
401                         <groupId>org.springframework</groupId>
402                         <artifactId>spring-jdbc</artifactId>
403                 </dependency>
404                 <dependency>
405                         <groupId>org.springframework.boot</groupId>
406                         <artifactId>spring-boot-starter-security</artifactId>
407                 </dependency>
408                 <dependency>
409                         <groupId>org.springframework.boot</groupId>
410                         <artifactId>spring-boot-autoconfigure</artifactId>
411                 </dependency>
412                 <dependency>
413                         <groupId>org.springframework.boot</groupId>
414                         <artifactId>spring-boot-starter-test</artifactId>
415                         <scope>test</scope>
416                         <exclusions>
417                                 <exclusion>
418                                         <groupId>com.vaadin.external.google</groupId>
419                                         <artifactId>android-json</artifactId>
420                                 </exclusion>
421                         </exclusions>
422                 </dependency>
423                 <dependency>
424                         <groupId>org.springframework.boot</groupId>
425                         <artifactId>spring-boot-starter-data-jpa</artifactId>
426                 </dependency>
427                 <!-- Others dependencies -->
428                 <dependency>
429                         <groupId>org.onap.aaf.authz</groupId>
430                         <artifactId>aaf-cadi-aaf</artifactId>
431                         <version>2.1.15</version>
432                         <exclusions>
433                                 <exclusion>
434                                         <groupId>javax.servlet</groupId>
435                                         <artifactId>servlet-api</artifactId>
436                                 </exclusion>
437                         </exclusions>
438                 </dependency>
439                 <dependency>
440                         <groupId>ch.qos.logback</groupId>
441                         <artifactId>logback-core</artifactId>
442                         <version>1.2.3</version>
443                 </dependency>
444                 <dependency>
445                         <groupId>ch.qos.logback</groupId>
446                         <artifactId>logback-classic</artifactId>
447                         <version>1.2.3</version>
448                 </dependency>
449                 <dependency>
450                         <groupId>commons-dbcp</groupId>
451                         <artifactId>commons-dbcp</artifactId>
452                         <version>1.4</version>
453                 </dependency>
454                 <dependency>
455                         <groupId>commons-io</groupId>
456                         <artifactId>commons-io</artifactId>
457                         <version>2.6</version>
458                 </dependency>
459                 <dependency>
460                         <groupId>com.googlecode.json-simple</groupId>
461                         <artifactId>json-simple</artifactId>
462                         <version>1.1.1</version>
463                 </dependency>
464                 <dependency>
465                         <groupId>org.apache.commons</groupId>
466                         <artifactId>commons-vfs2</artifactId>
467                         <version>2.2</version>
468                 </dependency>
469                 <dependency>
470                         <groupId>joda-time</groupId>
471                         <artifactId>joda-time</artifactId>
472                 </dependency>
473                 <dependency>
474                         <groupId>org.slf4j</groupId>
475                         <artifactId>slf4j-api</artifactId>
476                 </dependency>
477                 <dependency>
478                         <groupId>javax.ws.rs</groupId>
479                         <artifactId>javax.ws.rs-api</artifactId>
480                         <version>2.0</version>
481                 </dependency>
482                 <dependency>
483                         <groupId>junit</groupId>
484                         <artifactId>junit</artifactId>
485                 </dependency>
486                 <dependency>
487                         <groupId>javax.transaction</groupId>
488                         <artifactId>jta</artifactId>
489                         <version>1.1</version>
490                 </dependency>
491                 <dependency>
492                         <groupId>javax.persistence</groupId>
493                         <artifactId>persistence-api</artifactId>
494                         <version>1.0.2</version>
495                 </dependency>
496                 <dependency>
497                         <groupId>org.apache.commons</groupId>
498                         <artifactId>commons-csv</artifactId>
499                         <version>1.3</version>
500                 </dependency>
501                 <!-- Other dependencies to fix nexus IQ reported vulnerabilities -->
502                 <dependency>
503                         <groupId>org.codehaus.plexus</groupId>
504                         <artifactId>plexus-utils</artifactId>
505                         <version>3.0.24</version>
506                 </dependency>
507                 <dependency>
508                         <groupId>org.jboss.spec.javax.ws.rs</groupId>
509                         <artifactId>jboss-jaxrs-api_2.0_spec</artifactId>
510                         <version>1.0.1.Final</version>
511                 </dependency>
512                 <dependency>
513                         <groupId>com.google.guava</groupId>
514                         <artifactId>guava</artifactId>
515                         <version>27.0-jre</version>
516                 </dependency>
517                 <dependency>
518                         <groupId>commons-codec</groupId>
519                         <artifactId>commons-codec</artifactId>
520                         <version>1.13</version>
521                 </dependency>
522                 <!-- Remove the MYSQL connector and replace it by Mariadb -->
523                 <dependency>
524                         <groupId>org.mariadb.jdbc</groupId>
525                         <artifactId>mariadb-java-client</artifactId>
526                         <version>2.2.1</version>
527                 </dependency>
528                 <!-- For SDC Controller -->
529                 <dependency>
530                         <groupId>org.onap.sdc.sdc-distribution-client</groupId>
531                         <artifactId>sdc-distribution-client</artifactId>
532                         <version>1.3.0</version>
533                 </dependency>
534                 <dependency>
535                         <groupId>org.onap.sdc.sdc-tosca</groupId>
536                         <artifactId>sdc-tosca</artifactId>
537                         <version>1.5.1</version>
538                 </dependency>
539                 <!-- TESTING -->
540                 <dependency>
541                         <groupId>org.assertj</groupId>
542                         <artifactId>assertj-core</artifactId>
543                         <version>3.10.0</version>
544                         <scope>test</scope>
545                 </dependency>
546                 <dependency>
547                         <groupId>org.mockito</groupId>
548                         <artifactId>mockito-core</artifactId>
549                         <version>2.28.2</version>
550                         <scope>test</scope>
551                 </dependency>
552                 <dependency>
553                         <groupId>org.powermock</groupId>
554                         <artifactId>powermock-api-mockito2</artifactId>
555                         <version>2.0.4</version>
556                         <scope>test</scope>
557                 </dependency>
558                 <dependency>
559                         <groupId>org.powermock</groupId>
560                         <artifactId>powermock-module-junit4</artifactId>
561                         <version>2.0.4</version>
562                         <scope>test</scope>
563                 </dependency>
564         </dependencies>
565
566         <build>
567                 <finalName>clamp</finalName>
568
569                 <testResources>
570                         <testResource>
571                                 <directory>src/test/resources</directory>
572                                 <excludes>
573                                         <exclude>**/*.jks</exclude>
574                                         <exclude>**/*.csar</exclude>
575                                 </excludes>
576                                 <filtering>true</filtering>
577                         </testResource>
578                         <testResource>
579                                 <directory>src/test/resources/https</directory>
580                                 <includes>
581                                         <include>**.jks</include>
582                                 </includes>
583                                 <filtering>false</filtering>
584                                 <targetPath>https</targetPath>
585                         </testResource>
586                         <testResource>
587                                 <directory>src/test/resources/example/sdc</directory>
588                                 <includes>
589                                         <include>**.csar</include>
590                                 </includes>
591                                 <filtering>false</filtering>
592                                 <targetPath>example/sdc</targetPath>
593                         </testResource>
594                 </testResources>
595                 <resources>
596                         <!-- For AAF folder maven should not try to filter Keystores/Truststores ... Otherwise 
597                                 they will be broken and unreadable -->
598                         <resource>
599                                 <directory>src/main/resources</directory>
600                                 <filtering>true</filtering>
601                                 <excludes>
602                                         <exclude>clds/aaf/**</exclude>
603                                 </excludes>
604                         </resource>
605                         <resource>
606                                 <directory>src/main/resources</directory>
607                                 <filtering>false</filtering>
608                                 <includes>
609                                         <include>clds/aaf/**</include>
610                                 </includes>
611                         </resource>
612                         <resource>
613                                 <directory>${ui.react.src}</directory>
614                                 <includes>
615                                         <include>src/**</include>
616                                         <include>public/**</include>
617                                         <include>package.json</include>
618                                         <include>package-lock.json</include>
619                                 </includes>
620                                 <filtering>true</filtering>
621                                 <targetPath>${project.build.directory}/${ui.react.src}</targetPath>
622                         </resource>
623                 </resources>
624
625                 <plugins>
626                         <plugin>
627                                         <groupId>de.jpdigital</groupId>
628                                         <artifactId>hibernate52-ddl-maven-plugin</artifactId>
629                                         <version>2.2.0</version>
630                                 <dependencies>
631                                         <dependency>
632                                                 <groupId>javax.xml.bind</groupId>
633                                                 <artifactId>jaxb-api</artifactId>
634                                                 <version>2.3.0</version>
635                                         </dependency>
636                                 </dependencies>
637                                 <executions>
638                                         <execution>
639                                                 <phase>process-classes</phase>
640                                                 <goals>
641                                                         <goal>gen-ddl</goal>
642                                                 </goals>
643                                                 <configuration>
644                                                         <packages>
645                                                                 <param>org.onap.clamp</param>
646                                                         </packages>
647                                                         <dialects>
648                                                                 <param>MARIADB53</param>
649                                                         </dialects>
650                                                         <outputDirectory>${project.basedir}/extra/sql/bulkload/</outputDirectory>
651                                                         <outputFileNameSuffix>create-tables</outputFileNameSuffix>
652                                                         <!-- <createDropStatements>true</createDropStatements> -->
653                                                         <omitDialectFromFileName>true</omitDialectFromFileName>
654                                                 </configuration>
655                                         </execution>
656                                 </executions>
657
658                         </plugin>
659                         <!-- Read the swagger.json file and the definition from SwaggerConfig.java; generate 
660                                 a list of .adoc files containing the APIs info in more structured way -->
661                         <plugin>
662                                 <groupId>io.github.swagger2markup</groupId>
663                                 <artifactId>swagger2markup-maven-plugin</artifactId>
664                                 <version>1.3.3</version>
665                                 <dependencies>
666                                         <dependency>
667                                                 <groupId>io.github.swagger2markup</groupId>
668                                                 <artifactId>swagger2markup-import-files-ext</artifactId>
669                                                 <version>1.3.3</version>
670                                         </dependency>
671                                         <dependency>
672                                                 <groupId>io.github.swagger2markup</groupId>
673                                                 <artifactId>swagger2markup-spring-restdocs-ext</artifactId>
674                                                 <version>1.3.3</version>
675                                         </dependency>
676                                 </dependencies>
677                                 <configuration>
678                                         <swaggerInput>${project.basedir}/docs/swagger/swagger.json</swaggerInput>
679                                         <outputDir>${project.build.directory}/asciidoc/generated</outputDir>
680                                         <config>
681                                                 <swagger2markup.markupLanguage>ASCIIDOC</swagger2markup.markupLanguage>
682                                         </config>
683                                 </configuration>
684                                 <executions>
685                                         <execution>
686                                                 <phase>post-integration-test</phase>
687                                                 <goals>
688                                                         <goal>convertSwagger2markup</goal>
689                                                 </goals>
690                                         </execution>
691                                 </executions>
692                         </plugin>
693
694                         <!-- Run the generated asciidoc through Asciidoctor to generate other documentation 
695                                 types, such as PDFs or HTML5 -->
696                         <plugin>
697                                 <groupId>org.asciidoctor</groupId>
698                                 <artifactId>asciidoctor-maven-plugin</artifactId>
699                                 <version>1.5.7.1</version>
700                                 <dependencies>
701                                         <dependency>
702                                                 <groupId>org.asciidoctor</groupId>
703                                                 <artifactId>asciidoctorj-pdf</artifactId>
704                                                 <version>1.5.0-alpha.10.1</version>
705                                         </dependency>
706                                 </dependencies>
707                                 <configuration>
708                                         <sourceDirectory>${project.basedir}/src/main/resources/asciidoc</sourceDirectory>
709                                         <sourceDocumentName>swagger.adoc</sourceDocumentName>
710                                         <attributes>
711                                                 <doctype>book</doctype>
712                                                 <toc>left</toc>
713                                                 <toclevels>3</toclevels>
714                                                 <numbered />
715                                                 <hardbreaks />
716                                                 <sectlinks />
717                                                 <sectanchors />
718                                                 <generated>${project.build.directory}/asciidoc/generated</generated>
719                                         </attributes>
720                                 </configuration>
721
722                                 <executions>
723                                         <execution>
724                                                 <id>output-html</id>
725                                                 <phase>post-integration-test</phase>
726                                                 <goals>
727                                                         <goal>process-asciidoc</goal>
728                                                 </goals>
729                                                 <configuration>
730                                                         <backend>html5</backend>
731                                                         <outputDirectory>${project.basedir}/docs/swagger</outputDirectory>
732                                                         <outputDirectory>${project.basedir}/src/main/resources/META-INF/resources/</outputDirectory>
733                                                 </configuration>
734                                         </execution>
735                                         <execution>
736                                                 <id>output-pdf</id>
737                                                 <phase>post-integration-test</phase>
738                                                 <goals>
739                                                         <goal>process-asciidoc</goal>
740                                                 </goals>
741                                                 <configuration>
742                                                         <backend>pdf</backend>
743                                                         <outputDirectory>${project.basedir}/docs/swagger</outputDirectory>
744                                                 </configuration>
745                                         </execution>
746                                 </executions>
747                         </plugin>
748                         <plugin>
749                                 <groupId>org.codehaus.groovy.maven</groupId>
750                                 <artifactId>gmaven-plugin</artifactId>
751                                 <version>1.0</version>
752                                 <executions>
753                                         <execution>
754                                                 <phase>validate</phase>
755                                                 <goals>
756                                                         <goal>execute</goal>
757                                                 </goals>
758                                                 <configuration>
759                                                         <source>${project.basedir}/src/main/script/TagVersion.groovy</source>
760                                                 </configuration>
761                                         </execution>
762                                 </executions>
763                         </plugin>
764                         <plugin>
765                                 <groupId>org.codehaus.groovy.maven</groupId>
766                                 <artifactId>gmaven-plugin</artifactId>
767                                 <version>1.0</version>
768                                 <executions>
769                                         <execution>
770                                                 <phase>validate</phase>
771                                                 <goals>
772                                                         <goal>execute</goal>
773                                                 </goals>
774                                                 <configuration>
775                                                         <source>${project.basedir}/src/main/script/SelectNpmRepo.groovy</source>
776                                                 </configuration>
777                                         </execution>
778                                 </executions>
779                         </plugin>
780                         <plugin>
781                                 <groupId>org.apache.maven.plugins</groupId>
782                                 <artifactId>maven-jar-plugin</artifactId>
783                                 <version>3.0.2</version>
784                                 <executions>
785                                         <execution>
786                                                 <id>jar-with-only-classes</id>
787                                                 <phase>package</phase>
788                                                 <goals>
789                                                         <goal>jar</goal>
790                                                 </goals>
791                                                 <configuration>
792                                                         <classifier>classes</classifier>
793                                                         <includes>
794                                                                 <include>org/**</include>
795                                                         </includes>
796                                                 </configuration>
797                                         </execution>
798                                 </executions>
799                         </plugin>
800                         <plugin>
801                                 <groupId>org.codehaus.mojo</groupId>
802                                 <artifactId>build-helper-maven-plugin</artifactId>
803                                 <version>3.0.0</version>
804                                 <executions>
805                                         <execution>
806                                                 <goals>
807                                                         <goal>attach-artifact</goal>
808                                                 </goals>
809                                                 <phase>package</phase>
810                                                 <configuration>
811                                                         <artifacts>
812                                                                 <artifact>
813                                                                         <file>${project.build.directory}/clamp-classes.jar</file>
814                                                                         <type>jar</type>
815                                                                         <classifier>classes</classifier>
816                                                                 </artifact>
817                                                         </artifacts>
818                                                 </configuration>
819                                         </execution>
820                                         <execution>
821                                                 <id>reserve-port-for-tests</id>
822                                                 <phase>process-resources</phase>
823                                                 <goals>
824                                                         <goal>reserve-network-port</goal>
825                                                 </goals>
826                                                 <configuration>
827                                                         <portNames>
828                                                                 <portName>docker.mariadb.port.host</portName>
829                                                                 <portName>docker.http-cache.port.host</portName>
830                                                                 <portName>clamp.it.tests.http-redirected</portName>
831                                                                 <portName>clamp.it.tests.https</portName>
832                                                                 <portName>clamp.it.tests.http</portName>
833                                                         </portNames>
834                                                 </configuration>
835                                         </execution>
836                                 </executions>
837                         </plugin>
838
839                         <plugin>
840                                 <groupId>org.springframework.boot</groupId>
841                                 <artifactId>spring-boot-maven-plugin</artifactId>
842                                 <!-- Temporary fix -->
843                                 <version>1.5.13.RELEASE</version>
844                                 <!-- <version>${springboot.version}</version> -->
845                                 <executions>
846                                         <execution>
847                                                 <goals>
848                                                         <goal>repackage</goal>
849                                                 </goals>
850                                                 <phase>package</phase>
851                                         </execution>
852                                 </executions>
853                         </plugin>
854                         <plugin>
855                                 <groupId>org.apache.maven.plugins</groupId>
856                                 <artifactId>maven-surefire-plugin</artifactId>
857                                 <version>2.22.2</version>
858                                 <configuration>
859                                         <forkCount>1C</forkCount>
860                                         <reuseForks>true</reuseForks>
861                                         <useSystemClassLoader>false</useSystemClassLoader>
862                                         <argLine>${surefireArgLine}</argLine>
863                                 </configuration>
864                         </plugin>
865
866                         <plugin>
867                                 <groupId>org.apache.maven.plugins</groupId>
868                                 <artifactId>maven-failsafe-plugin</artifactId>
869                                 <version>2.22.2</version>
870                                 <executions>
871                                         <execution>
872                                                 <id>integration-tests</id>
873                                                 <goals>
874                                                         <goal>integration-test</goal>
875                                                         <goal>verify</goal>
876                                                 </goals>
877                                                 <configuration>
878                                                         <additionalClasspathElements>
879                                                                 <additionalClasspathElement>${project.build.directory}/classes</additionalClasspathElement>
880                                                         </additionalClasspathElements>
881                                                         <includes>
882                                                                 <include>**/*ItCase.java</include>
883                                                         </includes>
884                                                         <forkCount>1C</forkCount>
885                                                         <reuseForks>true</reuseForks>
886                                                         <useSystemClassLoader>false</useSystemClassLoader>
887                                                         <argLine>${failsafeArgLine}</argLine>
888                                                 </configuration>
889                                         </execution>
890                                 </executions>
891                         </plugin>
892                         <plugin>
893                                 <groupId>io.fabric8</groupId>
894                                 <artifactId>docker-maven-plugin</artifactId>
895                                 <version>0.31.0</version>
896                                 <dependencies>
897                                         <dependency>
898                                                 <groupId>org.apache.httpcomponents</groupId>
899                                                 <artifactId>httpclient</artifactId>
900                                                 <version>4.5.5</version>
901                                         </dependency>
902                                 </dependencies>
903                                 <configuration>
904                                         <verbose>true</verbose>
905                                         <apiVersion>1.35</apiVersion>
906                                         <images>
907                                                 <image>
908                                                         <name>library/mariadb:10.3.12</name>
909                                                         <alias>mariadb</alias>
910                                                         <run>
911                                                                 <env>
912                                                                         <MYSQL_ROOT_PASSWORD>strong_pitchou</MYSQL_ROOT_PASSWORD>
913                                                                 </env>
914                                                                 <hostname>mariadb</hostname>
915                                                                 <volumes>
916                                                                         <bind>
917                                                                                 <volume>${project.basedir}/extra/sql/:/docker-entrypoint-initdb.d:rw</volume>
918                                                                                 <volume>${project.basedir}/extra/docker/mariadb/conf1:/etc/mysql/conf.d</volume>
919                                                                         </bind>
920                                                                 </volumes>
921                                                                 <wait>
922                                                                         <log>socket: '/var/run/mysqld/mysqld.sock'  port: 3306  mariadb.org binary distribution</log>
923                                                                         <time>600000</time>
924                                                                         <exec>
925                                                                                 <preStop>/docker-entrypoint-initdb.d/dump/backup-data-only.sh</preStop>
926                                                                         </exec>
927                                                                 </wait>
928                                                                 <ports>
929                                                                         <port>${docker.mariadb.port.host}:3306</port>
930                                                                 </ports>
931                                                                 <network>
932                                                                         <mode>bridge</mode>
933                                                                 </network>
934                                                         </run>
935                                                 </image>
936                                                 <image>
937                                                         <name>library/python:2-slim</name>
938                                                         <alias>python</alias>
939                                                         <run>
940                                                                 <hostname>python</hostname>
941                                                                 <volumes>
942                                                                         <bind>
943                                                                                 <volume>${project.basedir}/src/test/resources/http-cache/:/usr/src/http-cache-app</volume>
944                                                                                 <volume>${project.basedir}/src/test/resources/http-cache/example/:/usr/src/http-cache-app/data-cache</volume>
945                                                                         </bind>
946                                                                 </volumes>
947                                                                 <wait>
948                                                                         <tcp>
949                                                                                 <ports>
950                                                                                         <port>8080</port>
951                                                                                 </ports>
952                                                                                 <mode>direct</mode>
953                                                                         </tcp>
954                                                                         <time>120000</time>
955                                                                 </wait>
956                                                                 <ports>
957                                                                         <port>${docker.http-cache.port.host}:8080</port>
958                                                                 </ports>
959                                                                 <workingDir>/usr/src/http-cache-app</workingDir>
960                                                                 <cmd>
961                                                                         <shell>./start_http_cache.sh ${python.http.proxy.param}
962                                                                                 --python_proxyaddress=localhost:${docker.http-cache.port.host}</shell>
963                                                                 </cmd>
964                                                                 <network>
965                                                                         <mode>bridge</mode>
966                                                                 </network>
967                                                         </run>
968                                                 </image>
969                                                 <image>
970                                                         <name>onap/clamp-backend</name>
971                                                         <alias>onap-clamp-backend</alias>
972                                                         <run>
973                                                                 <skip>true</skip>
974                                                         </run>
975                                                         <build>
976                                                                 <cleanup>true</cleanup>
977                                                                 <tags>
978                                                                         <tag>latest</tag>
979                                                                         <tag>${project.docker.latesttagtimestamp.version}</tag>
980                                                                         <tag>${project.docker.latesttag.version}</tag>
981                                                                 </tags>
982                                                                 <!-- A relative path is looked up in ${project.basedir}/src/main/docker by 
983                                                                         default -->
984                                                                 <dockerFile>backend/Dockerfile</dockerFile>
985                                                                 <assembly>
986                                                                         <descriptor>backend/backend-files.xml</descriptor>
987                                                                         <name>onap-clamp-backend</name>
988                                                                 </assembly>
989                                                         </build>
990                                                 </image>
991                                                 <image>
992                                                         <name>onap/clamp-frontend</name>
993                                                         <alias>onap-clamp-frontend</alias>
994                                                         <run>
995                                                                 <skip>true</skip>
996                                                         </run>
997                                                         <build>
998                                                                 <cleanup>true</cleanup>
999                                                                 <tags>
1000                                                                         <tag>latest</tag>
1001                                                                         <tag>${project.docker.latesttagtimestamp.version}</tag>
1002                                                                         <tag>${project.docker.latesttag.version}</tag>
1003                                                                 </tags>
1004                                                                 <!-- A relative path is looked up in ${project.basedir}/src/main/docker by 
1005                                                                         default -->
1006                                                                 <dockerFile>frontend/Dockerfile</dockerFile>
1007                                                                 <assembly>
1008                                                                         <descriptor>frontend/frontend-files.xml</descriptor>
1009                                                                         <name>onap-clamp-frontend</name>
1010                                                                 </assembly>
1011                                                         </build>
1012                                                 </image>
1013                                                 <image>
1014                                                         <name>onap/clamp-dashboard-logstash</name>
1015                                                         <alias>onap-clamp-dashboard-logstash</alias>
1016                                                         <run>
1017                                                                 <skip>true</skip>
1018                                                         </run>
1019                                                         <build>
1020                                                                 <cleanup>true</cleanup>
1021                                                                 <tags>
1022                                                                         <tag>latest</tag>
1023                                                                         <tag>${project.docker.latesttagtimestamp.version}</tag>
1024                                                                         <tag>${project.docker.latesttag.version}</tag>
1025                                                                 </tags>
1026                                                                 <dockerFile>logstash/Dockerfile</dockerFile>
1027                                                         </build>
1028                                                 </image>
1029                                                 <image>
1030                                                         <name>onap/clamp-dashboard-kibana</name>
1031                                                         <alias>onap-clamp-dashboard-kibana</alias>
1032                                                         <run>
1033                                                                 <skip>true</skip>
1034                                                         </run>
1035                                                         <build>
1036                                                                 <cleanup>true</cleanup>
1037                                                                 <tags>
1038                                                                         <tag>latest</tag>
1039                                                                         <tag>${project.docker.latesttagtimestamp.version}</tag>
1040                                                                         <tag>${project.docker.latesttag.version}</tag>
1041                                                                 </tags>
1042                                                                 <dockerFile>kibana/Dockerfile</dockerFile>
1043                                                         </build>
1044                                                 </image>
1045                                         </images>
1046                                 </configuration>
1047
1048                                 <executions>
1049                                         <execution>
1050                                                 <id>generate-images</id>
1051                                                 <phase>install</phase>
1052                                                 <goals>
1053                                                         <goal>build</goal>
1054                                                 </goals>
1055                                         </execution>
1056                                         <execution>
1057                                                 <id>push-images</id>
1058                                                 <phase>deploy</phase>
1059                                                 <goals>
1060                                                         <goal>push</goal>
1061                                                 </goals>
1062                                         </execution>
1063                                         <execution>
1064                                                 <id>docker-start-for-it</id>
1065                                                 <phase>pre-integration-test</phase>
1066                                                 <goals>
1067                                                         <goal>start</goal>
1068                                                 </goals>
1069                                         </execution>
1070                                         <execution>
1071                                                 <id>docker-stop-for-it</id>
1072                                                 <phase>post-integration-test</phase>
1073                                                 <goals>
1074                                                         <goal>stop</goal>
1075                                                 </goals>
1076                                         </execution>
1077                                 </executions>
1078                         </plugin>
1079
1080                         <plugin>
1081                                 <groupId>org.jacoco</groupId>
1082                                 <artifactId>jacoco-maven-plugin</artifactId>
1083                                 <version>0.8.5</version>
1084                                 <configuration>
1085                                         <dumpOnExit>true</dumpOnExit>
1086                                         <append>true</append>
1087                                         <includes>
1088                                                 <include>org/onap/clamp/**</include>
1089                                         </includes>
1090                                 </configuration>
1091                                 <executions>
1092                                         <execution>
1093                                                 <id>pre-unit-test</id>
1094                                                 <goals>
1095                                                         <goal>prepare-agent</goal>
1096                                                 </goals>
1097                                                 <configuration>
1098                                                         <destFile>${project.build.directory}/coverage-reports/jacoco.exec</destFile>
1099                                                         <propertyName>surefireArgLine</propertyName>
1100                                                         <!-- <append>true</append> -->
1101                                                 </configuration>
1102                                         </execution>
1103                                         <execution>
1104                                                 <id>pre-integration-test</id>
1105                                                 <phase>pre-integration-test</phase>
1106                                                 <goals>
1107                                                         <goal>prepare-agent</goal>
1108                                                 </goals>
1109                                                 <configuration>
1110                                                         <destFile>${project.build.directory}/coverage-reports/jacoco-it.exec</destFile>
1111                                                         <propertyName>failsafeArgLine</propertyName>
1112                                                         <!-- <append>true</append> -->
1113                                                 </configuration>
1114                                         </execution>
1115                                         <execution>
1116                                                 <goals>
1117                                                         <goal>merge</goal>
1118                                                 </goals>
1119                                                 <phase>post-integration-test</phase>
1120                                                 <configuration>
1121                                                         <fileSets>
1122                                                                 <fileSet
1123                                                                         implementation="org.apache.maven.shared.model.fileset.FileSet">
1124                                                                         <directory>${project.build.directory}/coverage-reports</directory>
1125                                                                         <includes>
1126                                                                                 <include>*.exec</include>
1127                                                                         </includes>
1128                                                                 </fileSet>
1129                                                         </fileSets>
1130                                                         <destFile>${project.build.directory}/jacoco.exec</destFile>
1131                                                 </configuration>
1132                                         </execution>
1133                                         <execution>
1134                                                 <id>report-xml</id>
1135                                                 <goals>
1136                                                         <goal>report</goal>
1137                                                 </goals>
1138                                                 <configuration>
1139                                                         <!-- Setting explicit path, so that we remember where it picks them up from -->
1140                                                         <dataFile>${project.build.directory}/jacoco.exec</dataFile>
1141                                                         <outputDirectory>${project.build.directory}/jacoco-html-xml-reports</outputDirectory>
1142                                                 </configuration>
1143                                         </execution>
1144                                 </executions>
1145                         </plugin>
1146
1147                         <!-- This plugin will be useful when we will have multi-modules project -->
1148                         <plugin>
1149                                 <groupId>org.codehaus.mojo</groupId>
1150                                 <artifactId>versions-maven-plugin</artifactId>
1151                                 <version>1.3.1</version>
1152                         </plugin>
1153
1154                         <plugin>
1155                                 <groupId>com.github.eirslett</groupId>
1156                                 <artifactId>frontend-maven-plugin</artifactId>
1157                                 <version>1.8.0</version>
1158                                 <configuration>
1159                                         <installDirectory>${project.build.directory}/${ui.react.src}</installDirectory>
1160                                         <workingDirectory>${project.build.directory}/${ui.react.src}</workingDirectory>
1161                                 </configuration>
1162                                 <executions>
1163                                         <execution>
1164                                                 <id>install_node_and_npm</id>
1165                                                 <goals>
1166                                                         <goal>install-node-and-npm</goal>
1167                                                 </goals>
1168                                                 <phase>generate-sources</phase>
1169                                                 <configuration>
1170                                                 <nodeVersion>v12.13.0</nodeVersion>
1171                                                 <npmVersion>6.13.0</npmVersion>
1172                                                 </configuration>
1173                                         </execution>
1174                                         <execution>
1175                                                 <id>npm_install</id>
1176                                                 <goals>
1177                                                         <goal>npm</goal>
1178                                                 </goals>
1179                                                 <phase>compile</phase>
1180                                                 <configuration>
1181                                                         <arguments>install</arguments>
1182                                                 </configuration>
1183                                         </execution>
1184                                         <execution>
1185                                                 <id>npm_test</id>
1186                                                 <goals>
1187                                                         <goal>npm</goal>
1188                                                 </goals>
1189                                                 <phase>test</phase>
1190                                                 <configuration>
1191                                                         <arguments>run-script test:coverage</arguments>
1192                                                 </configuration>
1193                                         </execution>
1194                                         <execution>
1195                                                 <id>npm_publish</id>
1196                                                 <goals>
1197                                                         <goal>npm</goal>
1198                                                 </goals>
1199                                                 <phase>deploy</phase>
1200                                                 <configuration>
1201                                                         <arguments>publish</arguments>
1202                                                 </configuration>
1203                                         </execution>
1204                                 </executions>
1205                         </plugin>
1206                         <plugin>
1207                                 <groupId>org.apache.maven.plugins</groupId>
1208                                 <artifactId>maven-compiler-plugin</artifactId>
1209                                 <version>3.8.1</version>
1210                                 <configuration>
1211                                         <source>11</source>
1212                                         <target>11</target>
1213                                 </configuration>
1214                         </plugin>
1215                         <plugin>
1216                                 <groupId>org.sonarsource.scanner.maven</groupId>
1217                                 <artifactId>sonar-maven-plugin</artifactId>
1218                                 <version>3.7.0.1746</version>
1219                         </plugin>
1220                 </plugins>
1221         </build>
1222 </project>