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