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> |
| 30 | <version>6.1.2-SNAPSHOT</version> |
| 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 --> |
| 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> |
| 665 | <forkCount>1C</forkCount> |
| 666 | <reuseForks>true</reuseForks> |
| 667 | <useSystemClassLoader>false</useSystemClassLoader> |
| 668 | <argLine>${surefireArgLine}</argLine> |
| 669 | </configuration> |
| 670 | </plugin> |
| 671 | |
| 672 | <plugin> |
| 673 | <groupId>org.apache.maven.plugins</groupId> |
| 674 | <artifactId>maven-failsafe-plugin</artifactId> |
Sirisha_Manchikanti | f83411a | 2021-05-07 15:17:52 +0100 | [diff] [blame] | 675 | <executions> |
| 676 | <execution> |
| 677 | <id>integration-tests</id> |
| 678 | <goals> |
| 679 | <goal>integration-test</goal> |
| 680 | <goal>verify</goal> |
| 681 | </goals> |
| 682 | <configuration> |
| 683 | <additionalClasspathElements> |
| 684 | <additionalClasspathElement>${project.build.directory}/classes |
| 685 | </additionalClasspathElement> |
| 686 | </additionalClasspathElements> |
| 687 | <includes> |
| 688 | <include>**/*ItCase.java</include> |
| 689 | </includes> |
| 690 | <forkCount>1C</forkCount> |
| 691 | <reuseForks>true</reuseForks> |
| 692 | <useSystemClassLoader>false</useSystemClassLoader> |
| 693 | <argLine>${failsafeArgLine}</argLine> |
| 694 | </configuration> |
| 695 | </execution> |
| 696 | </executions> |
| 697 | </plugin> |
| 698 | <plugin> |
| 699 | <groupId>io.fabric8</groupId> |
| 700 | <artifactId>docker-maven-plugin</artifactId> |
Sirisha_Manchikanti | f83411a | 2021-05-07 15:17:52 +0100 | [diff] [blame] | 701 | <dependencies> |
| 702 | <dependency> |
| 703 | <groupId>org.apache.httpcomponents</groupId> |
| 704 | <artifactId>httpclient</artifactId> |
| 705 | <version>4.5.5</version> |
| 706 | </dependency> |
| 707 | </dependencies> |
| 708 | <configuration> |
| 709 | <verbose>true</verbose> |
| 710 | <apiVersion>1.35</apiVersion> |
| 711 | <images> |
| 712 | <image> |
| 713 | <name>docker.io/mariadb:10.5.4</name> |
| 714 | <alias>mariadb</alias> |
| 715 | <run> |
| 716 | <env> |
| 717 | <MYSQL_ROOT_PASSWORD>strong_pitchou</MYSQL_ROOT_PASSWORD> |
| 718 | </env> |
| 719 | <hostname>mariadb</hostname> |
| 720 | <volumes> |
| 721 | <bind> |
| 722 | <volume>${project.basedir}/extra/sql/:/docker-entrypoint-initdb.d:rw</volume> |
| 723 | <volume>${project.basedir}/extra/docker/mariadb/conf1:/etc/mysql/conf.d</volume> |
| 724 | </bind> |
| 725 | </volumes> |
| 726 | <wait> |
| 727 | <log>port: 3306</log> |
| 728 | <time>300000</time> |
| 729 | <exec> |
| 730 | <preStop>/docker-entrypoint-initdb.d/dump/backup-data-only.sh</preStop> |
| 731 | </exec> |
| 732 | </wait> |
| 733 | <ports> |
| 734 | <port>${docker.mariadb.port.host}:3306</port> |
| 735 | </ports> |
| 736 | <network> |
| 737 | <mode>bridge</mode> |
| 738 | </network> |
| 739 | </run> |
| 740 | </image> |
| 741 | <image> |
| 742 | <name>docker.io/python:2-slim</name> |
| 743 | <alias>python</alias> |
| 744 | <run> |
| 745 | <hostname>python</hostname> |
| 746 | <volumes> |
| 747 | <bind> |
| 748 | <volume> |
| 749 | ${project.basedir}/src/test/resources/http-cache/:/usr/src/http-cache-app |
| 750 | </volume> |
| 751 | <volume> |
| 752 | ${project.basedir}/src/test/resources/http-cache/example/:/usr/src/http-cache-app/data-cache |
| 753 | </volume> |
| 754 | </bind> |
| 755 | </volumes> |
| 756 | <wait> |
| 757 | <tcp> |
| 758 | <ports> |
| 759 | <port>8080</port> |
| 760 | </ports> |
| 761 | <mode>direct</mode> |
| 762 | </tcp> |
| 763 | <time>120000</time> |
| 764 | </wait> |
| 765 | <ports> |
| 766 | <port>${docker.http-cache.port.host}:8080</port> |
| 767 | </ports> |
| 768 | <workingDir>/usr/src/http-cache-app</workingDir> |
| 769 | <cmd> |
| 770 | <shell>./start_http_cache.sh ${python.http.proxy.param} |
| 771 | --python_proxyaddress=localhost:${docker.http-cache.port.host} |
| 772 | </shell> |
| 773 | </cmd> |
| 774 | <network> |
| 775 | <mode>bridge</mode> |
| 776 | </network> |
| 777 | </run> |
| 778 | </image> |
| 779 | <image> |
| 780 | <name>onap/policy-clamp-backend</name> |
| 781 | <alias>onap-policy-clamp-backend</alias> |
| 782 | <run> |
| 783 | <skip>true</skip> |
| 784 | </run> |
| 785 | <build> |
| 786 | <cleanup>true</cleanup> |
| 787 | <tags> |
| 788 | <tag>latest</tag> |
| 789 | <tag>${project.docker.latesttagtimestamp.version}</tag> |
| 790 | <tag>${project.docker.latesttag.version}</tag> |
| 791 | </tags> |
| 792 | <!-- A relative path is looked up in ${project.basedir}/src/main/docker by |
| 793 | default --> |
| 794 | <dockerFile>backend/Dockerfile</dockerFile> |
| 795 | <assembly> |
| 796 | <descriptor>backend/backend-files.xml</descriptor> |
| 797 | <name>onap-policy-clamp-backend</name> |
| 798 | </assembly> |
| 799 | </build> |
| 800 | </image> |
| 801 | <image> |
| 802 | <name>onap/policy-clamp-frontend</name> |
| 803 | <alias>onap-policy-clamp-frontend</alias> |
| 804 | <run> |
| 805 | <skip>true</skip> |
| 806 | </run> |
| 807 | <build> |
| 808 | <cleanup>true</cleanup> |
| 809 | <tags> |
| 810 | <tag>latest</tag> |
| 811 | <tag>${project.docker.latesttagtimestamp.version}</tag> |
| 812 | <tag>${project.docker.latesttag.version}</tag> |
| 813 | </tags> |
| 814 | <!-- A relative path is looked up in ${project.basedir}/src/main/docker by |
| 815 | default --> |
| 816 | <dockerFile>frontend/Dockerfile</dockerFile> |
| 817 | <assembly> |
| 818 | <descriptor>frontend/frontend-files.xml</descriptor> |
| 819 | <name>onap-policy-clamp-frontend</name> |
| 820 | </assembly> |
| 821 | </build> |
| 822 | </image> |
| 823 | </images> |
| 824 | </configuration> |
| 825 | |
| 826 | <executions> |
| 827 | <execution> |
| 828 | <id>generate-images</id> |
| 829 | <phase>install</phase> |
| 830 | <goals> |
| 831 | <goal>build</goal> |
| 832 | </goals> |
| 833 | </execution> |
| 834 | <execution> |
| 835 | <id>push-images</id> |
| 836 | <phase>deploy</phase> |
| 837 | <goals> |
| 838 | <goal>push</goal> |
| 839 | </goals> |
| 840 | </execution> |
| 841 | <execution> |
| 842 | <id>docker-start-for-it</id> |
| 843 | <phase>pre-integration-test</phase> |
| 844 | <goals> |
| 845 | <goal>start</goal> |
| 846 | </goals> |
| 847 | </execution> |
| 848 | <execution> |
| 849 | <id>docker-stop-for-it</id> |
| 850 | <phase>post-integration-test</phase> |
| 851 | <goals> |
| 852 | <goal>stop</goal> |
| 853 | </goals> |
| 854 | </execution> |
| 855 | </executions> |
| 856 | </plugin> |
| 857 | |
| 858 | <plugin> |
| 859 | <groupId>org.jacoco</groupId> |
| 860 | <artifactId>jacoco-maven-plugin</artifactId> |
Sirisha_Manchikanti | f83411a | 2021-05-07 15:17:52 +0100 | [diff] [blame] | 861 | <configuration> |
| 862 | <dumpOnExit>true</dumpOnExit> |
| 863 | <append>true</append> |
| 864 | <includes> |
| 865 | <include>org/onap/policy/clamp/**</include> |
| 866 | </includes> |
| 867 | </configuration> |
| 868 | <executions> |
| 869 | <execution> |
| 870 | <id>pre-unit-test</id> |
| 871 | <goals> |
| 872 | <goal>prepare-agent</goal> |
| 873 | </goals> |
| 874 | <configuration> |
| 875 | <destFile>${project.build.directory}/coverage-reports/jacoco.exec</destFile> |
| 876 | <propertyName>surefireArgLine</propertyName> |
| 877 | <!-- <append>true</append> --> |
| 878 | </configuration> |
| 879 | </execution> |
| 880 | <execution> |
| 881 | <id>pre-integration-test</id> |
| 882 | <phase>pre-integration-test</phase> |
| 883 | <goals> |
| 884 | <goal>prepare-agent</goal> |
| 885 | </goals> |
| 886 | <configuration> |
| 887 | <destFile>${project.build.directory}/coverage-reports/jacoco-it.exec</destFile> |
| 888 | <propertyName>failsafeArgLine</propertyName> |
| 889 | <!-- <append>true</append> --> |
| 890 | <!-- Need to overwrite the policy integration parent flag --> |
| 891 | <skip>false</skip> |
| 892 | </configuration> |
| 893 | </execution> |
| 894 | <execution> |
| 895 | <goals> |
| 896 | <goal>merge</goal> |
| 897 | </goals> |
| 898 | <phase>post-integration-test</phase> |
| 899 | <configuration> |
| 900 | <fileSets> |
liamfallon | 72d882f | 2021-06-30 19:46:09 +0100 | [diff] [blame] | 901 | <fileSet implementation="org.apache.maven.shared.model.fileset.FileSet"> |
Sirisha_Manchikanti | f83411a | 2021-05-07 15:17:52 +0100 | [diff] [blame] | 902 | <directory>${project.build.directory}/coverage-reports</directory> |
| 903 | <includes> |
| 904 | <include>*.exec</include> |
| 905 | </includes> |
| 906 | </fileSet> |
| 907 | </fileSets> |
| 908 | <destFile>${project.build.directory}/jacoco.exec</destFile> |
| 909 | </configuration> |
| 910 | </execution> |
| 911 | <execution> |
| 912 | <id>report-xml</id> |
| 913 | <goals> |
| 914 | <goal>report</goal> |
| 915 | </goals> |
| 916 | <configuration> |
| 917 | <!-- Setting explicit path, so that we remember where it picks them up from --> |
| 918 | <dataFile>${project.build.directory}/jacoco.exec</dataFile> |
| 919 | <outputDirectory>${project.build.directory}/jacoco-html-xml-reports</outputDirectory> |
| 920 | </configuration> |
| 921 | </execution> |
| 922 | </executions> |
| 923 | </plugin> |
| 924 | |
| 925 | <!-- This plugin will be useful when we will have multi-modules project --> |
| 926 | <plugin> |
| 927 | <groupId>org.codehaus.mojo</groupId> |
| 928 | <artifactId>versions-maven-plugin</artifactId> |
Sirisha_Manchikanti | f83411a | 2021-05-07 15:17:52 +0100 | [diff] [blame] | 929 | </plugin> |
| 930 | |
| 931 | <plugin> |
| 932 | <groupId>com.github.eirslett</groupId> |
| 933 | <artifactId>frontend-maven-plugin</artifactId> |
| 934 | <version>1.11.3</version> |
| 935 | <configuration> |
| 936 | <installDirectory>${project.build.directory}/${ui.react.src}</installDirectory> |
| 937 | <npmDownloadRoot>${repo.npm}</npmDownloadRoot> |
| 938 | </configuration> |
| 939 | <executions> |
| 940 | <execution> |
| 941 | <id>install_node_and_npm</id> |
| 942 | <goals> |
| 943 | <goal>install-node-and-npm</goal> |
| 944 | </goals> |
| 945 | <phase>generate-sources</phase> |
| 946 | <configuration> |
| 947 | <nodeVersion>v14.16.1</nodeVersion> |
| 948 | <npmVersion>6.14.13</npmVersion> |
| 949 | </configuration> |
| 950 | </execution> |
| 951 | <execution> |
| 952 | <id>npm_install</id> |
| 953 | <goals> |
| 954 | <goal>npm</goal> |
| 955 | </goals> |
| 956 | <phase>compile</phase> |
| 957 | <configuration> |
| 958 | <workingDirectory>${project.build.directory}/${ui.react.src}</workingDirectory> |
| 959 | <arguments>install</arguments> |
| 960 | </configuration> |
| 961 | </execution> |
| 962 | <execution> |
| 963 | <id>npm_test</id> |
| 964 | <goals> |
| 965 | <goal>npm</goal> |
| 966 | </goals> |
| 967 | <phase>test</phase> |
| 968 | <configuration> |
| 969 | <skip>${maven.test.skip}</skip> |
| 970 | <arguments>run-script test:coverage</arguments> |
| 971 | <workingDirectory>${project.build.directory}/${ui.react.src}</workingDirectory> |
| 972 | </configuration> |
| 973 | </execution> |
| 974 | <execution> |
| 975 | <id>npm_install_lib</id> |
| 976 | <goals> |
| 977 | <goal>npm</goal> |
| 978 | </goals> |
| 979 | <phase>deploy</phase> |
| 980 | <configuration> |
| 981 | <workingDirectory>${project.build.directory}/${ui.react.lib.src}</workingDirectory> |
| 982 | <arguments>install</arguments> |
| 983 | </configuration> |
| 984 | </execution> |
| 985 | <execution> |
| 986 | <id>npm_build_lib</id> |
| 987 | <goals> |
| 988 | <goal>npm</goal> |
| 989 | </goals> |
| 990 | <phase>deploy</phase> |
| 991 | <configuration> |
| 992 | <workingDirectory>${project.build.directory}/${ui.react.lib.src}</workingDirectory> |
| 993 | <arguments>run build</arguments> |
| 994 | </configuration> |
| 995 | </execution> |
| 996 | <execution> |
| 997 | <id>npm_publish</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>publish</arguments> |
| 1005 | </configuration> |
| 1006 | </execution> |
| 1007 | </executions> |
| 1008 | </plugin> |
| 1009 | <plugin> |
| 1010 | <groupId>org.apache.maven.plugins</groupId> |
| 1011 | <artifactId>maven-compiler-plugin</artifactId> |
Sirisha_Manchikanti | f83411a | 2021-05-07 15:17:52 +0100 | [diff] [blame] | 1012 | </plugin> |
| 1013 | <plugin> |
| 1014 | <groupId>org.sonarsource.scanner.maven</groupId> |
| 1015 | <artifactId>sonar-maven-plugin</artifactId> |
Sirisha_Manchikanti | f83411a | 2021-05-07 15:17:52 +0100 | [diff] [blame] | 1016 | </plugin> |
| 1017 | <plugin> |
| 1018 | <groupId>org.codehaus.mojo</groupId> |
| 1019 | <artifactId>exec-maven-plugin</artifactId> |
Sirisha_Manchikanti | f83411a | 2021-05-07 15:17:52 +0100 | [diff] [blame] | 1020 | <executions> |
| 1021 | <execution> |
| 1022 | <id>libIndexCheck</id> |
| 1023 | <phase>validate</phase> |
| 1024 | <goals> |
| 1025 | <goal>exec</goal> |
| 1026 | </goals> |
| 1027 | </execution> |
| 1028 | </executions> |
| 1029 | <configuration> |
| 1030 | <executable>bash</executable> |
| 1031 | <arguments> |
| 1032 | <argument>${project.basedir}/src/main/script/checkLibIndex.sh</argument> |
| 1033 | </arguments> |
| 1034 | </configuration> |
| 1035 | </plugin> |
| 1036 | <!-- Plugin to generate a X509 Certificate for https tests --> |
| 1037 | <plugin> |
| 1038 | <groupId>org.codehaus.mojo</groupId> |
| 1039 | <artifactId>keytool-maven-plugin</artifactId> |
| 1040 | <version>1.5</version> |
| 1041 | <executions> |
| 1042 | <execution> |
| 1043 | <id>add-certificate-for-dev</id> |
| 1044 | <configuration> |
| 1045 | <keystore>${project.build.directory}/classes/clds/aaf/org.onap.clamp.p12</keystore> |
| 1046 | <storepass>China in the Spring</storepass> |
| 1047 | <alias>clamptest</alias> |
| 1048 | <storetype>PKCS12</storetype> |
| 1049 | <keyalg>RSA</keyalg> |
| 1050 | <dname>cn=CN, ou=OU, o=O, c=C</dname> |
| 1051 | <validity>365</validity> |
| 1052 | </configuration> |
| 1053 | <goals> |
| 1054 | <goal>generateKeyPair</goal> |
| 1055 | </goals> |
| 1056 | <phase>generate-resources</phase> |
| 1057 | </execution> |
| 1058 | <execution> |
| 1059 | <id>add-certificate-for-test</id> |
| 1060 | <configuration> |
| 1061 | <keystore>${project.build.directory}/test-classes/clds/aaf/org.onap.clamp.p12</keystore> |
| 1062 | <storepass>China in the Spring</storepass> |
| 1063 | <alias>clamptest</alias> |
| 1064 | <storetype>PKCS12</storetype> |
| 1065 | <keyalg>RSA</keyalg> |
| 1066 | <dname>cn=CN, ou=OU, o=O, c=C</dname> |
| 1067 | <validity>365</validity> |
| 1068 | </configuration> |
| 1069 | <goals> |
| 1070 | <goal>generateKeyPair</goal> |
| 1071 | </goals> |
| 1072 | <phase>generate-test-resources</phase> |
| 1073 | </execution> |
| 1074 | </executions> |
| 1075 | </plugin> |
| 1076 | </plugins> |
| 1077 | </build> |
| 1078 | </project> |