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