blob: 6125e686d04e3090eb73e49b480f2432e1c78732 [file] [log] [blame]
ChrisC5e9feb22017-06-21 02:38:57 -07001<?xml version="1.0" encoding="UTF-8"?>
Determe, Sebastien (sd378r)e35744d2017-08-29 04:21:41 -07002<!--
3 ============LICENSE_START=======================================================
sebdetbfabac92021-01-06 17:24:18 +01004 ONAP POLICY-CLAMP
Determe, Sebastien (sd378r)e35744d2017-08-29 04:21:41 -07005 ================================================================================
sebdetbfabac92021-01-06 17:24:18 +01006 Copyright (C) 2017-2021 AT&T Intellectual Property. All rights
Determe, Sebastien (sd378r)e35744d2017-08-29 04:21:41 -07007 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
ChrisC6c9759e2017-08-30 01:13:58 -070012
Determe, Sebastien (sd378r)e35744d2017-08-29 04:21:41 -070013 http://www.apache.org/licenses/LICENSE-2.0
ChrisC6c9759e2017-08-30 01:13:58 -070014
Determe, Sebastien (sd378r)e35744d2017-08-29 04:21:41 -070015 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 ===================================================================
Determe, Sebastien (sd378r)e35744d2017-08-29 04:21:41 -070022-->
sebdet101193d2019-09-05 18:25:59 +020023<project xmlns="http://maven.apache.org/POM/4.0.0"
sebdet078c34d2021-01-20 23:02:17 +010024 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.policy</groupId>
28 <artifactId>clamp</artifactId>
29 <version>6.0.0-SNAPSHOT</version>
30 <name>policy-clamp</name>
ChrisC5e9feb22017-06-21 02:38:57 -070031
sebdeta5243a42019-06-13 13:48:04 +020032
sebdet025e65f2020-12-10 15:10:15 +010033 <parent>
sebdet078c34d2021-01-20 23:02:17 +010034 <groupId>org.onap.policy.parent</groupId>
35 <artifactId>integration</artifactId>
36 <version>3.3.0-SNAPSHOT</version>
37 <relativePath/>
sebdet025e65f2020-12-10 15:10:15 +010038 </parent>
Determe, Sebastien (sd378r)a66fe452017-08-08 06:42:49 -070039
sebdet078c34d2021-01-20 23:02:17 +010040 <description>
41 This is the MAVEN project that builds everything for ONAP POLICY-CLAMP.
42 Docker engine is normally requires to perfom all possible tasks (including integration tests)
Ted Humphrey01e5fde2020-01-27 18:57:39 -050043
sebdet078c34d2021-01-20 23:02:17 +010044 It can build:
45 - The ONAP POLICY-CLAMP JAR that contains CLAMP back-end code.
46 - The DOCKER images for:
47 * POLICY-CLAMP backend (Java Spring)
48 * POLICY-CLAMP frontend (Javscript React)
Determe, Sebastien (sd378r)8bf33432017-08-08 02:49:33 -070049
sebdet078c34d2021-01-20 23:02:17 +010050 It can test:
51 - The POLICY-CLAMP backend, JAVA unit testing
52 - The POLICY-CLAMP backend, JAVA integration tests (with Spring + docker mariadb database + docker policy/dcae
53 emulator written in python)
54 - The POLICY-CLAMP frontend, Javascrip tests (NodeJS(NPM) + JEST and Enzyme for React)
Ted Humphrey01e5fde2020-01-27 18:57:39 -050055
sebdet078c34d2021-01-20 23:02:17 +010056 The test coverage for dev's can be found after a "clean install" build in:
57 - Clamp backend: target/jacoco-dev.exec (unit tests + integration tests merged)
58 or separately target/coverage-reports/jacoco.exec and target/coverage-reports/jacoco-it.exec
59 - Clamp frontend: target/ui-react/coverage
Determe, Sebastien (sd378r)8bf33432017-08-08 02:49:33 -070060
sebdet078c34d2021-01-20 23:02:17 +010061 Useful mvn commands:
62 - mvn clean install: Build Clamp backend JAR + unit tests + integration tests + NPM tests (+coverage for all)
63 - mvn clean install -DskipITs=true: Build Clamp backend JAR + unit tests + NPM tests (+coverage for all), it
64 does not require a DOCKER engine
65 - mvn clean install -DskipTests -P docker: Build Clamp backend JAR + all docker images
Determe, Sebastien (sd378r)8bf33432017-08-08 02:49:33 -070066
sebdet078c34d2021-01-20 23:02:17 +010067 To start POLICY-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
Determe, Sebastien (sd378r)8bf33432017-08-08 02:49:33 -070071
sebdet078c34d2021-01-20 23:02:17 +010072 </description>
ChrisCae04cf32018-02-05 05:21:59 -080073
sebdet078c34d2021-01-20 23:02:17 +010074 <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>
Determe, Sebastien (sd378r)8bf33432017-08-08 02:49:33 -070080
sebdet078c34d2021-01-20 23:02:17 +010081 <eelf.core.version>1.0.0</eelf.core.version>
82 <camel.version>2.25.2</camel.version>
83 <springboot.version>2.2.10.RELEASE</springboot.version>
Determe, Sebastien (sd378r)8bf33432017-08-08 02:49:33 -070084
sebdet078c34d2021-01-20 23:02:17 +010085 <sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
86 <sonar.surefire.reportsPath>${project.build.directory}/surefire-reports</sonar.surefire.reportsPath>
87 <sonar.coverage.jacoco.xmlReportPaths>${project.build.directory}/jacoco-html-xml-reports/jacoco.xml
88 </sonar.coverage.jacoco.xmlReportPaths>
89 <sonar.projectVersion>${project.version}</sonar.projectVersion>
90 <sonar.log.level>DEBUG</sonar.log.level>
91 <sonar.nodejs.executable>${project.build.directory}/${ui.react.src}/node/node</sonar.nodejs.executable>
92 <sonar.verbose>true</sonar.verbose>
93 <sonar.sources>src/main,${project.build.directory}/${ui.react.src}/src</sonar.sources>
94 <sonar.exclusions>src/main/resources/**</sonar.exclusions>
95 <sonar.scm.exclusions.disabled>true</sonar.scm.exclusions.disabled>
96 <sonar.javascript.lcov.reportPaths>${project.build.directory}/${ui.react.src}/coverage/lcov.info
97 </sonar.javascript.lcov.reportPaths>
98 <sonar.coverage.exclusions>
99 src/main/resources/**,target/ui-react/src/**/*.test.js,target/ui-react/src/setupTests.js
100 </sonar.coverage.exclusions>
101 <docker.push.registry>localhost:5000</docker.push.registry>
102 <docker.pull.registry>nexus3.onap.org:10001</docker.pull.registry>
103 <docker.skip.build>true</docker.skip.build>
104 <docker.skip.push>true</docker.skip.push>
105 <docker.skip.tag>true</docker.skip.tag>
106 <skip.staging.artifacts>false</skip.staging.artifacts>
107 <python.http.proxy.param/>
108 <tomcat.version>9.0.37</tomcat.version>
109 <ui.react.src>ui-react</ui.react.src>
110 <ui.react.lib.src>ui-react-lib</ui.react.lib.src>
111 <npm.publish.url>https://nexus3.onap.org/repository/npm.snapshot/</npm.publish.url>
112 </properties>
ChrisC5e9feb22017-06-21 02:38:57 -0700113
sebdet078c34d2021-01-20 23:02:17 +0100114 <profiles>
115 <!-- BEGIN: NOT USABLE profiles, those are defined when specific flags are enabled -->
116 <profile>
117 <id>without-test</id>
118 <activation>
119 <property>
120 <name>maven.test.skip</name>
121 <value>true</value>
122 </property>
123 </activation>
124 <properties>
125 <docker.skip.run>true</docker.skip.run>
126 <docker.skip>true</docker.skip>
127 </properties>
128 </profile>
129 <profile>
130 <id>without-IT-only</id>
131 <activation>
132 <property>
133 <name>skipITs</name>
134 <value>true</value>
135 </property>
136 </activation>
137 <properties>
138 <docker.skip.run>true</docker.skip.run>
139 <docker.skip>true</docker.skip>
140 </properties>
141 </profile>
142 <profile>
143 <id>without-IT-only2</id>
144 <activation>
145 <property>
146 <name>skipTests</name>
147 <value>true</value>
148 </property>
149 </activation>
150 <properties>
151 <docker.skip.run>true</docker.skip.run>
152 <docker.skip>true</docker.skip>
153 </properties>
154 </profile>
155 <!-- END: NOT USABLE profiles, those are defined when specific flags are enabled -->
156 <profile>
157 <id>docker</id>
158 <properties>
159 <skip.staging.artifacts>true</skip.staging.artifacts>
160 <docker.skip.build>false</docker.skip.build>
161 <docker.skip.tag>false</docker.skip.tag>
162 <docker.skip.push>false</docker.skip.push>
163 <docker.skip>false</docker.skip>
164 </properties>
165 </profile>
166 </profiles>
Determe, Sebastien (sd378r)d3428d82018-06-26 15:05:55 +0200167
sebdet078c34d2021-01-20 23:02:17 +0100168 <distributionManagement>
169 <repository>
170 <id>ecomp-releases</id>
171 <name>ONAP Release Repository</name>
172 <url>https://nexus.onap.org/content/repositories/releases/</url>
173 </repository>
174 <snapshotRepository>
175 <id>ecomp-snapshots</id>
176 <name>ONAP Snapshot Repository</name>
177 <url>https://nexus.onap.org/content/repositories/snapshots/</url>
178 </snapshotRepository>
179 <site>
180 <id>ecomp-site</id>
181 <url>dav:https://nexus.onap.org/content/sites/site/org/onap/policy/clamp/${project.version}</url>
182 </site>
183 </distributionManagement>
ChrisC5e9feb22017-06-21 02:38:57 -0700184
sebdet078c34d2021-01-20 23:02:17 +0100185 <repositories>
186 <repository>
187 <id>onap-public</id>
188 <name>onap-public</name>
189 <url>https://nexus.onap.org/content/repositories/public/</url>
190 <releases>
191 <enabled>true</enabled>
192 </releases>
193 <snapshots>
194 <enabled>false</enabled>
195 </snapshots>
196 </repository>
197 <repository>
198 <id>ecomp-releases</id>
199 <name>ONAP Release Repository</name>
200 <url>https://nexus.onap.org/content/repositories/releases/</url>
201 </repository>
202 <repository>
203 <id>ecomp-staging</id>
204 <name>ONAP Staging Repository</name>
205 <url>https://nexus.onap.org/content/repositories/staging/</url>
206 </repository>
207 <repository>
208 <id>ecomp-snapshots</id>
209 <name>ONAP Snapshot Repository</name>
210 <url>https://nexus.onap.org/content/repositories/snapshots/</url>
211 <snapshots>
212 <enabled>true</enabled>
213 </snapshots>
214 <releases>
215 <enabled>false</enabled>
216 </releases>
217 </repository>
218 <repository>
219 <id>central</id>
220 <url>http://repo1.maven.org/maven2/</url>
221 </repository>
222 </repositories>
223 <pluginRepositories>
224 <pluginRepository>
225 <id>onap-public</id>
226 <name>onap-public</name>
227 <url>https://nexus.onap.org/content/repositories/public/</url>
228 <releases>
229 <enabled>true</enabled>
230 </releases>
231 <snapshots>
232 <enabled>false</enabled>
233 </snapshots>
234 </pluginRepository>
235 <pluginRepository>
236 <id>central</id>
237 <url>http://repo1.maven.org/maven2/</url>
238 </pluginRepository>
239 </pluginRepositories>
ChrisC5e9feb22017-06-21 02:38:57 -0700240
sebdet078c34d2021-01-20 23:02:17 +0100241 <dependencyManagement>
242 <dependencies>
243 <!-- Spring Boot BOM -->
244 <dependency>
245 <groupId>org.springframework.boot</groupId>
246 <artifactId>spring-boot-dependencies</artifactId>
247 <version>${springboot.version}</version>
248 <type>pom</type>
249 <scope>import</scope>
250 </dependency>
251 <!-- Camel BOM -->
252 <dependency>
253 <groupId>org.apache.camel</groupId>
254 <artifactId>camel-spring-boot-dependencies</artifactId>
255 <version>${camel.version}</version>
256 <type>pom</type>
257 <scope>import</scope>
258 </dependency>
259 </dependencies>
260 </dependencyManagement>
sebdet101193d2019-09-05 18:25:59 +0200261
sebdet078c34d2021-01-20 23:02:17 +0100262 <dependencies>
263 <dependency>
264 <groupId>com.att.eelf</groupId>
265 <artifactId>eelf-core</artifactId>
266 <version>${eelf.core.version}</version>
267 <exclusions>
268 <exclusion>
269 <groupId>org.powermock</groupId>
270 <artifactId>powermock-module-junit4</artifactId>
271 </exclusion>
272 <exclusion>
273 <groupId>org.powermock</groupId>
274 <artifactId>powermock-api-mockito</artifactId>
275 </exclusion>
276 </exclusions>
277 </dependency>
278 <dependency>
279 <groupId>org.codehaus.janino</groupId>
280 <artifactId>janino</artifactId>
281 <version>3.0.8</version>
282 </dependency>
283 <dependency>
284 <groupId>org.apache.tomcat.embed</groupId>
285 <artifactId>tomcat-embed-core</artifactId>
286 <version>${tomcat.version}</version>
287 </dependency>
288 <dependency>
289 <groupId>org.apache.tomcat.embed</groupId>
290 <artifactId>tomcat-embed-el</artifactId>
291 <version>${tomcat.version}</version>
292 </dependency>
293 <dependency>
294 <groupId>org.apache.tomcat.embed</groupId>
295 <artifactId>tomcat-embed-websocket</artifactId>
296 <version>${tomcat.version}</version>
297 </dependency>
298 <dependency>
299 <groupId>org.apache.tomcat</groupId>
300 <artifactId>tomcat-annotations-api</artifactId>
301 <version>${tomcat.version}</version>
302 </dependency>
303 <!-- For CAMEL -->
304 <dependency>
305 <groupId>org.apache.camel</groupId>
306 <artifactId>camel-http4-starter</artifactId>
307 </dependency>
308 <dependency>
309 <groupId>org.apache.camel</groupId>
310 <artifactId>camel-spring-boot-starter</artifactId>
311 </dependency>
312 <dependency>
313 <groupId>org.apache.camel</groupId>
314 <artifactId>camel-jaxb-starter</artifactId>
315 </dependency>
316 <dependency>
317 <groupId>org.apache.camel</groupId>
318 <artifactId>camel-servlet-starter</artifactId>
319 </dependency>
320 <dependency>
321 <groupId>org.apache.camel</groupId>
322 <artifactId>camel-gson-starter</artifactId>
323 </dependency>
324 <dependency>
325 <groupId>org.apache.camel</groupId>
326 <artifactId>camel-swagger-java-starter</artifactId>
327 <exclusions>
328 <exclusion>
329 <groupId>javax.ws.rs</groupId>
330 <artifactId>jsr311-api</artifactId>
331 </exclusion>
332 <exclusion>
333 <groupId>org.slf4j</groupId>
334 <artifactId>slf4j-ext</artifactId>
335 </exclusion>
336 </exclusions>
337 </dependency>
338 <!-- Spring famework -->
339 <dependency>
340 <groupId>org.springframework.boot</groupId>
341 <artifactId>spring-boot-starter-web</artifactId>
342 <exclusions>
343 <exclusion>
344 <groupId>org.springframework.boot</groupId>
345 <artifactId>spring-boot-starter-json</artifactId>
346 </exclusion>
347 </exclusions>
348 </dependency>
349 <dependency>
350 <groupId>org.springframework.boot</groupId>
351 <artifactId>spring-boot-starter-tomcat</artifactId>
352 </dependency>
353 <dependency>
354 <groupId>org.springframework</groupId>
355 <artifactId>spring-jdbc</artifactId>
356 </dependency>
357 <dependency>
358 <groupId>org.springframework.boot</groupId>
359 <artifactId>spring-boot-starter-security</artifactId>
360 </dependency>
361 <dependency>
362 <groupId>org.springframework.boot</groupId>
363 <artifactId>spring-boot-autoconfigure</artifactId>
364 </dependency>
365 <dependency>
366 <groupId>org.springframework.boot</groupId>
367 <artifactId>spring-boot-starter-test</artifactId>
368 <scope>test</scope>
369 <exclusions>
370 <exclusion>
371 <groupId>com.vaadin.external.google</groupId>
372 <artifactId>android-json</artifactId>
373 </exclusion>
374 </exclusions>
375 </dependency>
376 <dependency>
377 <groupId>org.springframework.boot</groupId>
378 <artifactId>spring-boot-starter-data-jpa</artifactId>
379 </dependency>
380 <!-- Policy dependencies mainly for the models required -->
381 <dependency>
382 <groupId>org.onap.policy.models</groupId>
383 <artifactId>policy-models-pdp</artifactId>
384 <version>2.3.5</version>
385 </dependency>
sebdet5ec88e42020-08-03 15:25:07 +0200386
sebdet078c34d2021-01-20 23:02:17 +0100387 <!-- Others dependencies -->
388 <!-- Jaxws is required for AAF -->
389 <dependency>
390 <groupId>javax.xml.ws</groupId>
391 <artifactId>jaxws-api</artifactId>
392 <version>2.3.1</version>
393 </dependency>
394 <dependency>
395 <groupId>org.onap.aaf.authz</groupId>
396 <artifactId>aaf-cadi-aaf</artifactId>
397 <version>2.1.15</version>
398 <exclusions>
399 <exclusion>
400 <groupId>javax.servlet</groupId>
401 <artifactId>servlet-api</artifactId>
402 </exclusion>
403 <exclusion>
404 <groupId>log4j</groupId>
405 <artifactId>log4j</artifactId>
406 </exclusion>
407 </exclusions>
408 </dependency>
409 <dependency>
410 <groupId>ch.qos.logback</groupId>
411 <artifactId>logback-core</artifactId>
412 <version>1.2.3</version>
413 </dependency>
414 <dependency>
415 <groupId>ch.qos.logback</groupId>
416 <artifactId>logback-classic</artifactId>
417 <version>1.2.3</version>
418 </dependency>
419 <dependency>
420 <groupId>commons-io</groupId>
421 <artifactId>commons-io</artifactId>
422 <version>2.6</version>
423 </dependency>
424 <dependency>
425 <groupId>com.googlecode.json-simple</groupId>
426 <artifactId>json-simple</artifactId>
427 <version>1.1.1</version>
428 </dependency>
429 <dependency>
430 <groupId>org.apache.commons</groupId>
431 <artifactId>commons-vfs2</artifactId>
432 <version>2.2</version>
433 </dependency>
434 <dependency>
435 <groupId>org.slf4j</groupId>
436 <artifactId>slf4j-api</artifactId>
437 </dependency>
438 <dependency>
439 <groupId>javax.transaction</groupId>
440 <artifactId>jta</artifactId>
441 <version>1.1</version>
442 </dependency>
443 <dependency>
444 <groupId>javax.persistence</groupId>
445 <artifactId>persistence-api</artifactId>
446 <version>1.0.2</version>
447 </dependency>
448 <!-- Other dependencies to fix nexus IQ reported vulnerabilities -->
449 <dependency>
450 <groupId>commons-codec</groupId>
451 <artifactId>commons-codec</artifactId>
452 <version>1.14</version>
453 </dependency>
454 <dependency>
455 <groupId>org.springframework.security</groupId>
456 <artifactId>spring-security-web</artifactId>
457 <version>5.2.3.RELEASE</version>
458 </dependency>
459 <dependency>
460 <groupId>org.codehaus.plexus</groupId>
461 <artifactId>plexus-utils</artifactId>
462 <version>3.0.24</version>
463 </dependency>
464 <dependency>
465 <groupId>org.jboss.spec.javax.ws.rs</groupId>
466 <artifactId>jboss-jaxrs-api_2.0_spec</artifactId>
467 <version>1.0.1.Final</version>
468 </dependency>
469 <dependency>
470 <groupId>com.google.guava</groupId>
471 <artifactId>guava</artifactId>
472 <version>27.0-jre</version>
473 </dependency>
sebdet3b017732020-04-20 15:30:45 +0200474
sebdet078c34d2021-01-20 23:02:17 +0100475 <!-- Remove the MYSQL connector and replace it by Mariadb -->
476 <dependency>
477 <groupId>org.mariadb.jdbc</groupId>
478 <artifactId>mariadb-java-client</artifactId>
479 <version>2.6.2</version>
480 </dependency>
481 <!-- For SDC Controller -->
482 <dependency>
483 <groupId>org.onap.sdc.sdc-distribution-client</groupId>
484 <artifactId>sdc-distribution-client</artifactId>
485 <version>1.4.1</version>
486 </dependency>
487 <dependency>
488 <groupId>org.onap.sdc.sdc-tosca</groupId>
489 <artifactId>sdc-tosca</artifactId>
490 <version>1.5.1</version>
491 <exclusions>
492 <exclusion>
493 <groupId>com.fasterxml.jackson.core</groupId>
494 <artifactId>jackson-databind</artifactId>
495 </exclusion>
496 </exclusions>
497 </dependency>
498 <dependency>
499 <groupId>org.yaml</groupId>
500 <artifactId>snakeyaml</artifactId>
501 <version>1.26</version>
502 </dependency>
503 <dependency>
504 <groupId>org.dom4j</groupId>
505 <artifactId>dom4j</artifactId>
506 <version>2.1.3</version>
507 </dependency>
sebdet101193d2019-09-05 18:25:59 +0200508
sebdet078c34d2021-01-20 23:02:17 +0100509 <!-- TESTING -->
510 <dependency>
511 <groupId>junit</groupId>
512 <artifactId>junit</artifactId>
513 <scope>test</scope>
514 </dependency>
515 <dependency>
516 <groupId>org.assertj</groupId>
517 <artifactId>assertj-core</artifactId>
518 <version>3.10.0</version>
519 <scope>test</scope>
520 </dependency>
521 <dependency>
522 <groupId>org.mockito</groupId>
523 <artifactId>mockito-core</artifactId>
524 <version>2.28.2</version>
525 <scope>test</scope>
526 </dependency>
527 <dependency>
528 <groupId>org.powermock</groupId>
529 <artifactId>powermock-api-mockito2</artifactId>
530 <version>2.0.4</version>
531 <scope>test</scope>
532 </dependency>
533 <dependency>
534 <groupId>org.powermock</groupId>
535 <artifactId>powermock-module-junit4</artifactId>
536 <version>2.0.4</version>
537 <scope>test</scope>
538 </dependency>
539 <dependency>
540 <groupId>com.github.docker-java</groupId>
541 <artifactId>docker-java-core</artifactId>
542 <version>3.2.1</version>
543 <scope>test</scope>
544 <exclusions>
545 <exclusion>
546 <groupId>com.fasterxml.jackson.core</groupId>
547 <artifactId>jackson-databind</artifactId>
548 </exclusion>
549 </exclusions>
550 </dependency>
551 <dependency>
552 <groupId>com.github.docker-java</groupId>
553 <artifactId>docker-java</artifactId>
554 <version>3.2.1</version>
555 <scope>test</scope>
556 </dependency>
557 </dependencies>
sebdet101193d2019-09-05 18:25:59 +0200558
sebdet078c34d2021-01-20 23:02:17 +0100559 <build>
560 <finalName>policy-clamp-backend</finalName>
sebdet101193d2019-09-05 18:25:59 +0200561
sebdet078c34d2021-01-20 23:02:17 +0100562 <testResources>
563 <testResource>
564 <directory>src/main/resources</directory>
565 <filtering>true</filtering>
566 <excludes>
567 <exclude>clds/aaf/**</exclude>
568 </excludes>
569 </testResource>
570 <testResource>
571 <directory>src/main/resources</directory>
572 <filtering>false</filtering>
573 <includes>
574 <include>clds/aaf/**</include>
575 </includes>
576 </testResource>
577 <testResource>
578 <directory>src/test/resources</directory>
579 <excludes>
580 <exclude>**/*.jks</exclude>
581 <exclude>**/*.csar</exclude>
582 </excludes>
583 <filtering>true</filtering>
584 </testResource>
585 <testResource>
586 <directory>src/test/resources/https</directory>
587 <includes>
588 <include>**.jks</include>
589 </includes>
590 <filtering>false</filtering>
591 <targetPath>https</targetPath>
592 </testResource>
593 <testResource>
594 <directory>src/test/resources/example/sdc</directory>
595 <includes>
596 <include>**.csar</include>
597 </includes>
598 <filtering>false</filtering>
599 <targetPath>example/sdc</targetPath>
600 </testResource>
601 </testResources>
602 <resources>
603 <!-- For AAF folder maven should not try to filter Keystores/Truststores ... Otherwise
604 they will be broken and unreadable -->
605 <resource>
606 <directory>src/main/resources</directory>
607 <filtering>true</filtering>
608 <excludes>
609 <exclude>clds/aaf/**</exclude>
610 </excludes>
611 </resource>
612 <resource>
613 <directory>src/main/resources</directory>
614 <filtering>false</filtering>
615 <includes>
616 <include>clds/aaf/**</include>
617 </includes>
618 </resource>
619 <resource>
620 <directory>${ui.react.src}</directory>
621 <excludes>
622 <exclude>node_modules</exclude>
623 </excludes>
624 <includes>
625 <include>src/**</include>
626 <include>public/**</include>
627 <include>package.json</include>
628 <include>package-lock.json</include>
629 </includes>
630 <filtering>true</filtering>
631 <targetPath>${project.build.directory}/${ui.react.src}</targetPath>
632 </resource>
633 <resource>
634 <directory>${ui.react.src}</directory>
635 <includes>
636 <include>src/**</include>
637 </includes>
638 <excludes>
639 <exclude>**/__snapshots__/**</exclude>
640 <exclude>**/**.test.js</exclude>
641 </excludes>
642 <filtering>true</filtering>
643 <targetPath>${project.build.directory}/${ui.react.lib.src}</targetPath>
644 </resource>
645 <resource>
646 <directory>${ui.react.lib.src}</directory>
647 <includes>
648 <include>**</include>
649 </includes>
650 <excludes>
651 <exclude>node_modules/**</exclude>
652 <exclude>package-lock.json</exclude>
653 </excludes>
654 <filtering>true</filtering>
655 <targetPath>${project.build.directory}/${ui.react.lib.src}</targetPath>
656 </resource>
657 </resources>
sebdet101193d2019-09-05 18:25:59 +0200658
sebdet078c34d2021-01-20 23:02:17 +0100659 <plugins>
660 <plugin>
661 <groupId>de.jpdigital</groupId>
662 <artifactId>hibernate52-ddl-maven-plugin</artifactId>
663 <version>2.2.0</version>
664 <dependencies>
665 <dependency>
666 <groupId>javax.xml.bind</groupId>
667 <artifactId>jaxb-api</artifactId>
668 <version>2.3.0</version>
669 </dependency>
670 </dependencies>
671 <executions>
672 <execution>
673 <phase>process-classes</phase>
674 <goals>
675 <goal>gen-ddl</goal>
676 </goals>
677 <configuration>
678 <packages>
679 <param>org.onap.policy.clamp</param>
680 </packages>
681 <dialects>
682 <param>MARIADB53</param>
683 </dialects>
684 <outputDirectory>${project.basedir}/extra/sql/bulkload/</outputDirectory>
685 <outputFileNameSuffix>create-tables</outputFileNameSuffix>
686 <!-- <createDropStatements>true</createDropStatements> -->
687 <omitDialectFromFileName>true</omitDialectFromFileName>
688 </configuration>
689 </execution>
690 </executions>
sebdet101193d2019-09-05 18:25:59 +0200691
sebdet078c34d2021-01-20 23:02:17 +0100692 </plugin>
693 <!-- Read the swagger.json file and the definition from SwaggerConfig.java; generate
694 a list of .adoc files containing the APIs info in more structured way -->
695 <plugin>
696 <groupId>io.github.swagger2markup</groupId>
697 <artifactId>swagger2markup-maven-plugin</artifactId>
698 <version>1.3.3</version>
699 <dependencies>
700 <dependency>
701 <groupId>io.github.swagger2markup</groupId>
702 <artifactId>swagger2markup-import-files-ext</artifactId>
703 <version>1.3.3</version>
704 </dependency>
705 <dependency>
706 <groupId>io.github.swagger2markup</groupId>
707 <artifactId>swagger2markup-spring-restdocs-ext</artifactId>
708 <version>1.3.3</version>
709 </dependency>
710 </dependencies>
711 <configuration>
712 <swaggerInput>${project.basedir}/docs/swagger/swagger.json</swaggerInput>
713 <outputDir>${project.build.directory}/asciidoc/generated</outputDir>
714 <config>
715 <swagger2markup.markupLanguage>ASCIIDOC</swagger2markup.markupLanguage>
716 </config>
717 </configuration>
718 <executions>
719 <execution>
720 <phase>post-integration-test</phase>
721 <goals>
722 <goal>convertSwagger2markup</goal>
723 </goals>
724 </execution>
725 </executions>
726 </plugin>
sebdet101193d2019-09-05 18:25:59 +0200727
sebdet078c34d2021-01-20 23:02:17 +0100728 <!-- Run the generated asciidoc through Asciidoctor to generate other documentation
729 types, such as PDFs or HTML5 -->
730 <plugin>
731 <groupId>org.asciidoctor</groupId>
732 <artifactId>asciidoctor-maven-plugin</artifactId>
733 <version>1.5.7.1</version>
734 <dependencies>
735 <dependency>
736 <groupId>org.asciidoctor</groupId>
737 <artifactId>asciidoctorj-pdf</artifactId>
738 <version>1.5.0-alpha.10.1</version>
739 </dependency>
740 </dependencies>
741 <configuration>
742 <sourceDirectory>${project.basedir}/src/main/resources/asciidoc</sourceDirectory>
743 <sourceDocumentName>swagger.adoc</sourceDocumentName>
744 <attributes>
745 <doctype>book</doctype>
746 <toc>left</toc>
747 <toclevels>3</toclevels>
748 <numbered/>
749 <hardbreaks/>
750 <sectlinks/>
751 <sectanchors/>
752 <generated>${project.build.directory}/asciidoc/generated</generated>
753 </attributes>
754 </configuration>
sebdet101193d2019-09-05 18:25:59 +0200755
sebdet078c34d2021-01-20 23:02:17 +0100756 <executions>
757 <execution>
758 <id>output-html</id>
759 <phase>post-integration-test</phase>
760 <goals>
761 <goal>process-asciidoc</goal>
762 </goals>
763 <configuration>
764 <backend>html5</backend>
765 <outputDirectory>${project.basedir}/docs/swagger</outputDirectory>
766 <outputDirectory>${project.basedir}/src/main/resources/META-INF/resources/</outputDirectory>
767 </configuration>
768 </execution>
769 <execution>
770 <id>output-pdf</id>
771 <phase>post-integration-test</phase>
772 <goals>
773 <goal>process-asciidoc</goal>
774 </goals>
775 <configuration>
776 <backend>pdf</backend>
777 <outputDirectory>${project.basedir}/docs/swagger</outputDirectory>
778 </configuration>
779 </execution>
780 </executions>
781 </plugin>
782 <plugin>
783 <groupId>org.codehaus.groovy.maven</groupId>
784 <artifactId>gmaven-plugin</artifactId>
785 <version>1.0</version>
786 <executions>
787 <execution>
788 <id>docker-tags</id>
789 <phase>validate</phase>
790 <goals>
791 <goal>execute</goal>
792 </goals>
793 <configuration>
794 <source>${project.basedir}/src/main/script/TagVersion.groovy</source>
795 </configuration>
796 </execution>
797 <execution>
798 <id>npm-repos-selection</id>
799 <phase>validate</phase>
800 <goals>
801 <goal>execute</goal>
802 </goals>
803 <configuration>
804 <source>${project.basedir}/src/main/script/SelectNpmRepo.groovy</source>
805 </configuration>
806 </execution>
807 </executions>
808 </plugin>
809 <plugin>
810 <groupId>org.apache.maven.plugins</groupId>
811 <artifactId>maven-jar-plugin</artifactId>
812 <version>3.0.2</version>
813 <executions>
814 <execution>
815 <id>jar-with-only-classes</id>
816 <phase>package</phase>
817 <goals>
818 <goal>jar</goal>
819 </goals>
820 <configuration>
821 <classifier>classes</classifier>
822 <includes>
823 <include>org/**</include>
824 </includes>
825 </configuration>
826 </execution>
827 </executions>
828 </plugin>
829 <plugin>
830 <groupId>org.codehaus.mojo</groupId>
831 <artifactId>build-helper-maven-plugin</artifactId>
832 <version>3.0.0</version>
833 <executions>
834 <execution>
835 <goals>
836 <goal>attach-artifact</goal>
837 </goals>
838 <phase>package</phase>
839 <configuration>
840 <artifacts>
841 <artifact>
842 <file>${project.build.directory}/policy-clamp-backend-classes.jar</file>
843 <type>jar</type>
844 <classifier>classes</classifier>
845 </artifact>
846 </artifacts>
847 </configuration>
848 </execution>
849 <execution>
850 <id>reserve-port-for-tests</id>
851 <phase>process-resources</phase>
852 <goals>
853 <goal>reserve-network-port</goal>
854 </goals>
855 <configuration>
856 <portNames>
857 <portName>docker.mariadb.port.host</portName>
858 <portName>docker.http-cache.port.host</portName>
859 <portName>clamp.it.tests.http-redirected</portName>
860 <portName>clamp.it.tests.robotframework.http</portName>
861 <portName>clamp.it.tests.https</portName>
862 <portName>clamp.it.tests.http</portName>
863 </portNames>
864 </configuration>
865 </execution>
866 </executions>
867 </plugin>
sebdet101193d2019-09-05 18:25:59 +0200868
sebdet078c34d2021-01-20 23:02:17 +0100869 <plugin>
870 <groupId>org.springframework.boot</groupId>
871 <artifactId>spring-boot-maven-plugin</artifactId>
872 <version>${springboot.version}</version>
873 <executions>
874 <execution>
875 <goals>
876 <goal>repackage</goal>
877 </goals>
878 <phase>package</phase>
879 </execution>
880 </executions>
881 </plugin>
882 <plugin>
883 <groupId>org.apache.maven.plugins</groupId>
884 <artifactId>maven-surefire-plugin</artifactId>
885 <version>2.22.2</version>
886 <configuration>
887 <forkCount>1C</forkCount>
888 <reuseForks>true</reuseForks>
889 <useSystemClassLoader>false</useSystemClassLoader>
890 <argLine>${surefireArgLine}</argLine>
891 </configuration>
892 </plugin>
sebdet101193d2019-09-05 18:25:59 +0200893
sebdet078c34d2021-01-20 23:02:17 +0100894 <plugin>
895 <groupId>org.apache.maven.plugins</groupId>
896 <artifactId>maven-failsafe-plugin</artifactId>
897 <version>2.22.2</version>
898 <executions>
899 <execution>
900 <id>integration-tests</id>
901 <goals>
902 <goal>integration-test</goal>
903 <goal>verify</goal>
904 </goals>
905 <configuration>
906 <additionalClasspathElements>
907 <additionalClasspathElement>${project.build.directory}/classes
908 </additionalClasspathElement>
909 </additionalClasspathElements>
910 <includes>
911 <include>**/*ItCase.java</include>
912 </includes>
913 <forkCount>1C</forkCount>
914 <reuseForks>true</reuseForks>
915 <useSystemClassLoader>false</useSystemClassLoader>
916 <argLine>${failsafeArgLine}</argLine>
917 </configuration>
918 </execution>
919 </executions>
920 </plugin>
921 <plugin>
922 <groupId>io.fabric8</groupId>
923 <artifactId>docker-maven-plugin</artifactId>
924 <version>0.31.0</version>
925 <dependencies>
926 <dependency>
927 <groupId>org.apache.httpcomponents</groupId>
928 <artifactId>httpclient</artifactId>
929 <version>4.5.5</version>
930 </dependency>
931 </dependencies>
932 <configuration>
933 <verbose>true</verbose>
934 <apiVersion>1.35</apiVersion>
935 <images>
936 <image>
937 <name>docker.io/mariadb:10.5.4</name>
938 <alias>mariadb</alias>
939 <run>
940 <env>
941 <MYSQL_ROOT_PASSWORD>strong_pitchou</MYSQL_ROOT_PASSWORD>
942 </env>
943 <hostname>mariadb</hostname>
944 <volumes>
945 <bind>
946 <volume>${project.basedir}/extra/sql/:/docker-entrypoint-initdb.d:rw</volume>
947 <volume>${project.basedir}/extra/docker/mariadb/conf1:/etc/mysql/conf.d</volume>
948 </bind>
949 </volumes>
950 <wait>
951 <log>socket: '/run/mysqld/mysqld.sock'</log>
952 <time>300000</time>
953 <exec>
954 <preStop>/docker-entrypoint-initdb.d/dump/backup-data-only.sh</preStop>
955 </exec>
956 </wait>
957 <ports>
958 <port>${docker.mariadb.port.host}:3306</port>
959 </ports>
960 <network>
961 <mode>bridge</mode>
962 </network>
963 </run>
964 </image>
965 <image>
966 <name>docker.io/python:2-slim</name>
967 <alias>python</alias>
968 <run>
969 <hostname>python</hostname>
970 <volumes>
971 <bind>
972 <volume>
973 ${project.basedir}/src/test/resources/http-cache/:/usr/src/http-cache-app
974 </volume>
975 <volume>
976 ${project.basedir}/src/test/resources/http-cache/example/:/usr/src/http-cache-app/data-cache
977 </volume>
978 </bind>
979 </volumes>
980 <wait>
981 <tcp>
982 <ports>
983 <port>8080</port>
984 </ports>
985 <mode>direct</mode>
986 </tcp>
987 <time>120000</time>
988 </wait>
989 <ports>
990 <port>${docker.http-cache.port.host}:8080</port>
991 </ports>
992 <workingDir>/usr/src/http-cache-app</workingDir>
993 <cmd>
994 <shell>./start_http_cache.sh ${python.http.proxy.param}
995 --python_proxyaddress=localhost:${docker.http-cache.port.host}
996 </shell>
997 </cmd>
998 <network>
999 <mode>bridge</mode>
1000 </network>
1001 </run>
1002 </image>
1003 <image>
1004 <name>onap/policy-clamp-backend</name>
1005 <alias>onap-policy-clamp-backend</alias>
1006 <run>
1007 <skip>true</skip>
1008 </run>
1009 <build>
1010 <cleanup>true</cleanup>
1011 <tags>
1012 <tag>latest</tag>
1013 <tag>${project.docker.latesttagtimestamp.version}</tag>
1014 <tag>${project.docker.latesttag.version}</tag>
1015 </tags>
1016 <!-- A relative path is looked up in ${project.basedir}/src/main/docker by
1017 default -->
1018 <dockerFile>backend/Dockerfile</dockerFile>
1019 <assembly>
1020 <descriptor>backend/backend-files.xml</descriptor>
1021 <name>onap-policy-clamp-backend</name>
1022 </assembly>
1023 </build>
1024 </image>
1025 <image>
1026 <name>onap/policy-clamp-frontend</name>
1027 <alias>onap-policy-clamp-frontend</alias>
1028 <run>
1029 <skip>true</skip>
1030 </run>
1031 <build>
1032 <cleanup>true</cleanup>
1033 <tags>
1034 <tag>latest</tag>
1035 <tag>${project.docker.latesttagtimestamp.version}</tag>
1036 <tag>${project.docker.latesttag.version}</tag>
1037 </tags>
1038 <!-- A relative path is looked up in ${project.basedir}/src/main/docker by
1039 default -->
1040 <dockerFile>frontend/Dockerfile</dockerFile>
1041 <assembly>
1042 <descriptor>frontend/frontend-files.xml</descriptor>
1043 <name>onap-policy-clamp-frontend</name>
1044 </assembly>
1045 </build>
1046 </image>
1047 </images>
1048 </configuration>
sebdet101193d2019-09-05 18:25:59 +02001049
sebdet078c34d2021-01-20 23:02:17 +01001050 <executions>
1051 <execution>
1052 <id>generate-images</id>
1053 <phase>install</phase>
1054 <goals>
1055 <goal>build</goal>
1056 </goals>
1057 </execution>
1058 <execution>
1059 <id>push-images</id>
1060 <phase>deploy</phase>
1061 <goals>
1062 <goal>push</goal>
1063 </goals>
1064 </execution>
1065 <execution>
1066 <id>docker-start-for-it</id>
1067 <phase>pre-integration-test</phase>
1068 <goals>
1069 <goal>start</goal>
1070 </goals>
1071 </execution>
1072 <execution>
1073 <id>docker-stop-for-it</id>
1074 <phase>post-integration-test</phase>
1075 <goals>
1076 <goal>stop</goal>
1077 </goals>
1078 </execution>
1079 </executions>
1080 </plugin>
sebdet101193d2019-09-05 18:25:59 +02001081
sebdet078c34d2021-01-20 23:02:17 +01001082 <plugin>
1083 <groupId>org.jacoco</groupId>
1084 <artifactId>jacoco-maven-plugin</artifactId>
1085 <version>0.8.5</version>
1086 <configuration>
1087 <dumpOnExit>true</dumpOnExit>
1088 <append>true</append>
1089 <includes>
1090 <include>org/onap/policy/clamp/**</include>
1091 </includes>
1092 </configuration>
1093 <executions>
1094 <execution>
1095 <id>pre-unit-test</id>
1096 <goals>
1097 <goal>prepare-agent</goal>
1098 </goals>
1099 <configuration>
1100 <destFile>${project.build.directory}/coverage-reports/jacoco.exec</destFile>
1101 <propertyName>surefireArgLine</propertyName>
1102 <!-- <append>true</append> -->
1103 </configuration>
1104 </execution>
1105 <execution>
1106 <id>pre-integration-test</id>
1107 <phase>pre-integration-test</phase>
1108 <goals>
1109 <goal>prepare-agent</goal>
1110 </goals>
1111 <configuration>
1112 <destFile>${project.build.directory}/coverage-reports/jacoco-it.exec</destFile>
1113 <propertyName>failsafeArgLine</propertyName>
1114 <!-- <append>true</append> -->
1115 <!-- Need to overwrite the policy integration parent flag -->
1116 <skip>false</skip>
1117 </configuration>
1118 </execution>
1119 <execution>
1120 <goals>
1121 <goal>merge</goal>
1122 </goals>
1123 <phase>post-integration-test</phase>
1124 <configuration>
1125 <fileSets>
1126 <fileSet
1127 implementation="org.apache.maven.shared.model.fileset.FileSet">
1128 <directory>${project.build.directory}/coverage-reports</directory>
1129 <includes>
1130 <include>*.exec</include>
1131 </includes>
1132 </fileSet>
1133 </fileSets>
1134 <destFile>${project.build.directory}/jacoco.exec</destFile>
1135 </configuration>
1136 </execution>
1137 <execution>
1138 <id>report-xml</id>
1139 <goals>
1140 <goal>report</goal>
1141 </goals>
1142 <configuration>
1143 <!-- Setting explicit path, so that we remember where it picks them up from -->
1144 <dataFile>${project.build.directory}/jacoco.exec</dataFile>
1145 <outputDirectory>${project.build.directory}/jacoco-html-xml-reports</outputDirectory>
1146 </configuration>
1147 </execution>
1148 </executions>
1149 </plugin>
sebdet101193d2019-09-05 18:25:59 +02001150
sebdet078c34d2021-01-20 23:02:17 +01001151 <!-- This plugin will be useful when we will have multi-modules project -->
1152 <plugin>
1153 <groupId>org.codehaus.mojo</groupId>
1154 <artifactId>versions-maven-plugin</artifactId>
1155 <version>1.3.1</version>
1156 </plugin>
1157
1158 <plugin>
1159 <groupId>com.github.eirslett</groupId>
1160 <artifactId>frontend-maven-plugin</artifactId>
1161 <version>1.8.0</version>
1162 <configuration>
1163 <installDirectory>${project.build.directory}/${ui.react.src}</installDirectory>
1164 </configuration>
1165 <executions>
1166 <execution>
1167 <id>install_node_and_npm</id>
1168 <goals>
1169 <goal>install-node-and-npm</goal>
1170 </goals>
1171 <phase>generate-sources</phase>
1172 <configuration>
1173 <nodeVersion>v12.13.0</nodeVersion>
1174 <npmVersion>6.13.0</npmVersion>
1175 </configuration>
1176 </execution>
1177 <execution>
1178 <id>npm_install</id>
1179 <goals>
1180 <goal>npm</goal>
1181 </goals>
1182 <phase>compile</phase>
1183 <configuration>
1184 <workingDirectory>${project.build.directory}/${ui.react.src}</workingDirectory>
1185 <arguments>install</arguments>
1186 </configuration>
1187 </execution>
1188 <execution>
1189 <id>npm_test</id>
1190 <goals>
1191 <goal>npm</goal>
1192 </goals>
1193 <phase>test</phase>
1194 <configuration>
1195 <skip>${maven.test.skip}</skip>
1196 <arguments>run-script test:coverage</arguments>
1197 <workingDirectory>${project.build.directory}/${ui.react.src}</workingDirectory>
1198 </configuration>
1199 </execution>
1200 <execution>
1201 <id>npm_install_lib</id>
1202 <goals>
1203 <goal>npm</goal>
1204 </goals>
1205 <phase>deploy</phase>
1206 <configuration>
1207 <workingDirectory>${project.build.directory}/${ui.react.lib.src}</workingDirectory>
1208 <arguments>install</arguments>
1209 </configuration>
1210 </execution>
1211 <execution>
1212 <id>npm_build_lib</id>
1213 <goals>
1214 <goal>npm</goal>
1215 </goals>
1216 <phase>deploy</phase>
1217 <configuration>
1218 <workingDirectory>${project.build.directory}/${ui.react.lib.src}</workingDirectory>
1219 <arguments>run build</arguments>
1220 </configuration>
1221 </execution>
1222 <execution>
1223 <id>npm_publish</id>
1224 <goals>
1225 <goal>npm</goal>
1226 </goals>
1227 <phase>deploy</phase>
1228 <configuration>
1229 <workingDirectory>${project.build.directory}/${ui.react.lib.src}</workingDirectory>
1230 <arguments>publish</arguments>
1231 </configuration>
1232 </execution>
1233 </executions>
1234 </plugin>
1235 <plugin>
1236 <groupId>org.apache.maven.plugins</groupId>
1237 <artifactId>maven-compiler-plugin</artifactId>
1238 <version>3.8.1</version>
1239 <configuration>
1240 <source>11</source>
1241 <target>11</target>
1242 </configuration>
1243 </plugin>
1244 <plugin>
1245 <groupId>org.sonarsource.scanner.maven</groupId>
1246 <artifactId>sonar-maven-plugin</artifactId>
1247 <version>3.7.0.1746</version>
1248 </plugin>
Ted Humphreyfd8f0132020-06-02 09:39:30 -04001249 <plugin>
1250 <groupId>org.codehaus.mojo</groupId>
1251 <artifactId>exec-maven-plugin</artifactId>
sebdet078c34d2021-01-20 23:02:17 +01001252 <version>1.3.2</version>
1253 <executions>
Ted Humphreyfd8f0132020-06-02 09:39:30 -04001254 <execution>
1255 <id>libIndexCheck</id>
1256 <phase>validate</phase>
1257 <goals>
1258 <goal>exec</goal>
1259 </goals>
1260 </execution>
1261 </executions>
1262 <configuration>
1263 <executable>bash</executable>
1264 <arguments>
1265 <argument>${project.basedir}/src/main/script/checkLibIndex.sh</argument>
1266 </arguments>
1267 </configuration>
sebdet078c34d2021-01-20 23:02:17 +01001268 </plugin>
1269 </plugins>
1270 </build>
ChrisC5e9feb22017-06-21 02:38:57 -07001271</project>