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