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