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