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