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