Lee, Tian (tl5884) | e651abe | 2018-04-27 17:50:07 +0100 | [diff] [blame] | 1 | <?xml version="1.0" encoding="UTF-8"?> |
Lee, Tian (tl5884) | 9d81a17 | 2018-04-17 15:31:49 +0100 | [diff] [blame] | 2 | <!-- |
| 3 | |
mark.j.leonard | 1bde7e3 | 2018-08-06 16:58:34 +0100 | [diff] [blame] | 4 | ============LICENSE_START======================================================= |
Lee, Tian (tl5884) | 9d81a17 | 2018-04-17 15:31:49 +0100 | [diff] [blame] | 5 | org.onap.aai |
| 6 | ================================================================================ |
mark.j.leonard | d2215b5 | 2019-03-25 15:50:45 +0000 | [diff] [blame] | 7 | Copyright (c) 2017-2019 AT&T Intellectual Property. All rights reserved. |
| 8 | Copyright (c) 2017-2019 European Software Marketing Ltd. |
Lee, Tian (tl5884) | 9d81a17 | 2018-04-17 15:31:49 +0100 | [diff] [blame] | 9 | ================================================================================ |
| 10 | Licensed under the Apache License, Version 2.0 (the "License"); |
| 11 | you may not use this file except in compliance with the License. |
| 12 | You may obtain a copy of the License at |
| 13 | |
| 14 | http://www.apache.org/licenses/LICENSE-2.0 |
| 15 | |
| 16 | Unless required by applicable law or agreed to in writing, software |
| 17 | distributed under the License is distributed on an "AS IS" BASIS, |
| 18 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 19 | See the License for the specific language governing permissions and |
| 20 | limitations under the License. |
| 21 | ============LICENSE_END========================================================= |
| 22 | |
| 23 | --> |
Lee, Tian (tl5884) | 9a52616 | 2019-10-03 12:22:40 +0100 | [diff] [blame] | 24 | <project xmlns="http://maven.apache.org/POM/4.0.0" 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> |
Edwin Lawrance | 1433a67 | 2017-09-22 16:55:07 +0100 | [diff] [blame] | 27 | |
Lee, Tian (tl5884) | 9a52616 | 2019-10-03 12:22:40 +0100 | [diff] [blame] | 28 | <parent> |
| 29 | <groupId>org.onap.oparent</groupId> |
| 30 | <artifactId>oparent</artifactId> |
Forsyth, James (jf2512) | e5f7f4d | 2020-02-14 15:46:08 -0500 | [diff] [blame^] | 31 | <version>2.1.0</version> |
Lee, Tian (tl5884) | 9a52616 | 2019-10-03 12:22:40 +0100 | [diff] [blame] | 32 | <relativePath /> |
| 33 | </parent> |
Lee, Tian (tl5884) | e651abe | 2018-04-27 17:50:07 +0100 | [diff] [blame] | 34 | |
Lee, Tian (tl5884) | 9a52616 | 2019-10-03 12:22:40 +0100 | [diff] [blame] | 35 | <groupId>org.onap.aai</groupId> |
| 36 | <artifactId>babel</artifactId> |
Forsyth, James (jf2512) | 9d39562 | 2020-01-17 17:30:21 -0500 | [diff] [blame] | 37 | <version>1.6.1-SNAPSHOT</version> |
Lee, Tian (tl5884) | 9a52616 | 2019-10-03 12:22:40 +0100 | [diff] [blame] | 38 | <packaging>jar</packaging> |
Lee, Tian (tl5884) | e651abe | 2018-04-27 17:50:07 +0100 | [diff] [blame] | 39 | |
Lee, Tian (tl5884) | 9a52616 | 2019-10-03 12:22:40 +0100 | [diff] [blame] | 40 | <name>aai-babel</name> |
| 41 | <description>ONAP AAI Babel Microservice</description> |
Edwin Lawrance | 1433a67 | 2017-09-22 16:55:07 +0100 | [diff] [blame] | 42 | |
Lee, Tian (tl5884) | 9a52616 | 2019-10-03 12:22:40 +0100 | [diff] [blame] | 43 | <properties> |
| 44 | <!-- Spring boot version --> |
| 45 | <spring.boot.version>2.1.6.RELEASE</spring.boot.version> |
Edwin Lawrance | 1433a67 | 2017-09-22 16:55:07 +0100 | [diff] [blame] | 46 | |
Lee, Tian (tl5884) | 9a52616 | 2019-10-03 12:22:40 +0100 | [diff] [blame] | 47 | <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> |
| 48 | <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> |
| 49 | <java.version>1.8</java.version> |
| 50 | <aai.schema.source.folder>onap/aai_schema</aai.schema.source.folder> |
| 51 | <aai.schema.target.folder>${project.build.directory}/aai-schema</aai.schema.target.folder> |
Forsyth, James (jf2512) | e5f7f4d | 2020-02-14 15:46:08 -0500 | [diff] [blame^] | 52 | |
| 53 | <sonar.jacoco.reportPath /> |
| 54 | <sonar.jacoco.itReportPath /> |
| 55 | <sonar.jacoco.reportMissing.force.zero /> |
| 56 | |
Lee, Tian (tl5884) | 9a52616 | 2019-10-03 12:22:40 +0100 | [diff] [blame] | 57 | <jacoco.line.coverage.limit>0.90</jacoco.line.coverage.limit> |
Forsyth, James (jf2512) | e5f7f4d | 2020-02-14 15:46:08 -0500 | [diff] [blame^] | 58 | <jacoco.version>0.8.5</jacoco.version> |
| 59 | <sonar-jacoco-listeners.version>3.2</sonar-jacoco-listeners.version> |
| 60 | <sonar.core.codeCoveragePlugin>jacoco</sonar.core.codeCoveragePlugin> |
| 61 | <sonar.coverage.jacoco.xmlReportPaths>${project.reporting.outputDirectory}/jacoco-ut/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths> |
| 62 | <sonar.exclusions>**/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/**</sonar.exclusions> |
| 63 | |
| 64 | <sonar.scanner.version>3.7.0.1746</sonar.scanner.version> |
Edwin Lawrance | 1433a67 | 2017-09-22 16:55:07 +0100 | [diff] [blame] | 65 | |
Dmitry Puzikov | 1a0b233 | 2019-04-16 16:53:15 +0200 | [diff] [blame] | 66 | <!-- docker related properties --> |
Lee, Tian (tl5884) | 9a52616 | 2019-10-03 12:22:40 +0100 | [diff] [blame] | 67 | <docker.fabric.version>0.28.0</docker.fabric.version> |
| 68 | <aai.docker.version>1.0.0</aai.docker.version> |
| 69 | <aai.build.directory>${project.build.directory}/${project.artifactId}-${project.version}-build/ |
| 70 | </aai.build.directory> |
| 71 | <aai.docker.namespace>onap</aai.docker.namespace> |
| 72 | <aai.base.image>alpine</aai.base.image> |
| 73 | <aai.base.image.version>1.6.0</aai.base.image.version> |
Edwin Lawrance | 1433a67 | 2017-09-22 16:55:07 +0100 | [diff] [blame] | 74 | |
Lee, Tian (tl5884) | 9a52616 | 2019-10-03 12:22:40 +0100 | [diff] [blame] | 75 | <!-- Dependency Versions --> |
| 76 | <common.logging.version>1.2.2</common.logging.version> |
| 77 | <sdc.tosca.version>1.5.1</sdc.tosca.version> |
| 78 | <commons.compress.version>1.18</commons.compress.version> |
| 79 | <javax.ws.rs.version>2.1</javax.ws.rs.version> |
| 80 | <mvn.jaxb2.version>0.13.2</mvn.jaxb2.version> |
| 81 | <aai-schema.group.id>org.onap.aai.schema-service</aai-schema.group.id> |
Forsyth, James (jf2512) | e5f7f4d | 2020-02-14 15:46:08 -0500 | [diff] [blame^] | 82 | <aai-schema.version>1.6.3</aai-schema.version> |
Lee, Tian (tl5884) | 9a52616 | 2019-10-03 12:22:40 +0100 | [diff] [blame] | 83 | <aai.rest.client.version>1.2.1</aai.rest.client.version> |
| 84 | <sdc.distribution.client.version>1.3.0</sdc.distribution.client.version> |
| 85 | <xmlunit.version>1.6</xmlunit.version> |
| 86 | <logback.version>1.2.3</logback.version> |
| 87 | <antrun.version>1.8</antrun.version> |
Dmitry Puzikov | 1a0b233 | 2019-04-16 16:53:15 +0200 | [diff] [blame] | 88 | <!-- This will be used for the docker images as the default format of maven build has issues --> |
Lee, Tian (tl5884) | 9a52616 | 2019-10-03 12:22:40 +0100 | [diff] [blame] | 89 | <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format> |
| 90 | </properties> |
Lee, Tian (tl5884) | e651abe | 2018-04-27 17:50:07 +0100 | [diff] [blame] | 91 | |
Lee, Tian (tl5884) | 9a52616 | 2019-10-03 12:22:40 +0100 | [diff] [blame] | 92 | <dependencyManagement> |
| 93 | <dependencies> |
| 94 | <dependency> |
| 95 | <!-- Import dependency management from Spring Boot --> |
| 96 | <groupId>org.springframework.boot</groupId> |
| 97 | <artifactId>spring-boot-dependencies</artifactId> |
| 98 | <version>${spring.boot.version}</version> |
| 99 | <type>pom</type> |
| 100 | <scope>import</scope> |
| 101 | </dependency> |
| 102 | </dependencies> |
| 103 | </dependencyManagement> |
Edwin Lawrance | 1433a67 | 2017-09-22 16:55:07 +0100 | [diff] [blame] | 104 | |
Lee, Tian (tl5884) | 9a52616 | 2019-10-03 12:22:40 +0100 | [diff] [blame] | 105 | <profiles> |
Dmitry Puzikov | 1a0b233 | 2019-04-16 16:53:15 +0200 | [diff] [blame] | 106 | <!-- Docker profile to be used for building docker image and pushing to nexus --> |
Lee, Tian (tl5884) | 9a52616 | 2019-10-03 12:22:40 +0100 | [diff] [blame] | 107 | <profile> |
| 108 | <id>docker</id> |
| 109 | <build> |
| 110 | <plugins> |
| 111 | <plugin> |
| 112 | <groupId>org.codehaus.mojo</groupId> |
| 113 | <artifactId>build-helper-maven-plugin</artifactId> |
| 114 | <version>3.0.0</version> |
| 115 | <executions> |
| 116 | <execution> |
| 117 | <phase>pre-clean</phase> |
| 118 | <id>parse-version</id> |
| 119 | <goals> |
| 120 | <goal>parse-version</goal> |
| 121 | </goals> |
| 122 | </execution> |
| 123 | </executions> |
| 124 | </plugin> |
| 125 | <plugin> |
| 126 | <groupId>org.codehaus.groovy.maven</groupId> |
| 127 | <artifactId>gmaven-plugin</artifactId> |
| 128 | <version>1.0</version> |
| 129 | <executions> |
| 130 | <execution> |
| 131 | <phase>pre-clean</phase> |
| 132 | <goals> |
| 133 | <goal>execute</goal> |
| 134 | </goals> |
| 135 | <configuration> |
| 136 | <source> |
| 137 | def userAaiBaseImage = session.userProperties['aai.base.image']; |
| 138 | def userAaiCommonVersion = session.userProperties['aai.base.image.version']; |
| 139 | if (userAaiCommonVersion != null) { |
| 140 | project.properties['aai.base.image.version'] = userAaiCommonVersion; |
| 141 | } |
| 142 | if (userAaiBaseImage != null) { |
| 143 | project.properties['aai.base.image'] = userAaiBaseImage; |
| 144 | } |
| 145 | log.info 'Base image flavour: ' + project.properties['aai.base.image']; |
| 146 | log.info 'Base image version: ' + project.properties['aai.base.image.version']; |
| 147 | </source> |
| 148 | </configuration> |
| 149 | </execution> |
| 150 | </executions> |
| 151 | </plugin> |
| 152 | <plugin> |
| 153 | <groupId>io.fabric8</groupId> |
| 154 | <artifactId>docker-maven-plugin</artifactId> |
| 155 | <version>${docker.fabric.version}</version> |
| 156 | <configuration> |
| 157 | <verbose>true</verbose> |
| 158 | <apiVersion>1.23</apiVersion> |
| 159 | <images> |
| 160 | <image> |
| 161 | <name>${docker.push.registry}/${aai.docker.namespace}/${project.artifactId}:%l |
| 162 | </name> |
| 163 | <build> |
| 164 | <filter>@</filter> |
| 165 | <tags> |
| 166 | <tag>latest</tag> |
| 167 | <tag>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}-STAGING-latest</tag> |
| 168 | <tag>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}-STAGING-${maven.build.timestamp}</tag> |
| 169 | </tags> |
| 170 | <cleanup>try</cleanup> |
| 171 | <dockerFileDir>${project.basedir}/src/main/docker</dockerFileDir> |
| 172 | <assembly> |
| 173 | <inline> |
| 174 | <fileSets> |
| 175 | <fileSet> |
| 176 | <directory>${aai.build.directory}</directory> |
| 177 | <outputDirectory>/${project.artifactId}</outputDirectory> |
| 178 | </fileSet> |
| 179 | </fileSets> |
| 180 | </inline> |
| 181 | </assembly> |
| 182 | </build> |
| 183 | </image> |
| 184 | </images> |
| 185 | </configuration> |
| 186 | <executions> |
| 187 | <execution> |
| 188 | <id>clean-images</id> |
| 189 | <phase>pre-clean</phase> |
| 190 | <goals> |
| 191 | <goal>remove</goal> |
| 192 | </goals> |
| 193 | <configuration> |
| 194 | <removeAll>true</removeAll> |
| 195 | </configuration> |
| 196 | </execution> |
| 197 | <execution> |
| 198 | <id>generate-images</id> |
| 199 | <phase>package</phase> |
| 200 | <goals> |
| 201 | <goal>build</goal> |
| 202 | </goals> |
| 203 | </execution> |
| 204 | <execution> |
| 205 | <id>push-images</id> |
| 206 | <phase>deploy</phase> |
| 207 | <goals> |
| 208 | <goal>push</goal> |
| 209 | </goals> |
| 210 | </execution> |
| 211 | </executions> |
| 212 | </plugin> |
| 213 | </plugins> |
| 214 | </build> |
| 215 | </profile> |
| 216 | </profiles> |
| 217 | <dependencies> |
| 218 | <dependency> |
| 219 | <groupId>org.springframework.boot</groupId> |
| 220 | <artifactId>spring-boot-starter-jetty</artifactId> |
| 221 | </dependency> |
| 222 | <dependency> |
| 223 | <groupId>org.springframework.boot</groupId> |
| 224 | <artifactId>spring-boot-starter-jersey</artifactId> |
| 225 | <exclusions> |
| 226 | <exclusion> |
| 227 | <groupId>org.springframework.boot</groupId> |
| 228 | <artifactId>spring-boot-starter-tomcat</artifactId> |
| 229 | </exclusion> |
| 230 | </exclusions> |
| 231 | </dependency> |
| 232 | <dependency> |
| 233 | <groupId>org.onap.aai.logging-service</groupId> |
| 234 | <artifactId>common-logging</artifactId> |
| 235 | <version>${common.logging.version}</version> |
| 236 | </dependency> |
| 237 | <dependency> |
| 238 | <groupId>ch.qos.logback</groupId> |
| 239 | <artifactId>logback-classic</artifactId> |
| 240 | <version>${logback.version}</version><!--$NO-MVN-MAN-VER$--> |
| 241 | </dependency> |
| 242 | <dependency> |
| 243 | <groupId>ch.qos.logback</groupId> |
| 244 | <artifactId>logback-core</artifactId> |
| 245 | <version>${logback.version}</version><!--$NO-MVN-MAN-VER$--> |
| 246 | </dependency> |
| 247 | <dependency> |
| 248 | <groupId>commons-codec</groupId> |
| 249 | <artifactId>commons-codec</artifactId> |
| 250 | </dependency> |
| 251 | <dependency> |
| 252 | <groupId>org.apache.commons</groupId> |
| 253 | <artifactId>commons-compress</artifactId> |
| 254 | <version>${commons.compress.version}</version> |
| 255 | </dependency> |
| 256 | <dependency> |
| 257 | <groupId>org.apache.commons</groupId> |
| 258 | <artifactId>commons-lang3</artifactId> |
| 259 | </dependency> |
| 260 | <dependency> |
| 261 | <groupId>javax.ws.rs</groupId> |
| 262 | <artifactId>javax.ws.rs-api</artifactId> |
| 263 | <version>${javax.ws.rs.version}</version> |
| 264 | </dependency> |
| 265 | <dependency> |
| 266 | <groupId>org.codehaus.groovy</groupId> |
| 267 | <artifactId>groovy</artifactId> |
| 268 | </dependency> |
| 269 | <dependency> |
| 270 | <groupId>org.onap.sdc.sdc-tosca</groupId> |
| 271 | <artifactId>sdc-tosca</artifactId> |
| 272 | <version>${sdc.tosca.version}</version> |
| 273 | </dependency> |
| 274 | <dependency> |
| 275 | <groupId>org.onap.aai</groupId> |
| 276 | <artifactId>rest-client</artifactId> |
| 277 | <version>${aai.rest.client.version}</version> |
| 278 | </dependency> |
| 279 | |
| 280 | <!-- Testing --> |
| 281 | <dependency> |
| 282 | <groupId>org.springframework.boot</groupId> |
| 283 | <artifactId>spring-boot-starter-test</artifactId> |
| 284 | <scope>test</scope> |
| 285 | </dependency> |
| 286 | <dependency> |
| 287 | <groupId>org.onap.sdc.sdc-distribution-client</groupId> |
| 288 | <artifactId>sdc-distribution-client</artifactId> |
| 289 | <version>${sdc.distribution.client.version}</version> |
| 290 | <scope>test</scope> |
| 291 | </dependency> |
| 292 | <dependency> |
| 293 | <groupId>xmlunit</groupId> |
| 294 | <artifactId>xmlunit</artifactId> |
| 295 | <version>${xmlunit.version}</version> |
| 296 | <scope>test</scope> |
| 297 | </dependency> |
| 298 | </dependencies> |
Dmitry Puzikov | 1a0b233 | 2019-04-16 16:53:15 +0200 | [diff] [blame] | 299 | |
Lee, Tian (tl5884) | 9a52616 | 2019-10-03 12:22:40 +0100 | [diff] [blame] | 300 | <build> |
| 301 | <plugins> |
| 302 | <plugin> |
| 303 | <groupId>org.springframework.boot</groupId> |
| 304 | <artifactId>spring-boot-maven-plugin</artifactId> |
| 305 | <version>${spring.boot.version}</version> |
| 306 | <configuration> |
| 307 | <jvmArguments> |
| 308 | -DCONFIG_HOME=./appconfig-local |
| 309 | -DAPP_HOME=. |
| 310 | -Dtosca.mappings.config=./appconfig-local/tosca-mappings.json |
| 311 | -DKEY_STORE_PASSWORD=${KEY_STORE_PASSWORD} |
| 312 | </jvmArguments> |
| 313 | </configuration> |
| 314 | <executions> |
| 315 | <execution> |
| 316 | <goals> |
| 317 | <goal>repackage</goal> |
| 318 | </goals> |
| 319 | </execution> |
| 320 | </executions> |
| 321 | </plugin> |
| 322 | <plugin> |
| 323 | <groupId>org.apache.maven.plugins</groupId> |
| 324 | <artifactId>maven-dependency-plugin</artifactId> |
| 325 | <executions> |
| 326 | <execution> |
| 327 | <id>unpack</id> |
| 328 | <phase>initialize</phase> |
| 329 | <goals> |
| 330 | <goal>unpack</goal> |
| 331 | </goals> |
| 332 | <configuration> |
| 333 | <artifactItems> |
| 334 | <artifactItem> |
| 335 | <groupId>${aai-schema.group.id}</groupId> |
| 336 | <artifactId>aai-schema</artifactId> |
| 337 | <version>${aai-schema.version}</version> |
| 338 | <type>jar</type> |
| 339 | <includes>${aai.schema.source.folder}/aai_schema_v**.xsd</includes> |
| 340 | <outputDirectory>${project.build.directory}/tmp</outputDirectory> |
| 341 | </artifactItem> |
| 342 | </artifactItems> |
| 343 | </configuration> |
| 344 | </execution> |
| 345 | </executions> |
| 346 | </plugin> |
| 347 | <plugin> |
| 348 | <groupId>org.apache.maven.plugins</groupId> |
| 349 | <artifactId>maven-antrun-plugin</artifactId> |
| 350 | <version>${antrun.version}</version> |
| 351 | <executions> |
| 352 | <execution> |
| 353 | <id>Flatten XSDs</id> |
| 354 | <phase>initialize</phase> |
| 355 | <goals> |
| 356 | <goal>run</goal> |
| 357 | </goals> |
| 358 | <configuration> |
| 359 | <target> |
| 360 | <copy todir="${aai.schema.target.folder}" flatten="true"> |
| 361 | <fileset dir="${project.build.directory}/tmp"> |
| 362 | <include name="**/*.xsd" /> |
| 363 | </fileset> |
| 364 | </copy> |
| 365 | </target> |
| 366 | </configuration> |
| 367 | </execution> |
| 368 | </executions> |
| 369 | </plugin> |
| 370 | <plugin> |
| 371 | <groupId>org.jvnet.jaxb2.maven2</groupId> |
| 372 | <artifactId>maven-jaxb2-plugin</artifactId> |
| 373 | <version>${mvn.jaxb2.version}</version> |
| 374 | <executions> |
| 375 | <execution> |
| 376 | <phase>process-sources</phase> |
| 377 | <goals> |
| 378 | <goal>generate</goal> |
| 379 | </goals> |
| 380 | </execution> |
| 381 | </executions> |
| 382 | <configuration> |
| 383 | <schemaDirectory>${aai.schema.target.folder}</schemaDirectory> |
| 384 | <generatePackage>org.onap.aai.babel.xml.generator.xsd</generatePackage> |
| 385 | <generateDirectory>${project.build.directory}/generated-sources</generateDirectory> |
| 386 | <schemaIncludes> |
| 387 | <include>aai_schema_latest.xsd</include> |
| 388 | </schemaIncludes> |
| 389 | <extension>true</extension> |
| 390 | <args> |
| 391 | <arg>-Xannotate</arg> |
| 392 | </args> |
| 393 | <plugins> |
| 394 | <plugin> |
| 395 | <groupId>org.jvnet.jaxb2_commons</groupId> |
| 396 | <artifactId>jaxb2-basics-annotate</artifactId> |
| 397 | <version>0.6.4</version> |
| 398 | </plugin> |
| 399 | <!-- Add the dependencies with your annotations as 'plugins' below --> |
| 400 | <plugin> |
| 401 | <groupId>org.jvnet.jaxb2_commons</groupId> |
| 402 | <artifactId>jaxb2-annotate-plugin-test-annox-annotations</artifactId> |
| 403 | <version>1.0.0</version> |
| 404 | </plugin> |
| 405 | </plugins> |
| 406 | </configuration> |
| 407 | </plugin> |
| 408 | <plugin> |
| 409 | <artifactId>exec-maven-plugin</artifactId> |
| 410 | <groupId>org.codehaus.mojo</groupId> |
| 411 | <version>1.5.0</version> |
| 412 | <executions> |
| 413 | <execution><!-- Run our script to get latest xsd version --> |
| 414 | <id>Get latest xsd version</id> |
| 415 | <phase>generate-sources</phase> |
| 416 | <goals> |
| 417 | <goal>exec</goal> |
| 418 | </goals> |
| 419 | <configuration> |
| 420 | <workingDirectory>${basedir}/scripts</workingDirectory> |
| 421 | <executable>bash</executable> |
| 422 | <commandlineArgs>get-latest-xsd-version.sh ${basedir}</commandlineArgs> |
| 423 | </configuration> |
| 424 | </execution> |
| 425 | </executions> |
| 426 | </plugin> |
| 427 | <plugin> |
| 428 | <artifactId>maven-assembly-plugin</artifactId> |
| 429 | <configuration> |
| 430 | <descriptors> |
| 431 | <descriptor>src/main/assembly/descriptor.xml</descriptor> |
| 432 | </descriptors> |
| 433 | </configuration> |
| 434 | <executions> |
| 435 | <execution> |
| 436 | <id>make-assembly</id> |
| 437 | <phase>package</phase> |
| 438 | <goals> |
| 439 | <goal>single</goal> |
| 440 | </goals> |
| 441 | </execution> |
| 442 | </executions> |
| 443 | </plugin> |
| 444 | <plugin> |
| 445 | <groupId>com.mycila</groupId> |
| 446 | <artifactId>license-maven-plugin</artifactId> |
| 447 | <version>3.0</version> |
| 448 | <configuration> |
| 449 | <header>License.txt</header> |
| 450 | <includes> |
| 451 | <include>src/main/java/**</include> |
| 452 | <include>src/test/java/**</include> |
| 453 | <include>pom.xml</include> |
| 454 | </includes> |
| 455 | <skipExistingHeaders>true</skipExistingHeaders> |
| 456 | </configuration> |
| 457 | <executions> |
| 458 | <execution> |
| 459 | <goals> |
| 460 | <!-- Set goal from "check" to "format" to auto update license headers --> |
| 461 | <goal>check</goal> |
| 462 | </goals> |
| 463 | <phase>validate</phase> |
| 464 | </execution> |
| 465 | </executions> |
| 466 | </plugin> |
| 467 | <plugin> |
| 468 | <groupId>org.apache.maven.plugins</groupId> |
| 469 | <artifactId>maven-surefire-plugin</artifactId> |
| 470 | <configuration> |
| 471 | <reuseForks>false</reuseForks> |
| 472 | <forkCount>1</forkCount> |
| 473 | <environmentVariables> |
| 474 | <APP_HOME>.</APP_HOME> |
| 475 | <CONFIG_HOME>src/test/resources</CONFIG_HOME> |
| 476 | </environmentVariables> |
| 477 | </configuration> |
| 478 | </plugin> |
| 479 | <plugin> |
| 480 | <groupId>org.apache.maven.plugins</groupId> |
| 481 | <artifactId>maven-jar-plugin</artifactId> |
| 482 | <version>3.0.2</version> |
| 483 | <executions> |
| 484 | <execution> |
| 485 | <phase>package</phase> |
| 486 | <goals> |
| 487 | <goal>jar</goal> |
| 488 | </goals> |
| 489 | <configuration> |
| 490 | <classifier>client</classifier> |
| 491 | <includes> |
| 492 | <include>**/babel/service/data/*</include> |
| 493 | </includes> |
| 494 | </configuration> |
| 495 | </execution> |
| 496 | </executions> |
| 497 | </plugin> |
| 498 | <plugin> |
| 499 | <groupId>org.apache.maven.plugins</groupId> |
| 500 | <artifactId>maven-deploy-plugin</artifactId> |
| 501 | <configuration> |
| 502 | <classifier>client</classifier> |
| 503 | </configuration> |
| 504 | </plugin> |
Forsyth, James (jf2512) | e5f7f4d | 2020-02-14 15:46:08 -0500 | [diff] [blame^] | 505 | |
| 506 | |
| 507 | <!-- once we connect aai-parent or oparent 3.0+ we can take out this |
| 508 | whole section --> |
| 509 | |
Lee, Tian (tl5884) | 9a52616 | 2019-10-03 12:22:40 +0100 | [diff] [blame] | 510 | <plugin> |
Forsyth, James (jf2512) | e5f7f4d | 2020-02-14 15:46:08 -0500 | [diff] [blame^] | 511 | <groupId>org.jacoco</groupId> |
| 512 | <artifactId>jacoco-maven-plugin</artifactId> |
| 513 | <version>${jacoco.version}</version> |
| 514 | <configuration> |
| 515 | <!-- Note: This exclusion list should match <sonar.exclusions> property |
| 516 | above --> |
| 517 | <excludes> |
| 518 | <exclude>**/gen/**</exclude> |
| 519 | <exclude>**/generated-sources/**</exclude> |
| 520 | <exclude>**/yang-gen/**</exclude> |
| 521 | <exclude>**/pax/**</exclude> |
| 522 | <exclude>org/onap/aai/babel/xml/generator/xsd/*</exclude> |
| 523 | </excludes> |
| 524 | </configuration> |
| 525 | <executions> |
| 526 | <!-- Prepares the property pointing to the JaCoCo runtime agent which |
| 527 | is passed as VM argument when Maven the Surefire plugin is executed. --> |
| 528 | <execution> |
| 529 | <id>pre-unit-test</id> |
| 530 | <goals> |
| 531 | <goal>prepare-agent</goal> |
| 532 | </goals> |
| 533 | <configuration> |
| 534 | <!-- Sets the path to the file which contains the execution data |
| 535 | . --> |
| 536 | <destFile>${project.build.directory}/code-coverage/jacoco-ut.exec</destFile> |
| 537 | <!-- Sets the name of the property containing the settings for JaCoCo |
| 538 | runtime agent. --> |
| 539 | <propertyName>surefireArgLine</propertyName> |
| 540 | </configuration> |
| 541 | </execution> |
| 542 | <!-- Ensures that the code coverage report for unit tests is created |
| 543 | after unit tests have been run. --> |
| 544 | <execution> |
| 545 | <id>post-unit-test</id> |
| 546 | <phase>test</phase> |
| 547 | <goals> |
| 548 | <goal>report</goal> |
| 549 | </goals> |
| 550 | <configuration> |
| 551 | <!-- Sets the path to the file which contains the execution data |
| 552 | . --> |
| 553 | <dataFile>${project.build.directory}/code-coverage/jacoco-ut.exec</dataFile> |
| 554 | <!-- Sets the output directory for the code coverage report. --> |
| 555 | <outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory> |
| 556 | </configuration> |
| 557 | </execution> |
| 558 | <execution> |
| 559 | <id>pre-integration-test</id> |
| 560 | <phase>pre-integration-test</phase> |
| 561 | <goals> |
| 562 | <goal>prepare-agent</goal> |
| 563 | </goals> |
| 564 | <configuration> |
| 565 | <!-- Sets the path to the file which contains the execution data |
| 566 | . --> |
| 567 | <destFile>${project.build.directory}/code-coverage/jacoco-it.exec</destFile> |
| 568 | <!-- Sets the name of the property containing the settings for JaCoCo |
| 569 | runtime agent. --> |
| 570 | <propertyName>failsafeArgLine</propertyName> |
| 571 | </configuration> |
| 572 | </execution> |
| 573 | <!-- Ensures that the code coverage report for integration tests after |
| 574 | integration tests have been run. --> |
| 575 | <execution> |
| 576 | <id>post-integration-test</id> |
| 577 | <phase>post-integration-test</phase> |
| 578 | <goals> |
| 579 | <goal>report</goal> |
| 580 | </goals> |
| 581 | <configuration> |
| 582 | <!-- Sets the path to the file which contains the execution data |
| 583 | . --> |
| 584 | <dataFile>${project.build.directory}/code-coverage/jacoco-it.exec</dataFile> |
| 585 | <!-- Sets the output directory for the code coverage report. --> |
| 586 | <outputDirectory>${project.reporting.outputDirectory}/jacoco-it</outputDirectory> |
| 587 | </configuration> |
| 588 | </execution> |
| 589 | <execution> |
| 590 | <id>default-check</id> |
| 591 | <goals> |
| 592 | <goal>check</goal> |
| 593 | </goals> |
| 594 | <configuration> |
| 595 | <dataFile>${project.build.directory}/code-coverage/jacoco-ut.exec</dataFile> |
| 596 | <rules> |
| 597 | <rule implementation="org.jacoco.maven.RuleConfiguration"> |
| 598 | <element>BUNDLE</element> |
| 599 | <limits> |
| 600 | <limit implementation="org.jacoco.report.check.Limit"> |
| 601 | <counter>LINE</counter> |
| 602 | <value>COVEREDRATIO</value> |
| 603 | <minimum>${jacoco.line.coverage.limit}</minimum> |
| 604 | </limit> |
| 605 | </limits> |
| 606 | </rule> |
| 607 | </rules> |
| 608 | </configuration> |
| 609 | </execution> |
| 610 | </executions> |
Lee, Tian (tl5884) | 9a52616 | 2019-10-03 12:22:40 +0100 | [diff] [blame] | 611 | </plugin> |
Forsyth, James (jf2512) | e5f7f4d | 2020-02-14 15:46:08 -0500 | [diff] [blame^] | 612 | <plugin> |
| 613 | <groupId>org.apache.maven.plugins</groupId> |
| 614 | <artifactId>maven-surefire-plugin</artifactId> |
| 615 | <version>3.0.0-M4</version> |
| 616 | <configuration> |
| 617 | <!-- Sets the VM argument line used when unit tests are run. --> |
| 618 | <argLine>${surefireArgLine}</argLine> |
| 619 | <!-- Excludes integration tests when unit tests are run. --> |
| 620 | <excludes> |
| 621 | <exclude>**/IT*.java</exclude> |
| 622 | </excludes> |
| 623 | </configuration> |
| 624 | </plugin> |
| 625 | <plugin> |
| 626 | <groupId>org.apache.maven.plugins</groupId> |
| 627 | <artifactId>maven-failsafe-plugin</artifactId> |
| 628 | <version>3.0.0-M4</version> |
| 629 | <executions> |
| 630 | <!-- Ensures that both integration-test and verify goals of the Failsafe |
| 631 | Maven plugin are executed. --> |
| 632 | <execution> |
| 633 | <id>integration-tests</id> |
| 634 | <goals> |
| 635 | <goal>integration-test</goal> |
| 636 | <goal>verify</goal> |
| 637 | </goals> |
| 638 | <configuration> |
| 639 | <!-- Sets the VM argument line used when integration tests are run. --> |
| 640 | <argLine>${failsafeArgLine}</argLine> |
| 641 | </configuration> |
| 642 | </execution> |
| 643 | </executions> |
| 644 | </plugin> |
| 645 | <plugin> |
| 646 | <groupId>org.sonarsource.scanner.maven</groupId> |
| 647 | <artifactId>sonar-maven-plugin</artifactId> |
| 648 | <version>${sonar.scanner.version}</version> |
| 649 | </plugin> |
| 650 | <!-- end removable sonar config, note the additional exclusion for babel above |
| 651 | --> |
Lee, Tian (tl5884) | 9a52616 | 2019-10-03 12:22:40 +0100 | [diff] [blame] | 652 | </plugins> |
| 653 | </build> |
Edwin Lawrance | 1433a67 | 2017-09-22 16:55:07 +0100 | [diff] [blame] | 654 | |
Edwin Lawrance | 1433a67 | 2017-09-22 16:55:07 +0100 | [diff] [blame] | 655 | </project> |