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