Fix Sonar
[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>4.2.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                 * The dashboard - Elastic search
49                 * The dashboard - Logstash
50                 * The dashboard - Kibana
51
52            It can test:
53             - The CLAMP backend, JAVA unit testing
54             - The CLAMP backend, JAVA integration tests (with Spring + docker mariadb database + docker policy/dcae emulator written in python)
55             - The CLAMP frontend, Javascrip tests (NodeJS(NPM) + JEST + Enzyme fro React)
56            
57            The test coverage for dev's can be found after a "clean install" build in:
58             - Clamp backend: target/jacoco-dev.exec (unit tests + integration tests merged)
59                 or separately target/coverage-reports/jacoco.exec and target/coverage-reports/jacoco-it.exec
60             - Clamp frontend: target/ui-react/coverage
61
62            Useful mvn commands:
63             - mvn clean install: Build Clamp backend JAR + unit tests + integration tests + NPM tests (+coverage for all)
64             - mvn clean install -DskipITs=true: Build Clamp backend JAR + unit tests + NPM tests (+coverage for all), it does not require a DOCKER engine
65             - mvn clean install -DskipTests -P docker: Build Clamp backend JAR + all docker images
66
67            To start CLAMP (Build it before):
68             - Use docker-compose file in ./extra/docker/clamp/docker-compose.yml
69             - Use the script located in ./extra/bin/start-backend.sh + start-frontend.sh
70             - Use your IDE to use the Jar or start NVM/NPM
71
72         </description>
73
74         <properties>
75                 <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
76                 <clamp.project.version>${project.version}</clamp.project.version>
77                 <clamp.build.timestamp>${maven.build.timestamp}</clamp.build.timestamp>
78                 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
79                 <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
80
81                 <eelf.core.version>1.0.0</eelf.core.version>
82                 <camel.version>2.24.0</camel.version>
83                 <springboot.version>2.2.0.RELEASE</springboot.version>
84
85                 <sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
86                 <sonar.surefire.reportsPath>${project.build.directory}/surefire-reports</sonar.surefire.reportsPath>
87                 <!-- The value below comes from the jacoco maven plugin output, sonar now takes xml only -->
88                 <sonar.coverage.jacoco.xmlReportPaths>${project.build.directory}/jacoco-html-xml-reports/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths>
89                 <!-- <sonar.jacoco.reportPath>${project.build.directory}/coverage-reports/jacoco.exec</sonar.jacoco.reportPath>
90                 <sonar.jacoco.itReportPath>${project.build.directory}/coverage-reports/jacoco-it.exec</sonar.jacoco.itReportPath> -->
91                 <sonar.jacoco.reportMissing.force.zero>true</sonar.jacoco.reportMissing.force.zero>
92                 <sonar.projectVersion>${project.version}</sonar.projectVersion>
93                 <!-- Enable language to disable javascript analysis -->
94                 <!-- <sonar.language>java</sonar.language> -->
95                 <!-- Parameters for Javascript coverage -->
96                 <sonar.sources>.</sonar.sources>
97                 <sonar.inclusions>src/main/**,${project.build.directory}/${ui.react.src}/src/**</sonar.inclusions>
98                 <sonar.exclusions>src/main/resources/**</sonar.exclusions>
99                 <sonar.scm.exclusions.disabled>true</sonar.scm.exclusions.disabled>
100                 <sonar.javascript.lcov.reportPaths>${project.build.directory}/${ui.react.src}/coverage/lcov.info</sonar.javascript.lcov.reportPaths>
101                 <sonar.coverage.exclusions>src/main/resources/**,target/ui-react/src/**/*.test.js,target/ui-react/src/setupTests.js,src/main/docker/kibana/*.py</sonar.coverage.exclusions>
102                 <docker.push.registry>localhost:5000</docker.push.registry>
103                 <docker.pull.registry>nexus3.onap.org:10001</docker.pull.registry>
104                 <docker.skip.build>true</docker.skip.build>
105                 <docker.skip.push>true</docker.skip.push>
106                 <docker.skip.tag>true</docker.skip.tag>
107                 <skip.staging.artifacts>false</skip.staging.artifacts>
108                 <python.http.proxy.param />
109                 <tomcat.version>9.0.27</tomcat.version>
110                 <ui.react.src>ui-react</ui.react.src>
111                 <npm.publish.url>https://nexus3.onap.org/repository/npm.release/</npm.publish.url>
112         </properties>
113
114         <profiles>
115                 <profile>
116                         <id>without-test</id>
117                         <activation>
118                                 <property>
119                                         <name>maven.test.skip</name>
120                                         <value>true</value>
121                                 </property>
122                         </activation>
123                         <properties>
124                                 <docker.skip.run>true</docker.skip.run>
125                                 <docker.skip>true</docker.skip>
126                         </properties>
127                 </profile>
128                 <profile>
129                         <id>without-IT-only</id>
130                         <activation>
131                                 <property>
132                                         <name>skipITs</name>
133                                         <value>true</value>
134                                 </property>
135                         </activation>
136                         <properties>
137                                 <docker.skip.run>true</docker.skip.run>
138                                 <docker.skip>true</docker.skip>
139                         </properties>
140                 </profile>
141                 <profile>
142                         <id>without-IT-only2</id>
143                         <activation>
144                                 <property>
145                                         <name>skipTests</name>
146                                         <value>true</value>
147                                 </property>
148                         </activation>
149                         <properties>
150                                 <docker.skip.run>true</docker.skip.run>
151                                 <docker.skip>true</docker.skip>
152                         </properties>
153                 </profile>
154                 <profile>
155                         <id>docker</id>
156                         <properties>
157                                 <skip.staging.artifacts>true</skip.staging.artifacts>
158                                 <docker.skip.build>false</docker.skip.build>
159                                 <docker.skip.tag>false</docker.skip.tag>
160                                 <docker.skip.push>false</docker.skip.push>
161                                 <docker.skip>false</docker.skip>
162                         </properties>
163                 </profile>
164         </profiles>
165
166         <distributionManagement>
167                 <repository>
168                         <id>ecomp-releases</id>
169                         <name>Clamp Release Repository</name>
170                         <url>https://nexus.onap.org/content/repositories/releases/</url>
171                 </repository>
172                 <snapshotRepository>
173                         <id>ecomp-snapshots</id>
174                         <name>Clamp Snapshot Repository</name>
175                         <url>https://nexus.onap.org/content/repositories/snapshots/</url>
176                 </snapshotRepository>
177                 <site>
178                         <id>ecomp-site</id>
179                         <url>dav:https://nexus.onap.org/content/sites/site/org/onap/clamp/${project.version}</url>
180                 </site>
181         </distributionManagement>
182
183         <repositories>
184                 <repository>
185                         <id>onap-public</id>
186                         <name>onap-public</name>
187                         <url>https://nexus.onap.org/content/repositories/public/</url>
188                         <releases>
189                                 <enabled>true</enabled>
190                         </releases>
191                         <snapshots>
192                                 <enabled>false</enabled>
193                         </snapshots>
194                 </repository>
195                 <repository>
196                         <id>ecomp-releases</id>
197                         <name>ONAP Release Repository</name>
198                         <url>https://nexus.onap.org/content/repositories/releases/</url>
199                 </repository>
200                 <repository>
201                         <id>ecomp-staging</id>
202                         <name>ONAP Staging Repository</name>
203                         <url>https://nexus.onap.org/content/repositories/staging/</url>
204                 </repository>
205                 <repository>
206                         <id>ecomp-snapshots</id>
207                         <name>ONAP Snapshot Repository</name>
208                         <url>https://nexus.onap.org/content/repositories/snapshots/</url>
209                         <snapshots>
210                                 <enabled>true</enabled>
211                         </snapshots>
212                         <releases>
213                                 <enabled>false</enabled>
214                         </releases>
215                 </repository>
216                 <repository>
217                         <id>central</id>
218                         <url>http://repo1.maven.org/maven2/</url>
219                 </repository>
220         </repositories>
221         <pluginRepositories>
222                 <pluginRepository>
223                         <id>onap-public</id>
224                         <name>onap-public</name>
225                         <url>https://nexus.onap.org/content/repositories/public/</url>
226                         <releases>
227                                 <enabled>true</enabled>
228                         </releases>
229                         <snapshots>
230                                 <enabled>false</enabled>
231                         </snapshots>
232                 </pluginRepository>
233                 <pluginRepository>
234                         <id>central</id>
235                         <url>http://repo1.maven.org/maven2/</url>
236                 </pluginRepository>
237         </pluginRepositories>
238
239         <dependencyManagement>
240                 <dependencies>
241                         <!-- Spring Boot BOM -->
242                         <dependency>
243                                 <groupId>org.springframework.boot</groupId>
244                                 <artifactId>spring-boot-dependencies</artifactId>
245                                 <version>${springboot.version}</version>
246                                 <type>pom</type>
247                                 <scope>import</scope>
248                         </dependency>
249                         <!-- Camel BOM -->
250                         <dependency>
251                                 <groupId>org.apache.camel</groupId>
252                                 <artifactId>camel-spring-boot-dependencies</artifactId>
253                                 <version>${camel.version}</version>
254                                 <type>pom</type>
255                                 <scope>import</scope>
256                         </dependency>
257                 </dependencies>
258         </dependencyManagement>
259
260         <dependencies>
261                 <dependency>
262                         <groupId>org.apache.xmlgraphics</groupId>
263                         <artifactId>batik-svggen</artifactId>
264                         <version>1.11</version>
265                         <exclusions>
266                         <exclusion>
267                                 <groupId>xml-apis</groupId>
268                                 <artifactId>xml-apis</artifactId>
269                         </exclusion>
270                         </exclusions>
271                 </dependency>
272                 <dependency>
273                         <groupId>org.apache.xmlgraphics</groupId>
274                         <artifactId>batik-svg-dom</artifactId>
275                         <version>1.11</version>
276                 </dependency>
277                 <dependency>
278                         <groupId>org.apache.xmlgraphics</groupId>
279                         <artifactId>batik-transcoder</artifactId>
280                         <version>1.11</version>
281                 </dependency>
282                 <dependency>
283                         <groupId>com.att.eelf</groupId>
284                         <artifactId>eelf-core</artifactId>
285                         <version>${eelf.core.version}</version>
286                         <exclusions>
287                                 <exclusion>
288                                         <groupId>org.powermock</groupId>
289                                         <artifactId>powermock-module-junit4</artifactId>
290                                 </exclusion>
291                                 <exclusion>
292                                         <groupId>org.powermock</groupId>
293                                         <artifactId>powermock-api-mockito</artifactId>
294                                 </exclusion>
295                         </exclusions>
296                 </dependency>
297                 <dependency>
298                         <groupId>org.codehaus.janino</groupId>
299                         <artifactId>janino</artifactId>
300                         <version>3.0.8</version>
301                 </dependency>
302                 <dependency>
303                         <groupId>org.apache.tomcat.embed</groupId>
304                         <artifactId>tomcat-embed-core</artifactId>
305                         <version>${tomcat.version}</version>
306                 </dependency>
307                 <dependency>
308                         <groupId>org.apache.tomcat.embed</groupId>
309                         <artifactId>tomcat-embed-el</artifactId>
310                         <version>${tomcat.version}</version>
311                 </dependency>
312                 <dependency>
313                         <groupId>org.apache.tomcat.embed</groupId>
314                         <artifactId>tomcat-embed-websocket</artifactId>
315                         <version>${tomcat.version}</version>
316                 </dependency>
317                 <dependency>
318                         <groupId>org.apache.tomcat</groupId>
319                         <artifactId>tomcat-annotations-api</artifactId>
320                         <version>${tomcat.version}</version>
321                 </dependency>
322                 <!-- For CAMEL -->
323                 <dependency>
324                         <groupId>org.apache.camel</groupId>
325                         <artifactId>camel-http4-starter</artifactId>
326                 </dependency>
327                 <dependency>
328                         <groupId>org.apache.camel</groupId>
329                         <artifactId>camel-spring-boot-starter</artifactId>
330                 </dependency>
331                 <dependency>
332                         <groupId>org.apache.camel</groupId>
333                         <artifactId>camel-jaxb-starter</artifactId>
334                 </dependency>
335                 <dependency>
336                         <groupId>org.apache.camel</groupId>
337                         <artifactId>camel-servlet-starter</artifactId>
338                 </dependency>
339                 <dependency>
340                         <groupId>org.apache.camel</groupId>
341                         <artifactId>camel-gson-starter</artifactId>
342                 </dependency>
343                 <dependency>
344                         <groupId>org.apache.camel</groupId>
345                         <artifactId>camel-swagger-java-starter</artifactId>
346                         <exclusions>
347                                 <exclusion>
348                                         <groupId>javax.ws.rs</groupId>
349                                         <artifactId>jsr311-api</artifactId>
350                                 </exclusion>
351                                 <exclusion>
352                                         <groupId>org.slf4j</groupId>
353                                         <artifactId>slf4j-ext</artifactId>
354                                 </exclusion>
355                                 <exclusion>
356                                         <groupId>com.fasterxml.jackson.core</groupId>
357                                         <artifactId>jackson-databind</artifactId>
358                                 </exclusion>
359                         </exclusions>
360                 </dependency>
361                 <dependency>
362                         <groupId>javax.xml.bind</groupId>
363                         <artifactId>jaxb-api</artifactId>
364                         <version>2.3.0</version>
365                 </dependency>
366                 <dependency>
367                         <groupId>org.glassfish.jersey.core</groupId>
368                         <artifactId>jersey-common</artifactId>
369                         <version>2.27</version>
370                 </dependency>
371                 <!-- Spring famework -->
372                 <dependency>
373                         <groupId>org.springframework.boot</groupId>
374                         <artifactId>spring-boot-starter-web</artifactId>
375                         <exclusions>
376                                 <exclusion>
377                                         <groupId>org.springframework.boot</groupId>
378                                         <artifactId>spring-boot-starter-json</artifactId>
379                                 </exclusion>
380                         </exclusions>
381                 </dependency>
382                 <dependency>
383                         <groupId>org.springframework.boot</groupId>
384                         <artifactId>spring-boot-starter-tomcat</artifactId>
385                 </dependency>
386                 <dependency>
387                         <groupId>org.springframework</groupId>
388                         <artifactId>spring-jdbc</artifactId>
389                 </dependency>
390                 <dependency>
391                         <groupId>org.springframework.boot</groupId>
392                         <artifactId>spring-boot-starter-security</artifactId>
393                 </dependency>
394                 <dependency>
395                         <groupId>org.springframework.boot</groupId>
396                         <artifactId>spring-boot-autoconfigure</artifactId>
397                 </dependency>
398                 <dependency>
399                         <groupId>org.springframework.boot</groupId>
400                         <artifactId>spring-boot-starter-test</artifactId>
401                         <scope>test</scope>
402                         <exclusions>
403                                 <exclusion>
404                                         <groupId>com.vaadin.external.google</groupId>
405                                         <artifactId>android-json</artifactId>
406                                 </exclusion>
407                         </exclusions>
408                 </dependency>
409                 <dependency>
410                         <groupId>org.springframework.boot</groupId>
411                         <artifactId>spring-boot-starter-data-jpa</artifactId>
412                 </dependency>
413                 <!-- Others dependencies -->
414                 <dependency>
415                         <groupId>org.onap.aaf.authz</groupId>
416                         <artifactId>aaf-cadi-aaf</artifactId>
417                         <version>2.1.15</version>
418                         <exclusions>
419                                 <exclusion>
420                                         <groupId>javax.servlet</groupId>
421                                         <artifactId>servlet-api</artifactId>
422                                 </exclusion>
423                         </exclusions>
424                 </dependency>
425                 <dependency>
426                         <groupId>ch.qos.logback</groupId>
427                         <artifactId>logback-core</artifactId>
428                         <version>1.2.3</version>
429                 </dependency>
430                 <dependency>
431                         <groupId>ch.qos.logback</groupId>
432                         <artifactId>logback-classic</artifactId>
433                         <version>1.2.3</version>
434                 </dependency>
435                 <dependency>
436                         <groupId>commons-dbcp</groupId>
437                         <artifactId>commons-dbcp</artifactId>
438                         <version>1.4</version>
439                 </dependency>
440                 <dependency>
441                         <groupId>commons-io</groupId>
442                         <artifactId>commons-io</artifactId>
443                         <version>2.6</version>
444                 </dependency>
445                 <dependency>
446                         <groupId>com.googlecode.json-simple</groupId>
447                         <artifactId>json-simple</artifactId>
448                         <version>1.1.1</version>
449                 </dependency>
450                 <dependency>
451                         <groupId>org.apache.commons</groupId>
452                         <artifactId>commons-vfs2</artifactId>
453                         <version>2.2</version>
454                 </dependency>
455                 <dependency>
456                         <groupId>joda-time</groupId>
457                         <artifactId>joda-time</artifactId>
458                 </dependency>
459                 <dependency>
460                         <groupId>org.slf4j</groupId>
461                         <artifactId>slf4j-api</artifactId>
462                 </dependency>
463                 <dependency>
464                         <groupId>javax.ws.rs</groupId>
465                         <artifactId>javax.ws.rs-api</artifactId>
466                         <version>2.0</version>
467                 </dependency>
468                 <dependency>
469                         <groupId>junit</groupId>
470                         <artifactId>junit</artifactId>
471                 </dependency>
472                 <dependency>
473                         <groupId>javax.transaction</groupId>
474                         <artifactId>jta</artifactId>
475                         <version>1.1</version>
476                 </dependency>
477                 <dependency>
478                         <groupId>javax.persistence</groupId>
479                         <artifactId>persistence-api</artifactId>
480                         <version>1.0.2</version>
481                 </dependency>
482                 <dependency>
483                         <groupId>org.apache.commons</groupId>
484                         <artifactId>commons-csv</artifactId>
485                         <version>1.3</version>
486                 </dependency>
487                 <!-- Other dependencies to fix nexus IQ reported vulnerabilities -->
488                 <dependency>
489                         <groupId>org.codehaus.plexus</groupId>
490                         <artifactId>plexus-utils</artifactId>
491                         <version>3.0.24</version>
492                 </dependency>
493                 <dependency>
494                         <groupId>org.jboss.spec.javax.ws.rs</groupId>
495                         <artifactId>jboss-jaxrs-api_2.0_spec</artifactId>
496                         <version>1.0.1.Final</version>
497                 </dependency>
498                 <dependency>
499                         <groupId>com.google.guava</groupId>
500                         <artifactId>guava</artifactId>
501                         <version>27.0-jre</version>
502                 </dependency>
503                 <dependency>
504                         <groupId>commons-codec</groupId>
505                         <artifactId>commons-codec</artifactId>
506                         <version>1.13</version>
507                 </dependency>
508                 <!-- Remove the MYSQL connector and replace it by Mariadb -->
509                 <dependency>
510                         <groupId>org.mariadb.jdbc</groupId>
511                         <artifactId>mariadb-java-client</artifactId>
512                         <version>2.2.1</version>
513                 </dependency>
514                 <!-- For SDC Controller -->
515                 <dependency>
516                         <groupId>org.onap.sdc.sdc-distribution-client</groupId>
517                         <artifactId>sdc-distribution-client</artifactId>
518                         <version>1.3.0</version>
519                 </dependency>
520                 <dependency>
521                         <groupId>org.onap.sdc.sdc-tosca</groupId>
522                         <artifactId>sdc-tosca</artifactId>
523                         <version>1.5.1</version>
524                 </dependency>
525                 <!-- TESTING -->
526                 <dependency>
527                         <groupId>org.assertj</groupId>
528                         <artifactId>assertj-core</artifactId>
529                         <version>3.10.0</version>
530                         <scope>test</scope>
531                 </dependency>
532                 <dependency>
533                         <groupId>org.mockito</groupId>
534                         <artifactId>mockito-core</artifactId>
535                         <version>2.28.2</version>
536                         <scope>test</scope>
537                 </dependency>
538                 <dependency>
539                         <groupId>org.powermock</groupId>
540                         <artifactId>powermock-api-mockito2</artifactId>
541                         <version>2.0.4</version>
542                         <scope>test</scope>
543                 </dependency>
544                 <dependency>
545                         <groupId>org.powermock</groupId>
546                         <artifactId>powermock-module-junit4</artifactId>
547                         <version>2.0.4</version>
548                         <scope>test</scope>
549                 </dependency>
550         </dependencies>
551
552         <build>
553                 <finalName>clamp</finalName>
554
555                 <testResources>
556                         <testResource>
557                                 <directory>src/test/resources</directory>
558                                 <excludes>
559                                         <exclude>**/*.jks</exclude>
560                                         <exclude>**/*.csar</exclude>
561                                 </excludes>
562                                 <filtering>true</filtering>
563                         </testResource>
564                         <testResource>
565                                 <directory>src/test/resources/https</directory>
566                                 <includes>
567                                         <include>**.jks</include>
568                                 </includes>
569                                 <filtering>false</filtering>
570                                 <targetPath>https</targetPath>
571                         </testResource>
572                         <testResource>
573                                 <directory>src/test/resources/example/sdc</directory>
574                                 <includes>
575                                         <include>**.csar</include>
576                                 </includes>
577                                 <filtering>false</filtering>
578                                 <targetPath>example/sdc</targetPath>
579                         </testResource>
580                 </testResources>
581                 <resources>
582                         <!-- For AAF folder maven should not try to filter Keystores/Truststores ... Otherwise 
583                                 they will be broken and unreadable -->
584                         <resource>
585                                 <directory>src/main/resources</directory>
586                                 <filtering>true</filtering>
587                                 <excludes>
588                                         <exclude>clds/aaf/**</exclude>
589                                 </excludes>
590                         </resource>
591                         <resource>
592                                 <directory>src/main/resources</directory>
593                                 <filtering>false</filtering>
594                                 <includes>
595                                         <include>clds/aaf/**</include>
596                                 </includes>
597                         </resource>
598                         <resource>
599                                 <directory>${ui.react.src}</directory>
600                                 <includes>
601                                         <include>src/**</include>
602                                         <include>public/**</include>
603                                         <include>package.json</include>
604                                         <include>package-lock.json</include>
605                                 </includes>
606                                 <filtering>true</filtering>
607                                 <targetPath>${project.build.directory}/${ui.react.src}</targetPath>
608                         </resource>
609                 </resources>
610
611                 <plugins>
612                         <plugin>
613                                         <groupId>de.jpdigital</groupId>
614                                         <artifactId>hibernate52-ddl-maven-plugin</artifactId>
615                                         <version>2.2.0</version>
616                                 <dependencies>
617                                         <dependency>
618                                                 <groupId>javax.xml.bind</groupId>
619                                                 <artifactId>jaxb-api</artifactId>
620                                                 <version>2.3.0</version>
621                                         </dependency>
622                                 </dependencies>
623                                 <executions>
624                                         <execution>
625                                                 <phase>process-classes</phase>
626                                                 <goals>
627                                                         <goal>gen-ddl</goal>
628                                                 </goals>
629                                                 <configuration>
630                                                         <packages>
631                                                                 <param>org.onap.clamp</param>
632                                                         </packages>
633                                                         <dialects>
634                                                                 <param>MARIADB53</param>
635                                                         </dialects>
636                                                         <outputDirectory>${project.basedir}/extra/sql/bulkload/</outputDirectory>
637                                                         <outputFileNameSuffix>create-tables</outputFileNameSuffix>
638                                                         <!-- <createDropStatements>true</createDropStatements> -->
639                                                         <omitDialectFromFileName>true</omitDialectFromFileName>
640                                                 </configuration>
641                                         </execution>
642                                 </executions>
643
644                         </plugin>
645                         <!-- Read the swagger.json file and the definition from SwaggerConfig.java; generate 
646                                 a list of .adoc files containing the APIs info in more structured way -->
647                         <plugin>
648                                 <groupId>io.github.swagger2markup</groupId>
649                                 <artifactId>swagger2markup-maven-plugin</artifactId>
650                                 <version>1.3.3</version>
651                                 <dependencies>
652                                         <dependency>
653                                                 <groupId>io.github.swagger2markup</groupId>
654                                                 <artifactId>swagger2markup-import-files-ext</artifactId>
655                                                 <version>1.3.3</version>
656                                         </dependency>
657                                         <dependency>
658                                                 <groupId>io.github.swagger2markup</groupId>
659                                                 <artifactId>swagger2markup-spring-restdocs-ext</artifactId>
660                                                 <version>1.3.3</version>
661                                         </dependency>
662                                 </dependencies>
663                                 <configuration>
664                                         <swaggerInput>${project.basedir}/docs/swagger/swagger.json</swaggerInput>
665                                         <outputDir>${project.build.directory}/asciidoc/generated</outputDir>
666                                         <config>
667                                                 <swagger2markup.markupLanguage>ASCIIDOC</swagger2markup.markupLanguage>
668                                         </config>
669                                 </configuration>
670                                 <executions>
671                                         <execution>
672                                                 <phase>post-integration-test</phase>
673                                                 <goals>
674                                                         <goal>convertSwagger2markup</goal>
675                                                 </goals>
676                                         </execution>
677                                 </executions>
678                         </plugin>
679
680                         <!-- Run the generated asciidoc through Asciidoctor to generate other documentation 
681                                 types, such as PDFs or HTML5 -->
682                         <plugin>
683                                 <groupId>org.asciidoctor</groupId>
684                                 <artifactId>asciidoctor-maven-plugin</artifactId>
685                                 <version>1.5.7.1</version>
686                                 <dependencies>
687                                         <dependency>
688                                                 <groupId>org.asciidoctor</groupId>
689                                                 <artifactId>asciidoctorj-pdf</artifactId>
690                                                 <version>1.5.0-alpha.10.1</version>
691                                         </dependency>
692                                 </dependencies>
693                                 <configuration>
694                                         <sourceDirectory>${project.basedir}/src/main/resources/asciidoc</sourceDirectory>
695                                         <sourceDocumentName>swagger.adoc</sourceDocumentName>
696                                         <attributes>
697                                                 <doctype>book</doctype>
698                                                 <toc>left</toc>
699                                                 <toclevels>3</toclevels>
700                                                 <numbered />
701                                                 <hardbreaks />
702                                                 <sectlinks />
703                                                 <sectanchors />
704                                                 <generated>${project.build.directory}/asciidoc/generated</generated>
705                                         </attributes>
706                                 </configuration>
707
708                                 <executions>
709                                         <execution>
710                                                 <id>output-html</id>
711                                                 <phase>post-integration-test</phase>
712                                                 <goals>
713                                                         <goal>process-asciidoc</goal>
714                                                 </goals>
715                                                 <configuration>
716                                                         <backend>html5</backend>
717                                                         <outputDirectory>${project.basedir}/docs/swagger</outputDirectory>
718                                                         <outputDirectory>${project.basedir}/src/main/resources/META-INF/resources/</outputDirectory>
719                                                 </configuration>
720                                         </execution>
721                                         <execution>
722                                                 <id>output-pdf</id>
723                                                 <phase>post-integration-test</phase>
724                                                 <goals>
725                                                         <goal>process-asciidoc</goal>
726                                                 </goals>
727                                                 <configuration>
728                                                         <backend>pdf</backend>
729                                                         <outputDirectory>${project.basedir}/docs/swagger</outputDirectory>
730                                                 </configuration>
731                                         </execution>
732                                 </executions>
733                         </plugin>
734                         <plugin>
735                                 <groupId>org.codehaus.groovy.maven</groupId>
736                                 <artifactId>gmaven-plugin</artifactId>
737                                 <version>1.0</version>
738                                 <executions>
739                                         <execution>
740                                                 <phase>validate</phase>
741                                                 <goals>
742                                                         <goal>execute</goal>
743                                                 </goals>
744                                                 <configuration>
745                                                         <source>${project.basedir}/src/main/script/TagVersion.groovy</source>
746                                                 </configuration>
747                                         </execution>
748                                 </executions>
749                         </plugin>
750                         <plugin>
751                                 <groupId>org.codehaus.groovy.maven</groupId>
752                                 <artifactId>gmaven-plugin</artifactId>
753                                 <version>1.0</version>
754                                 <executions>
755                                         <execution>
756                                                 <phase>validate</phase>
757                                                 <goals>
758                                                         <goal>execute</goal>
759                                                 </goals>
760                                                 <configuration>
761                                                         <source>${project.basedir}/src/main/script/SelectNpmRepo.groovy</source>
762                                                 </configuration>
763                                         </execution>
764                                 </executions>
765                         </plugin>
766                         <plugin>
767                                 <groupId>org.apache.maven.plugins</groupId>
768                                 <artifactId>maven-jar-plugin</artifactId>
769                                 <version>3.0.2</version>
770                                 <executions>
771                                         <execution>
772                                                 <id>jar-with-only-classes</id>
773                                                 <phase>package</phase>
774                                                 <goals>
775                                                         <goal>jar</goal>
776                                                 </goals>
777                                                 <configuration>
778                                                         <classifier>classes</classifier>
779                                                         <includes>
780                                                                 <include>org/**</include>
781                                                         </includes>
782                                                 </configuration>
783                                         </execution>
784                                 </executions>
785                         </plugin>
786                         <plugin>
787                                 <groupId>org.codehaus.mojo</groupId>
788                                 <artifactId>build-helper-maven-plugin</artifactId>
789                                 <version>3.0.0</version>
790                                 <executions>
791                                         <execution>
792                                                 <goals>
793                                                         <goal>attach-artifact</goal>
794                                                 </goals>
795                                                 <phase>package</phase>
796                                                 <configuration>
797                                                         <artifacts>
798                                                                 <artifact>
799                                                                         <file>${project.build.directory}/clamp-classes.jar</file>
800                                                                         <type>jar</type>
801                                                                         <classifier>classes</classifier>
802                                                                 </artifact>
803                                                         </artifacts>
804                                                 </configuration>
805                                         </execution>
806                                         <execution>
807                                                 <id>reserve-port-for-tests</id>
808                                                 <phase>process-resources</phase>
809                                                 <goals>
810                                                         <goal>reserve-network-port</goal>
811                                                 </goals>
812                                                 <configuration>
813                                                         <portNames>
814                                                                 <portName>docker.mariadb.port.host</portName>
815                                                                 <portName>docker.http-cache.port.host</portName>
816                                                                 <portName>clamp.it.tests.http-redirected</portName>
817                                                                 <portName>clamp.it.tests.https</portName>
818                                                                 <portName>clamp.it.tests.http</portName>
819                                                         </portNames>
820                                                 </configuration>
821                                         </execution>
822                                 </executions>
823                         </plugin>
824
825                         <plugin>
826                                 <groupId>org.springframework.boot</groupId>
827                                 <artifactId>spring-boot-maven-plugin</artifactId>
828                                 <!-- Temporary fix -->
829                                 <version>1.5.13.RELEASE</version>
830                                 <!-- <version>${springboot.version}</version> -->
831                                 <executions>
832                                         <execution>
833                                                 <goals>
834                                                         <goal>repackage</goal>
835                                                 </goals>
836                                                 <phase>package</phase>
837                                         </execution>
838                                 </executions>
839                         </plugin>
840                         <plugin>
841                                 <groupId>org.apache.maven.plugins</groupId>
842                                 <artifactId>maven-surefire-plugin</artifactId>
843                                 <version>2.22.2</version>
844                                 <configuration>
845                                         <forkCount>1C</forkCount>
846                                         <reuseForks>true</reuseForks>
847                                         <useSystemClassLoader>false</useSystemClassLoader>
848                                         <argLine>${surefireArgLine}</argLine>
849                                 </configuration>
850                         </plugin>
851
852                         <plugin>
853                                 <groupId>org.apache.maven.plugins</groupId>
854                                 <artifactId>maven-failsafe-plugin</artifactId>
855                                 <version>2.22.2</version>
856                                 <executions>
857                                         <execution>
858                                                 <id>integration-tests</id>
859                                                 <goals>
860                                                         <goal>integration-test</goal>
861                                                         <goal>verify</goal>
862                                                 </goals>
863                                                 <configuration>
864                                                         <additionalClasspathElements>
865                                                                 <additionalClasspathElement>${project.build.directory}/classes</additionalClasspathElement>
866                                                         </additionalClasspathElements>
867                                                         <includes>
868                                                                 <include>**/*ItCase.java</include>
869                                                         </includes>
870                                                         <forkCount>1</forkCount>
871                                                         <reuseForks>true</reuseForks>
872                                                         <useSystemClassLoader>false</useSystemClassLoader>
873                                                         <argLine>${failsafeArgLine}</argLine>
874                                                 </configuration>
875                                         </execution>
876                                 </executions>
877                         </plugin>
878                         <plugin>
879                                 <groupId>io.fabric8</groupId>
880                                 <artifactId>docker-maven-plugin</artifactId>
881                                 <version>0.31.0</version>
882                                 <dependencies>
883                                         <dependency>
884                                                 <groupId>org.apache.httpcomponents</groupId>
885                                                 <artifactId>httpclient</artifactId>
886                                                 <version>4.5.5</version>
887                                         </dependency>
888                                 </dependencies>
889                                 <configuration>
890                                         <verbose>true</verbose>
891                                         <apiVersion>1.35</apiVersion>
892                                         <images>
893                                                 <image>
894                                                         <name>library/mariadb:10.3.12</name>
895                                                         <alias>mariadb</alias>
896                                                         <run>
897                                                                 <env>
898                                                                         <MYSQL_ROOT_PASSWORD>strong_pitchou</MYSQL_ROOT_PASSWORD>
899                                                                 </env>
900                                                                 <hostname>mariadb</hostname>
901                                                                 <volumes>
902                                                                         <bind>
903                                                                                 <volume>${project.basedir}/extra/sql/:/docker-entrypoint-initdb.d:rw</volume>
904                                                                                 <volume>${project.basedir}/extra/docker/mariadb/conf1:/etc/mysql/conf.d</volume>
905                                                                         </bind>
906                                                                 </volumes>
907                                                                 <wait>
908                                                                         <log>socket: '/var/run/mysqld/mysqld.sock'  port: 3306  mariadb.org binary distribution</log>
909                                                                         <time>600000</time>
910                                                                         <exec>
911                                                                                 <preStop>/docker-entrypoint-initdb.d/dump/backup-data-only.sh</preStop>
912                                                                         </exec>
913                                                                 </wait>
914                                                                 <ports>
915                                                                         <port>${docker.mariadb.port.host}:3306</port>
916                                                                 </ports>
917                                                                 <network>
918                                                                         <mode>bridge</mode>
919                                                                 </network>
920                                                         </run>
921                                                 </image>
922                                                 <image>
923                                                         <name>library/python:2-slim</name>
924                                                         <alias>python</alias>
925                                                         <run>
926                                                                 <hostname>python</hostname>
927                                                                 <volumes>
928                                                                         <bind>
929                                                                                 <volume>${project.basedir}/src/test/resources/http-cache/:/usr/src/http-cache-app</volume>
930                                                                                 <volume>${project.basedir}/src/test/resources/http-cache/example/:/usr/src/http-cache-app/data-cache</volume>
931                                                                         </bind>
932                                                                 </volumes>
933                                                                 <wait>
934                                                                         <tcp>
935                                                                                 <ports>
936                                                                                         <port>8080</port>
937                                                                                 </ports>
938                                                                                 <mode>direct</mode>
939                                                                         </tcp>
940                                                                         <time>120000</time>
941                                                                 </wait>
942                                                                 <ports>
943                                                                         <port>${docker.http-cache.port.host}:8080</port>
944                                                                 </ports>
945                                                                 <workingDir>/usr/src/http-cache-app</workingDir>
946                                                                 <cmd>
947                                                                         <shell>./start_http_cache.sh ${python.http.proxy.param}
948                                                                                 --python_proxyaddress=localhost:${docker.http-cache.port.host}</shell>
949                                                                 </cmd>
950                                                                 <network>
951                                                                         <mode>bridge</mode>
952                                                                 </network>
953                                                         </run>
954                                                 </image>
955                                                 <image>
956                                                         <name>onap/clamp-backend</name>
957                                                         <alias>onap-clamp-backend</alias>
958                                                         <run>
959                                                                 <skip>true</skip>
960                                                         </run>
961                                                         <build>
962                                                                 <cleanup>true</cleanup>
963                                                                 <tags>
964                                                                         <tag>latest</tag>
965                                                                         <tag>${project.docker.latesttagtimestamp.version}</tag>
966                                                                         <tag>${project.docker.latesttag.version}</tag>
967                                                                 </tags>
968                                                                 <!-- A relative path is looked up in ${project.basedir}/src/main/docker by 
969                                                                         default -->
970                                                                 <dockerFile>backend/Dockerfile</dockerFile>
971                                                                 <assembly>
972                                                                         <descriptor>backend/backend-files.xml</descriptor>
973                                                                         <name>onap-clamp-backend</name>
974                                                                 </assembly>
975                                                         </build>
976                                                 </image>
977                                                 <image>
978                                                         <name>onap/clamp-frontend</name>
979                                                         <alias>onap-clamp-frontend</alias>
980                                                         <run>
981                                                                 <skip>true</skip>
982                                                         </run>
983                                                         <build>
984                                                                 <cleanup>true</cleanup>
985                                                                 <tags>
986                                                                         <tag>latest</tag>
987                                                                         <tag>${project.docker.latesttagtimestamp.version}</tag>
988                                                                         <tag>${project.docker.latesttag.version}</tag>
989                                                                 </tags>
990                                                                 <!-- A relative path is looked up in ${project.basedir}/src/main/docker by 
991                                                                         default -->
992                                                                 <dockerFile>frontend/Dockerfile</dockerFile>
993                                                                 <assembly>
994                                                                         <descriptor>frontend/frontend-files.xml</descriptor>
995                                                                         <name>onap-clamp-frontend</name>
996                                                                 </assembly>
997                                                         </build>
998                                                 </image>
999                                                 <image>
1000                                                         <name>onap/clamp-dashboard-logstash</name>
1001                                                         <alias>onap-clamp-dashboard-logstash</alias>
1002                                                         <run>
1003                                                                 <skip>true</skip>
1004                                                         </run>
1005                                                         <build>
1006                                                                 <cleanup>true</cleanup>
1007                                                                 <tags>
1008                                                                         <tag>latest</tag>
1009                                                                         <tag>${project.docker.latesttagtimestamp.version}</tag>
1010                                                                         <tag>${project.docker.latesttag.version}</tag>
1011                                                                 </tags>
1012                                                                 <dockerFile>logstash/Dockerfile</dockerFile>
1013                                                         </build>
1014                                                 </image>
1015                                                 <image>
1016                                                         <name>onap/clamp-dashboard-kibana</name>
1017                                                         <alias>onap-clamp-dashboard-kibana</alias>
1018                                                         <run>
1019                                                                 <skip>true</skip>
1020                                                         </run>
1021                                                         <build>
1022                                                                 <cleanup>true</cleanup>
1023                                                                 <tags>
1024                                                                         <tag>latest</tag>
1025                                                                         <tag>${project.docker.latesttagtimestamp.version}</tag>
1026                                                                         <tag>${project.docker.latesttag.version}</tag>
1027                                                                 </tags>
1028                                                                 <dockerFile>kibana/Dockerfile</dockerFile>
1029                                                         </build>
1030                                                 </image>
1031                                         </images>
1032                                 </configuration>
1033
1034                                 <executions>
1035                                         <execution>
1036                                                 <id>generate-images</id>
1037                                                 <phase>install</phase>
1038                                                 <goals>
1039                                                         <goal>build</goal>
1040                                                 </goals>
1041                                         </execution>
1042                                         <execution>
1043                                                 <id>push-images</id>
1044                                                 <phase>deploy</phase>
1045                                                 <goals>
1046                                                         <goal>push</goal>
1047                                                 </goals>
1048                                         </execution>
1049                                         <execution>
1050                                                 <id>docker-start-for-it</id>
1051                                                 <phase>pre-integration-test</phase>
1052                                                 <goals>
1053                                                         <goal>start</goal>
1054                                                 </goals>
1055                                         </execution>
1056                                         <execution>
1057                                                 <id>docker-stop-for-it</id>
1058                                                 <phase>post-integration-test</phase>
1059                                                 <goals>
1060                                                         <goal>stop</goal>
1061                                                 </goals>
1062                                         </execution>
1063                                 </executions>
1064                         </plugin>
1065
1066                         <plugin>
1067                                 <groupId>org.jacoco</groupId>
1068                                 <artifactId>jacoco-maven-plugin</artifactId>
1069                                 <version>0.8.5</version>
1070                                 <configuration>
1071                                         <dumpOnExit>true</dumpOnExit>
1072                                         <append>true</append>
1073                                         <includes>
1074                                                 <include>org/onap/clamp/**</include>
1075                                         </includes>
1076                                 </configuration>
1077                                 <executions>
1078                                         <execution>
1079                                                 <id>pre-unit-test</id>
1080                                                 <goals>
1081                                                         <goal>prepare-agent</goal>
1082                                                 </goals>
1083                                                 <configuration>
1084                                                         <destFile>${project.build.directory}/coverage-reports/jacoco.exec</destFile>
1085                                                         <propertyName>surefireArgLine</propertyName>
1086                                                         <!-- <append>true</append> -->
1087                                                 </configuration>
1088                                         </execution>
1089                                         <execution>
1090                                                 <id>pre-integration-test</id>
1091                                                 <phase>pre-integration-test</phase>
1092                                                 <goals>
1093                                                         <goal>prepare-agent</goal>
1094                                                 </goals>
1095                                                 <configuration>
1096                                                         <destFile>${project.build.directory}/coverage-reports/jacoco-it.exec</destFile>
1097                                                         <propertyName>failsafeArgLine</propertyName>
1098                                                         <!-- <append>true</append> -->
1099                                                 </configuration>
1100                                         </execution>
1101                                         <execution>
1102                                                 <goals>
1103                                                         <goal>merge</goal>
1104                                                 </goals>
1105                                                 <phase>post-integration-test</phase>
1106                                                 <configuration>
1107                                                         <fileSets>
1108                                                                 <fileSet
1109                                                                         implementation="org.apache.maven.shared.model.fileset.FileSet">
1110                                                                         <directory>${project.build.directory}/coverage-reports</directory>
1111                                                                         <includes>
1112                                                                                 <include>*.exec</include>
1113                                                                         </includes>
1114                                                                 </fileSet>
1115                                                         </fileSets>
1116                                                         <destFile>${project.build.directory}/jacoco.exec</destFile>
1117                                                 </configuration>
1118                                         </execution>
1119                                         <execution>
1120                                                 <id>report-xml</id>
1121                                                 <goals>
1122                                                         <goal>report</goal>
1123                                                 </goals>
1124                                                 <configuration>
1125                                                         <!-- Setting explicit path, so that we remember where it picks them up from -->
1126                                                         <dataFile>${project.build.directory}/jacoco.exec</dataFile>
1127                                                         <outputDirectory>${project.build.directory}/jacoco-html-xml-reports</outputDirectory>
1128                                                 </configuration>
1129                                         </execution>
1130                                 </executions>
1131                         </plugin>
1132
1133                         <!-- This plugin will be useful when we will have multi-modules project -->
1134                         <plugin>
1135                                 <groupId>org.codehaus.mojo</groupId>
1136                                 <artifactId>versions-maven-plugin</artifactId>
1137                                 <version>1.3.1</version>
1138                         </plugin>
1139
1140                         <plugin>
1141                                 <groupId>com.github.eirslett</groupId>
1142                                 <artifactId>frontend-maven-plugin</artifactId>
1143                                 <version>1.8.0</version>
1144                                 <configuration>
1145                                         <installDirectory>${project.build.directory}/${ui.react.src}</installDirectory>
1146                                         <workingDirectory>${project.build.directory}/${ui.react.src}</workingDirectory>
1147                                 </configuration>
1148                                 <executions>
1149                                         <execution>
1150                                                 <id>install_node_and_npm</id>
1151                                                 <goals>
1152                                                         <goal>install-node-and-npm</goal>
1153                                                 </goals>
1154                                                 <phase>generate-sources</phase>
1155                                                 <configuration>
1156                                                 <nodeVersion>v12.13.0</nodeVersion>
1157                                                 <npmVersion>6.13.0</npmVersion>
1158                                                 </configuration>
1159                                         </execution>
1160                                         <execution>
1161                                                 <id>npm_install</id>
1162                                                 <goals>
1163                                                         <goal>npm</goal>
1164                                                 </goals>
1165                                                 <phase>compile</phase>
1166                                                 <configuration>
1167                                                         <arguments>install</arguments>
1168                                                 </configuration>
1169                                         </execution>
1170                                         <execution>
1171                                                 <id>npm_test</id>
1172                                                 <goals>
1173                                                         <goal>npm</goal>
1174                                                 </goals>
1175                                                 <phase>test</phase>
1176                                                 <configuration>
1177                                                         <arguments>run-script test:coverage</arguments>
1178                                                 </configuration>
1179                                         </execution>
1180                                         <execution>
1181                                                 <id>npm_publish</id>
1182                                                 <goals>
1183                                                         <goal>npm</goal>
1184                                                 </goals>
1185                                                 <phase>deploy</phase>
1186                                                 <configuration>
1187                                                         <arguments>publish</arguments>
1188                                                 </configuration>
1189                                         </execution>
1190                                 </executions>
1191                         </plugin>
1192                         <plugin>
1193                                 <groupId>org.apache.maven.plugins</groupId>
1194                                 <artifactId>maven-compiler-plugin</artifactId>
1195                                 <version>3.8.1</version>
1196                                 <configuration>
1197                                         <source>11</source>
1198                                         <target>11</target>
1199                                 </configuration>
1200                         </plugin>
1201                         <plugin>
1202                                 <groupId>org.sonarsource.scanner.maven</groupId>
1203                                 <artifactId>sonar-maven-plugin</artifactId>
1204                                 <version>3.7.0.1746</version>
1205                         </plugin>
1206                 </plugins>
1207         </build>
1208 </project>