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