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