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