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