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