Fix JS coverage
[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                 </dependency>
279                 <dependency>
280                         <groupId>org.apache.xmlgraphics</groupId>
281                         <artifactId>batik-transcoder</artifactId>
282                         <version>1.11</version>
283                 </dependency>
284                 <dependency>
285                         <groupId>com.att.eelf</groupId>
286                         <artifactId>eelf-core</artifactId>
287                         <version>${eelf.core.version}</version>
288                         <exclusions>
289                                 <exclusion>
290                                         <groupId>org.powermock</groupId>
291                                         <artifactId>powermock-module-junit4</artifactId>
292                                 </exclusion>
293                                 <exclusion>
294                                         <groupId>org.powermock</groupId>
295                                         <artifactId>powermock-api-mockito</artifactId>
296                                 </exclusion>
297                         </exclusions>
298                 </dependency>
299                 <dependency>
300                         <groupId>org.codehaus.janino</groupId>
301                         <artifactId>janino</artifactId>
302                         <version>3.0.8</version>
303                 </dependency>
304                 <dependency>
305                         <groupId>org.apache.tomcat.embed</groupId>
306                         <artifactId>tomcat-embed-core</artifactId>
307                         <version>${tomcat.version}</version>
308                 </dependency>
309                 <dependency>
310                         <groupId>org.apache.tomcat.embed</groupId>
311                         <artifactId>tomcat-embed-el</artifactId>
312                         <version>${tomcat.version}</version>
313                 </dependency>
314                 <dependency>
315                         <groupId>org.apache.tomcat.embed</groupId>
316                         <artifactId>tomcat-embed-websocket</artifactId>
317                         <version>${tomcat.version}</version>
318                 </dependency>
319                 <dependency>
320                         <groupId>org.apache.tomcat</groupId>
321                         <artifactId>tomcat-annotations-api</artifactId>
322                         <version>${tomcat.version}</version>
323                 </dependency>
324                 <!-- For CAMEL -->
325                 <dependency>
326                         <groupId>org.apache.camel</groupId>
327                         <artifactId>camel-http4-starter</artifactId>
328                 </dependency>
329                 <dependency>
330                         <groupId>org.apache.camel</groupId>
331                         <artifactId>camel-spring-boot-starter</artifactId>
332                 </dependency>
333                 <dependency>
334                         <groupId>org.apache.camel</groupId>
335                         <artifactId>camel-jaxb-starter</artifactId>
336                 </dependency>
337                 <dependency>
338                         <groupId>org.apache.camel</groupId>
339                         <artifactId>camel-servlet-starter</artifactId>
340                 </dependency>
341                 <dependency>
342                         <groupId>org.apache.camel</groupId>
343                         <artifactId>camel-gson-starter</artifactId>
344                 </dependency>
345                 <dependency>
346                         <groupId>org.apache.camel</groupId>
347                         <artifactId>camel-swagger-java-starter</artifactId>
348                         <exclusions>
349                                 <exclusion>
350                                         <groupId>javax.ws.rs</groupId>
351                                         <artifactId>jsr311-api</artifactId>
352                                 </exclusion>
353                                 <exclusion>
354                                         <groupId>org.slf4j</groupId>
355                                         <artifactId>slf4j-ext</artifactId>
356                                 </exclusion>
357                                 <exclusion>
358                                         <groupId>com.fasterxml.jackson.core</groupId>
359                                         <artifactId>jackson-databind</artifactId>
360                                 </exclusion>
361                         </exclusions>
362                 </dependency>
363                 <dependency>
364                         <groupId>javax.xml.bind</groupId>
365                         <artifactId>jaxb-api</artifactId>
366                         <version>2.3.0</version>
367                 </dependency>
368                 <dependency>
369                         <groupId>org.glassfish.jersey.core</groupId>
370                         <artifactId>jersey-common</artifactId>
371                         <version>2.27</version>
372                 </dependency>
373                 <!-- Spring famework -->
374                 <dependency>
375                         <groupId>org.springframework.boot</groupId>
376                         <artifactId>spring-boot-starter-web</artifactId>
377                         <exclusions>
378                                 <exclusion>
379                                         <groupId>org.springframework.boot</groupId>
380                                         <artifactId>spring-boot-starter-json</artifactId>
381                                 </exclusion>
382                         </exclusions>
383                 </dependency>
384                 <dependency>
385                         <groupId>org.springframework.boot</groupId>
386                         <artifactId>spring-boot-starter-tomcat</artifactId>
387                 </dependency>
388                 <dependency>
389                         <groupId>org.springframework</groupId>
390                         <artifactId>spring-jdbc</artifactId>
391                 </dependency>
392                 <dependency>
393                         <groupId>org.springframework.boot</groupId>
394                         <artifactId>spring-boot-starter-security</artifactId>
395                 </dependency>
396                 <dependency>
397                         <groupId>org.springframework.boot</groupId>
398                         <artifactId>spring-boot-autoconfigure</artifactId>
399                 </dependency>
400                 <dependency>
401                         <groupId>org.springframework.boot</groupId>
402                         <artifactId>spring-boot-starter-test</artifactId>
403                         <scope>test</scope>
404                         <exclusions>
405                                 <exclusion>
406                                         <groupId>com.vaadin.external.google</groupId>
407                                         <artifactId>android-json</artifactId>
408                                 </exclusion>
409                         </exclusions>
410                 </dependency>
411                 <dependency>
412                         <groupId>org.springframework.boot</groupId>
413                         <artifactId>spring-boot-starter-data-jpa</artifactId>
414                 </dependency>
415                 <!-- Others dependencies -->
416                 <dependency>
417                         <groupId>org.onap.aaf.authz</groupId>
418                         <artifactId>aaf-cadi-aaf</artifactId>
419                         <version>2.1.15</version>
420                         <exclusions>
421                                 <exclusion>
422                                         <groupId>javax.servlet</groupId>
423                                         <artifactId>servlet-api</artifactId>
424                                 </exclusion>
425                         </exclusions>
426                 </dependency>
427                 <dependency>
428                         <groupId>ch.qos.logback</groupId>
429                         <artifactId>logback-core</artifactId>
430                         <version>1.2.3</version>
431                 </dependency>
432                 <dependency>
433                         <groupId>ch.qos.logback</groupId>
434                         <artifactId>logback-classic</artifactId>
435                         <version>1.2.3</version>
436                 </dependency>
437                 <dependency>
438                         <groupId>commons-dbcp</groupId>
439                         <artifactId>commons-dbcp</artifactId>
440                         <version>1.4</version>
441                 </dependency>
442                 <dependency>
443                         <groupId>commons-io</groupId>
444                         <artifactId>commons-io</artifactId>
445                         <version>2.6</version>
446                 </dependency>
447                 <dependency>
448                         <groupId>com.googlecode.json-simple</groupId>
449                         <artifactId>json-simple</artifactId>
450                         <version>1.1.1</version>
451                 </dependency>
452                 <dependency>
453                         <groupId>org.apache.commons</groupId>
454                         <artifactId>commons-vfs2</artifactId>
455                         <version>2.2</version>
456                 </dependency>
457                 <dependency>
458                         <groupId>joda-time</groupId>
459                         <artifactId>joda-time</artifactId>
460                 </dependency>
461                 <dependency>
462                         <groupId>org.slf4j</groupId>
463                         <artifactId>slf4j-api</artifactId>
464                 </dependency>
465                 <dependency>
466                         <groupId>javax.ws.rs</groupId>
467                         <artifactId>javax.ws.rs-api</artifactId>
468                         <version>2.0</version>
469                 </dependency>
470                 <dependency>
471                         <groupId>junit</groupId>
472                         <artifactId>junit</artifactId>
473                 </dependency>
474                 <dependency>
475                         <groupId>javax.transaction</groupId>
476                         <artifactId>jta</artifactId>
477                         <version>1.1</version>
478                 </dependency>
479                 <dependency>
480                         <groupId>javax.persistence</groupId>
481                         <artifactId>persistence-api</artifactId>
482                         <version>1.0.2</version>
483                 </dependency>
484                 <dependency>
485                         <groupId>org.apache.commons</groupId>
486                         <artifactId>commons-csv</artifactId>
487                         <version>1.3</version>
488                 </dependency>
489                 <!-- Other dependencies to fix nexus IQ reported vulnerabilities -->
490                 <dependency>
491                         <groupId>org.codehaus.plexus</groupId>
492                         <artifactId>plexus-utils</artifactId>
493                         <version>3.0.24</version>
494                 </dependency>
495                 <dependency>
496                         <groupId>org.jboss.spec.javax.ws.rs</groupId>
497                         <artifactId>jboss-jaxrs-api_2.0_spec</artifactId>
498                         <version>1.0.1.Final</version>
499                 </dependency>
500                 <dependency>
501                         <groupId>com.google.guava</groupId>
502                         <artifactId>guava</artifactId>
503                         <version>27.0-jre</version>
504                 </dependency>
505                 <dependency>
506                         <groupId>commons-codec</groupId>
507                         <artifactId>commons-codec</artifactId>
508                         <version>1.13</version>
509                 </dependency>
510                 <!-- Remove the MYSQL connector and replace it by Mariadb -->
511                 <dependency>
512                         <groupId>org.mariadb.jdbc</groupId>
513                         <artifactId>mariadb-java-client</artifactId>
514                         <version>2.2.1</version>
515                 </dependency>
516                 <!-- For SDC Controller -->
517                 <dependency>
518                         <groupId>org.onap.sdc.sdc-distribution-client</groupId>
519                         <artifactId>sdc-distribution-client</artifactId>
520                         <version>1.3.0</version>
521                 </dependency>
522                 <dependency>
523                         <groupId>org.onap.sdc.sdc-tosca</groupId>
524                         <artifactId>sdc-tosca</artifactId>
525                         <version>1.5.1</version>
526                 </dependency>
527                 <!-- TESTING -->
528                 <dependency>
529                         <groupId>org.assertj</groupId>
530                         <artifactId>assertj-core</artifactId>
531                         <version>3.10.0</version>
532                         <scope>test</scope>
533                 </dependency>
534                 <dependency>
535                         <groupId>org.mockito</groupId>
536                         <artifactId>mockito-core</artifactId>
537                         <version>2.28.2</version>
538                         <scope>test</scope>
539                 </dependency>
540                 <dependency>
541                         <groupId>org.powermock</groupId>
542                         <artifactId>powermock-api-mockito2</artifactId>
543                         <version>2.0.4</version>
544                         <scope>test</scope>
545                 </dependency>
546                 <dependency>
547                         <groupId>org.powermock</groupId>
548                         <artifactId>powermock-module-junit4</artifactId>
549                         <version>2.0.4</version>
550                         <scope>test</scope>
551                 </dependency>
552         </dependencies>
553
554         <build>
555                 <finalName>clamp</finalName>
556
557                 <testResources>
558                         <testResource>
559                                 <directory>src/test/resources</directory>
560                                 <excludes>
561                                         <exclude>**/*.jks</exclude>
562                                         <exclude>**/*.csar</exclude>
563                                 </excludes>
564                                 <filtering>true</filtering>
565                         </testResource>
566                         <testResource>
567                                 <directory>src/test/resources/https</directory>
568                                 <includes>
569                                         <include>**.jks</include>
570                                 </includes>
571                                 <filtering>false</filtering>
572                                 <targetPath>https</targetPath>
573                         </testResource>
574                         <testResource>
575                                 <directory>src/test/resources/example/sdc</directory>
576                                 <includes>
577                                         <include>**.csar</include>
578                                 </includes>
579                                 <filtering>false</filtering>
580                                 <targetPath>example/sdc</targetPath>
581                         </testResource>
582                 </testResources>
583                 <resources>
584                         <!-- For AAF folder maven should not try to filter Keystores/Truststores ... Otherwise 
585                                 they will be broken and unreadable -->
586                         <resource>
587                                 <directory>src/main/resources</directory>
588                                 <filtering>true</filtering>
589                                 <excludes>
590                                         <exclude>clds/aaf/**</exclude>
591                                 </excludes>
592                         </resource>
593                         <resource>
594                                 <directory>src/main/resources</directory>
595                                 <filtering>false</filtering>
596                                 <includes>
597                                         <include>clds/aaf/**</include>
598                                 </includes>
599                         </resource>
600                         <resource>
601                                 <directory>${ui.react.src}</directory>
602                                 <includes>
603                                         <include>src/**</include>
604                                         <include>public/**</include>
605                                         <include>package.json</include>
606                                         <include>package-lock.json</include>
607                                 </includes>
608                                 <filtering>true</filtering>
609                                 <targetPath>${project.build.directory}/${ui.react.src}</targetPath>
610                         </resource>
611                 </resources>
612
613                 <plugins>
614                         <plugin>
615                                         <groupId>de.jpdigital</groupId>
616                                         <artifactId>hibernate52-ddl-maven-plugin</artifactId>
617                                         <version>2.2.0</version>
618                                 <dependencies>
619                                         <dependency>
620                                                 <groupId>javax.xml.bind</groupId>
621                                                 <artifactId>jaxb-api</artifactId>
622                                                 <version>2.3.0</version>
623                                         </dependency>
624                                 </dependencies>
625                                 <executions>
626                                         <execution>
627                                                 <phase>process-classes</phase>
628                                                 <goals>
629                                                         <goal>gen-ddl</goal>
630                                                 </goals>
631                                                 <configuration>
632                                                         <packages>
633                                                                 <param>org.onap.clamp</param>
634                                                         </packages>
635                                                         <dialects>
636                                                                 <param>MARIADB53</param>
637                                                         </dialects>
638                                                         <outputDirectory>${project.basedir}/extra/sql/bulkload/</outputDirectory>
639                                                         <outputFileNameSuffix>create-tables</outputFileNameSuffix>
640                                                         <!-- <createDropStatements>true</createDropStatements> -->
641                                                         <omitDialectFromFileName>true</omitDialectFromFileName>
642                                                 </configuration>
643                                         </execution>
644                                 </executions>
645
646                         </plugin>
647                         <!-- Read the swagger.json file and the definition from SwaggerConfig.java; generate 
648                                 a list of .adoc files containing the APIs info in more structured way -->
649                         <plugin>
650                                 <groupId>io.github.swagger2markup</groupId>
651                                 <artifactId>swagger2markup-maven-plugin</artifactId>
652                                 <version>1.3.3</version>
653                                 <dependencies>
654                                         <dependency>
655                                                 <groupId>io.github.swagger2markup</groupId>
656                                                 <artifactId>swagger2markup-import-files-ext</artifactId>
657                                                 <version>1.3.3</version>
658                                         </dependency>
659                                         <dependency>
660                                                 <groupId>io.github.swagger2markup</groupId>
661                                                 <artifactId>swagger2markup-spring-restdocs-ext</artifactId>
662                                                 <version>1.3.3</version>
663                                         </dependency>
664                                 </dependencies>
665                                 <configuration>
666                                         <swaggerInput>${project.basedir}/docs/swagger/swagger.json</swaggerInput>
667                                         <outputDir>${project.build.directory}/asciidoc/generated</outputDir>
668                                         <config>
669                                                 <swagger2markup.markupLanguage>ASCIIDOC</swagger2markup.markupLanguage>
670                                         </config>
671                                 </configuration>
672                                 <executions>
673                                         <execution>
674                                                 <phase>post-integration-test</phase>
675                                                 <goals>
676                                                         <goal>convertSwagger2markup</goal>
677                                                 </goals>
678                                         </execution>
679                                 </executions>
680                         </plugin>
681
682                         <!-- Run the generated asciidoc through Asciidoctor to generate other documentation 
683                                 types, such as PDFs or HTML5 -->
684                         <plugin>
685                                 <groupId>org.asciidoctor</groupId>
686                                 <artifactId>asciidoctor-maven-plugin</artifactId>
687                                 <version>1.5.7.1</version>
688                                 <dependencies>
689                                         <dependency>
690                                                 <groupId>org.asciidoctor</groupId>
691                                                 <artifactId>asciidoctorj-pdf</artifactId>
692                                                 <version>1.5.0-alpha.10.1</version>
693                                         </dependency>
694                                 </dependencies>
695                                 <configuration>
696                                         <sourceDirectory>${project.basedir}/src/main/resources/asciidoc</sourceDirectory>
697                                         <sourceDocumentName>swagger.adoc</sourceDocumentName>
698                                         <attributes>
699                                                 <doctype>book</doctype>
700                                                 <toc>left</toc>
701                                                 <toclevels>3</toclevels>
702                                                 <numbered />
703                                                 <hardbreaks />
704                                                 <sectlinks />
705                                                 <sectanchors />
706                                                 <generated>${project.build.directory}/asciidoc/generated</generated>
707                                         </attributes>
708                                 </configuration>
709
710                                 <executions>
711                                         <execution>
712                                                 <id>output-html</id>
713                                                 <phase>post-integration-test</phase>
714                                                 <goals>
715                                                         <goal>process-asciidoc</goal>
716                                                 </goals>
717                                                 <configuration>
718                                                         <backend>html5</backend>
719                                                         <outputDirectory>${project.basedir}/docs/swagger</outputDirectory>
720                                                         <outputDirectory>${project.basedir}/src/main/resources/META-INF/resources/</outputDirectory>
721                                                 </configuration>
722                                         </execution>
723                                         <execution>
724                                                 <id>output-pdf</id>
725                                                 <phase>post-integration-test</phase>
726                                                 <goals>
727                                                         <goal>process-asciidoc</goal>
728                                                 </goals>
729                                                 <configuration>
730                                                         <backend>pdf</backend>
731                                                         <outputDirectory>${project.basedir}/docs/swagger</outputDirectory>
732                                                 </configuration>
733                                         </execution>
734                                 </executions>
735                         </plugin>
736                         <plugin>
737                                 <groupId>org.codehaus.groovy.maven</groupId>
738                                 <artifactId>gmaven-plugin</artifactId>
739                                 <version>1.0</version>
740                                 <executions>
741                                         <execution>
742                                                 <phase>validate</phase>
743                                                 <goals>
744                                                         <goal>execute</goal>
745                                                 </goals>
746                                                 <configuration>
747                                                         <source>${project.basedir}/src/main/script/TagVersion.groovy</source>
748                                                 </configuration>
749                                         </execution>
750                                 </executions>
751                         </plugin>
752                         <plugin>
753                                 <groupId>org.codehaus.groovy.maven</groupId>
754                                 <artifactId>gmaven-plugin</artifactId>
755                                 <version>1.0</version>
756                                 <executions>
757                                         <execution>
758                                                 <phase>validate</phase>
759                                                 <goals>
760                                                         <goal>execute</goal>
761                                                 </goals>
762                                                 <configuration>
763                                                         <source>${project.basedir}/src/main/script/SelectNpmRepo.groovy</source>
764                                                 </configuration>
765                                         </execution>
766                                 </executions>
767                         </plugin>
768                         <plugin>
769                                 <groupId>org.apache.maven.plugins</groupId>
770                                 <artifactId>maven-jar-plugin</artifactId>
771                                 <version>3.0.2</version>
772                                 <executions>
773                                         <execution>
774                                                 <id>jar-with-only-classes</id>
775                                                 <phase>package</phase>
776                                                 <goals>
777                                                         <goal>jar</goal>
778                                                 </goals>
779                                                 <configuration>
780                                                         <classifier>classes</classifier>
781                                                         <includes>
782                                                                 <include>org/**</include>
783                                                         </includes>
784                                                 </configuration>
785                                         </execution>
786                                 </executions>
787                         </plugin>
788                         <plugin>
789                                 <groupId>org.codehaus.mojo</groupId>
790                                 <artifactId>build-helper-maven-plugin</artifactId>
791                                 <version>3.0.0</version>
792                                 <executions>
793                                         <execution>
794                                                 <goals>
795                                                         <goal>attach-artifact</goal>
796                                                 </goals>
797                                                 <phase>package</phase>
798                                                 <configuration>
799                                                         <artifacts>
800                                                                 <artifact>
801                                                                         <file>${project.build.directory}/clamp-classes.jar</file>
802                                                                         <type>jar</type>
803                                                                         <classifier>classes</classifier>
804                                                                 </artifact>
805                                                         </artifacts>
806                                                 </configuration>
807                                         </execution>
808                                         <execution>
809                                                 <id>reserve-port-for-tests</id>
810                                                 <phase>process-resources</phase>
811                                                 <goals>
812                                                         <goal>reserve-network-port</goal>
813                                                 </goals>
814                                                 <configuration>
815                                                         <portNames>
816                                                                 <portName>docker.mariadb.port.host</portName>
817                                                                 <portName>docker.http-cache.port.host</portName>
818                                                                 <portName>clamp.it.tests.http-redirected</portName>
819                                                                 <portName>clamp.it.tests.https</portName>
820                                                                 <portName>clamp.it.tests.http</portName>
821                                                         </portNames>
822                                                 </configuration>
823                                         </execution>
824                                 </executions>
825                         </plugin>
826
827                         <plugin>
828                                 <groupId>org.springframework.boot</groupId>
829                                 <artifactId>spring-boot-maven-plugin</artifactId>
830                                 <!-- Temporary fix -->
831                                 <version>1.5.13.RELEASE</version>
832                                 <!-- <version>${springboot.version}</version> -->
833                                 <executions>
834                                         <execution>
835                                                 <goals>
836                                                         <goal>repackage</goal>
837                                                 </goals>
838                                                 <phase>package</phase>
839                                         </execution>
840                                 </executions>
841                         </plugin>
842                         <plugin>
843                                 <groupId>org.apache.maven.plugins</groupId>
844                                 <artifactId>maven-surefire-plugin</artifactId>
845                                 <version>2.22.2</version>
846                                 <configuration>
847                                         <forkCount>1C</forkCount>
848                                         <reuseForks>true</reuseForks>
849                                         <useSystemClassLoader>false</useSystemClassLoader>
850                                         <argLine>${surefireArgLine}</argLine>
851                                 </configuration>
852                         </plugin>
853
854                         <plugin>
855                                 <groupId>org.apache.maven.plugins</groupId>
856                                 <artifactId>maven-failsafe-plugin</artifactId>
857                                 <version>2.22.2</version>
858                                 <executions>
859                                         <execution>
860                                                 <id>integration-tests</id>
861                                                 <goals>
862                                                         <goal>integration-test</goal>
863                                                         <goal>verify</goal>
864                                                 </goals>
865                                                 <configuration>
866                                                         <additionalClasspathElements>
867                                                                 <additionalClasspathElement>${project.build.directory}/classes</additionalClasspathElement>
868                                                         </additionalClasspathElements>
869                                                         <includes>
870                                                                 <include>**/*ItCase.java</include>
871                                                         </includes>
872                                                         <forkCount>1</forkCount>
873                                                         <reuseForks>true</reuseForks>
874                                                         <useSystemClassLoader>false</useSystemClassLoader>
875                                                         <argLine>${failsafeArgLine}</argLine>
876                                                 </configuration>
877                                         </execution>
878                                 </executions>
879                         </plugin>
880                         <plugin>
881                                 <groupId>io.fabric8</groupId>
882                                 <artifactId>docker-maven-plugin</artifactId>
883                                 <version>0.31.0</version>
884                                 <dependencies>
885                                         <dependency>
886                                                 <groupId>org.apache.httpcomponents</groupId>
887                                                 <artifactId>httpclient</artifactId>
888                                                 <version>4.5.5</version>
889                                         </dependency>
890                                 </dependencies>
891                                 <configuration>
892                                         <verbose>true</verbose>
893                                         <apiVersion>1.35</apiVersion>
894                                         <images>
895                                                 <image>
896                                                         <name>library/mariadb:10.3.12</name>
897                                                         <alias>mariadb</alias>
898                                                         <run>
899                                                                 <env>
900                                                                         <MYSQL_ROOT_PASSWORD>strong_pitchou</MYSQL_ROOT_PASSWORD>
901                                                                 </env>
902                                                                 <hostname>mariadb</hostname>
903                                                                 <volumes>
904                                                                         <bind>
905                                                                                 <volume>${project.basedir}/extra/sql/:/docker-entrypoint-initdb.d:rw</volume>
906                                                                                 <volume>${project.basedir}/extra/docker/mariadb/conf1:/etc/mysql/conf.d</volume>
907                                                                         </bind>
908                                                                 </volumes>
909                                                                 <wait>
910                                                                         <log>socket: '/var/run/mysqld/mysqld.sock'  port: 3306  mariadb.org binary distribution</log>
911                                                                         <time>600000</time>
912                                                                         <exec>
913                                                                                 <preStop>/docker-entrypoint-initdb.d/dump/backup-data-only.sh</preStop>
914                                                                         </exec>
915                                                                 </wait>
916                                                                 <ports>
917                                                                         <port>${docker.mariadb.port.host}:3306</port>
918                                                                 </ports>
919                                                                 <network>
920                                                                         <mode>bridge</mode>
921                                                                 </network>
922                                                         </run>
923                                                 </image>
924                                                 <image>
925                                                         <name>library/python:2-slim</name>
926                                                         <alias>python</alias>
927                                                         <run>
928                                                                 <hostname>python</hostname>
929                                                                 <volumes>
930                                                                         <bind>
931                                                                                 <volume>${project.basedir}/src/test/resources/http-cache/:/usr/src/http-cache-app</volume>
932                                                                                 <volume>${project.basedir}/src/test/resources/http-cache/example/:/usr/src/http-cache-app/data-cache</volume>
933                                                                         </bind>
934                                                                 </volumes>
935                                                                 <wait>
936                                                                         <tcp>
937                                                                                 <ports>
938                                                                                         <port>8080</port>
939                                                                                 </ports>
940                                                                                 <mode>direct</mode>
941                                                                         </tcp>
942                                                                         <time>120000</time>
943                                                                 </wait>
944                                                                 <ports>
945                                                                         <port>${docker.http-cache.port.host}:8080</port>
946                                                                 </ports>
947                                                                 <workingDir>/usr/src/http-cache-app</workingDir>
948                                                                 <cmd>
949                                                                         <shell>./start_http_cache.sh ${python.http.proxy.param}
950                                                                                 --python_proxyaddress=localhost:${docker.http-cache.port.host}</shell>
951                                                                 </cmd>
952                                                                 <network>
953                                                                         <mode>bridge</mode>
954                                                                 </network>
955                                                         </run>
956                                                 </image>
957                                                 <image>
958                                                         <name>onap/clamp-backend</name>
959                                                         <alias>onap-clamp-backend</alias>
960                                                         <run>
961                                                                 <skip>true</skip>
962                                                         </run>
963                                                         <build>
964                                                                 <cleanup>true</cleanup>
965                                                                 <tags>
966                                                                         <tag>latest</tag>
967                                                                         <tag>${project.docker.latesttagtimestamp.version}</tag>
968                                                                         <tag>${project.docker.latesttag.version}</tag>
969                                                                 </tags>
970                                                                 <!-- A relative path is looked up in ${project.basedir}/src/main/docker by 
971                                                                         default -->
972                                                                 <dockerFile>backend/Dockerfile</dockerFile>
973                                                                 <assembly>
974                                                                         <descriptor>backend/backend-files.xml</descriptor>
975                                                                         <name>onap-clamp-backend</name>
976                                                                 </assembly>
977                                                         </build>
978                                                 </image>
979                                                 <image>
980                                                         <name>onap/clamp-frontend</name>
981                                                         <alias>onap-clamp-frontend</alias>
982                                                         <run>
983                                                                 <skip>true</skip>
984                                                         </run>
985                                                         <build>
986                                                                 <cleanup>true</cleanup>
987                                                                 <tags>
988                                                                         <tag>latest</tag>
989                                                                         <tag>${project.docker.latesttagtimestamp.version}</tag>
990                                                                         <tag>${project.docker.latesttag.version}</tag>
991                                                                 </tags>
992                                                                 <!-- A relative path is looked up in ${project.basedir}/src/main/docker by 
993                                                                         default -->
994                                                                 <dockerFile>frontend/Dockerfile</dockerFile>
995                                                                 <assembly>
996                                                                         <descriptor>frontend/frontend-files.xml</descriptor>
997                                                                         <name>onap-clamp-frontend</name>
998                                                                 </assembly>
999                                                         </build>
1000                                                 </image>
1001                                                 <image>
1002                                                         <name>onap/clamp-dashboard-logstash</name>
1003                                                         <alias>onap-clamp-dashboard-logstash</alias>
1004                                                         <run>
1005                                                                 <skip>true</skip>
1006                                                         </run>
1007                                                         <build>
1008                                                                 <cleanup>true</cleanup>
1009                                                                 <tags>
1010                                                                         <tag>latest</tag>
1011                                                                         <tag>${project.docker.latesttagtimestamp.version}</tag>
1012                                                                         <tag>${project.docker.latesttag.version}</tag>
1013                                                                 </tags>
1014                                                                 <dockerFile>logstash/Dockerfile</dockerFile>
1015                                                         </build>
1016                                                 </image>
1017                                                 <image>
1018                                                         <name>onap/clamp-dashboard-kibana</name>
1019                                                         <alias>onap-clamp-dashboard-kibana</alias>
1020                                                         <run>
1021                                                                 <skip>true</skip>
1022                                                         </run>
1023                                                         <build>
1024                                                                 <cleanup>true</cleanup>
1025                                                                 <tags>
1026                                                                         <tag>latest</tag>
1027                                                                         <tag>${project.docker.latesttagtimestamp.version}</tag>
1028                                                                         <tag>${project.docker.latesttag.version}</tag>
1029                                                                 </tags>
1030                                                                 <dockerFile>kibana/Dockerfile</dockerFile>
1031                                                         </build>
1032                                                 </image>
1033                                         </images>
1034                                 </configuration>
1035
1036                                 <executions>
1037                                         <execution>
1038                                                 <id>generate-images</id>
1039                                                 <phase>install</phase>
1040                                                 <goals>
1041                                                         <goal>build</goal>
1042                                                 </goals>
1043                                         </execution>
1044                                         <execution>
1045                                                 <id>push-images</id>
1046                                                 <phase>deploy</phase>
1047                                                 <goals>
1048                                                         <goal>push</goal>
1049                                                 </goals>
1050                                         </execution>
1051                                         <execution>
1052                                                 <id>docker-start-for-it</id>
1053                                                 <phase>pre-integration-test</phase>
1054                                                 <goals>
1055                                                         <goal>start</goal>
1056                                                 </goals>
1057                                         </execution>
1058                                         <execution>
1059                                                 <id>docker-stop-for-it</id>
1060                                                 <phase>post-integration-test</phase>
1061                                                 <goals>
1062                                                         <goal>stop</goal>
1063                                                 </goals>
1064                                         </execution>
1065                                 </executions>
1066                         </plugin>
1067
1068                         <plugin>
1069                                 <groupId>org.jacoco</groupId>
1070                                 <artifactId>jacoco-maven-plugin</artifactId>
1071                                 <version>0.8.5</version>
1072                                 <configuration>
1073                                         <dumpOnExit>true</dumpOnExit>
1074                                         <append>true</append>
1075                                         <includes>
1076                                                 <include>org/onap/clamp/**</include>
1077                                         </includes>
1078                                 </configuration>
1079                                 <executions>
1080                                         <execution>
1081                                                 <id>pre-unit-test</id>
1082                                                 <goals>
1083                                                         <goal>prepare-agent</goal>
1084                                                 </goals>
1085                                                 <configuration>
1086                                                         <destFile>${project.build.directory}/coverage-reports/jacoco.exec</destFile>
1087                                                         <propertyName>surefireArgLine</propertyName>
1088                                                         <!-- <append>true</append> -->
1089                                                 </configuration>
1090                                         </execution>
1091                                         <execution>
1092                                                 <id>pre-integration-test</id>
1093                                                 <phase>pre-integration-test</phase>
1094                                                 <goals>
1095                                                         <goal>prepare-agent</goal>
1096                                                 </goals>
1097                                                 <configuration>
1098                                                         <destFile>${project.build.directory}/coverage-reports/jacoco-it.exec</destFile>
1099                                                         <propertyName>failsafeArgLine</propertyName>
1100                                                         <!-- <append>true</append> -->
1101                                                 </configuration>
1102                                         </execution>
1103                                         <execution>
1104                                                 <goals>
1105                                                         <goal>merge</goal>
1106                                                 </goals>
1107                                                 <phase>post-integration-test</phase>
1108                                                 <configuration>
1109                                                         <fileSets>
1110                                                                 <fileSet
1111                                                                         implementation="org.apache.maven.shared.model.fileset.FileSet">
1112                                                                         <directory>${project.build.directory}/coverage-reports</directory>
1113                                                                         <includes>
1114                                                                                 <include>*.exec</include>
1115                                                                         </includes>
1116                                                                 </fileSet>
1117                                                         </fileSets>
1118                                                         <destFile>${project.build.directory}/jacoco.exec</destFile>
1119                                                 </configuration>
1120                                         </execution>
1121                                         <execution>
1122                                                 <id>report-xml</id>
1123                                                 <goals>
1124                                                         <goal>report</goal>
1125                                                 </goals>
1126                                                 <configuration>
1127                                                         <!-- Setting explicit path, so that we remember where it picks them up from -->
1128                                                         <dataFile>${project.build.directory}/jacoco.exec</dataFile>
1129                                                         <outputDirectory>${project.build.directory}/jacoco-html-xml-reports</outputDirectory>
1130                                                 </configuration>
1131                                         </execution>
1132                                 </executions>
1133                         </plugin>
1134
1135                         <!-- This plugin will be useful when we will have multi-modules project -->
1136                         <plugin>
1137                                 <groupId>org.codehaus.mojo</groupId>
1138                                 <artifactId>versions-maven-plugin</artifactId>
1139                                 <version>1.3.1</version>
1140                         </plugin>
1141
1142                         <plugin>
1143                                 <groupId>com.github.eirslett</groupId>
1144                                 <artifactId>frontend-maven-plugin</artifactId>
1145                                 <version>1.8.0</version>
1146                                 <configuration>
1147                                         <installDirectory>${project.build.directory}/${ui.react.src}</installDirectory>
1148                                         <workingDirectory>${project.build.directory}/${ui.react.src}</workingDirectory>
1149                                 </configuration>
1150                                 <executions>
1151                                         <execution>
1152                                                 <id>install_node_and_npm</id>
1153                                                 <goals>
1154                                                         <goal>install-node-and-npm</goal>
1155                                                 </goals>
1156                                                 <phase>generate-sources</phase>
1157                                                 <configuration>
1158                                                 <nodeVersion>v12.13.0</nodeVersion>
1159                                                 <npmVersion>6.13.0</npmVersion>
1160                                                 </configuration>
1161                                         </execution>
1162                                         <execution>
1163                                                 <id>npm_install</id>
1164                                                 <goals>
1165                                                         <goal>npm</goal>
1166                                                 </goals>
1167                                                 <phase>compile</phase>
1168                                                 <configuration>
1169                                                         <arguments>install</arguments>
1170                                                 </configuration>
1171                                         </execution>
1172                                         <execution>
1173                                                 <id>npm_test</id>
1174                                                 <goals>
1175                                                         <goal>npm</goal>
1176                                                 </goals>
1177                                                 <phase>test</phase>
1178                                                 <configuration>
1179                                                         <arguments>run-script test:coverage</arguments>
1180                                                 </configuration>
1181                                         </execution>
1182                                         <execution>
1183                                                 <id>npm_publish</id>
1184                                                 <goals>
1185                                                         <goal>npm</goal>
1186                                                 </goals>
1187                                                 <phase>deploy</phase>
1188                                                 <configuration>
1189                                                         <arguments>publish</arguments>
1190                                                 </configuration>
1191                                         </execution>
1192                                 </executions>
1193                         </plugin>
1194                         <plugin>
1195                                 <groupId>org.apache.maven.plugins</groupId>
1196                                 <artifactId>maven-compiler-plugin</artifactId>
1197                                 <version>3.8.1</version>
1198                                 <configuration>
1199                                         <source>11</source>
1200                                         <target>11</target>
1201                                 </configuration>
1202                         </plugin>
1203                         <plugin>
1204                                 <groupId>org.sonarsource.scanner.maven</groupId>
1205                                 <artifactId>sonar-maven-plugin</artifactId>
1206                                 <version>3.7.0.1746</version>
1207                         </plugin>
1208                 </plugins>
1209         </build>
1210 </project>