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