Claudio David Gasparini | 70c1702 | 2020-10-26 10:12:10 +0100 | [diff] [blame] | 1 | <?xml version="1.0" encoding="UTF-8"?> |
| 2 | <project xmlns="http://maven.apache.org/POM/4.0.0" |
| 3 | xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 4 | xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
| 5 | <parent> |
| 6 | <groupId>org.onap.oparent</groupId> |
| 7 | <artifactId>oparent</artifactId> |
| 8 | <version>3.1.0</version> |
| 9 | <relativePath/> |
| 10 | </parent> |
| 11 | <modelVersion>4.0.0</modelVersion> |
| 12 | |
| 13 | <groupId>org.onap.cps</groupId> |
| 14 | <artifactId>cps-parent</artifactId> |
| 15 | <version>0.0.1-SNAPSHOT</version> |
| 16 | <packaging>pom</packaging> |
| 17 | |
| 18 | <properties> |
Claudio David Gasparini | 900ba02 | 2020-11-08 22:18:36 +0100 | [diff] [blame] | 19 | <app>org.onap.cps.Application</app> |
| 20 | <base.image>openjdk:11-jre-slim</base.image> |
Claudio David Gasparini | 70c1702 | 2020-10-26 10:12:10 +0100 | [diff] [blame] | 21 | <java.version>11</java.version> |
Claudio David Gasparini | 900ba02 | 2020-11-08 22:18:36 +0100 | [diff] [blame] | 22 | <jib-maven-plugin.version>2.6.0</jib-maven-plugin.version> |
puthuparambil.aditya | 008c0ad | 2020-12-14 15:46:30 +0000 | [diff] [blame] | 23 | <minimum-coverage>0.35</minimum-coverage> |
Claudio David Gasparini | 24c217c | 2020-11-17 13:46:10 +0100 | [diff] [blame] | 24 | <nexusproxy>https://nexus.onap.org</nexusproxy> |
Claudio David Gasparini | 70c1702 | 2020-10-26 10:12:10 +0100 | [diff] [blame] | 25 | <oparent.version>3.1.0</oparent.version> |
Claudio David Gasparini | 13cc64d | 2020-12-02 18:47:09 +0100 | [diff] [blame] | 26 | <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> |
Claudio David Gasparini | 24c217c | 2020-11-17 13:46:10 +0100 | [diff] [blame] | 27 | <releaseNexusPath>/content/repositories/releases/</releaseNexusPath> |
Claudio David Gasparini | 900ba02 | 2020-11-08 22:18:36 +0100 | [diff] [blame] | 28 | <repository.name>nexus3.onap.org:10001/onap/cps-service</repository.name> |
Claudio David Gasparini | 70c1702 | 2020-10-26 10:12:10 +0100 | [diff] [blame] | 29 | <spring-boot-maven-plugin.version>2.3.3.RELEASE</spring-boot-maven-plugin.version> |
puthuparambil.aditya | 4759811 | 2020-11-02 11:31:39 +0000 | [diff] [blame] | 30 | <swagger-codegen-maven-plugin.version>3.0.18</swagger-codegen-maven-plugin.version> |
Claudio David Gasparini | 24c217c | 2020-11-17 13:46:10 +0100 | [diff] [blame] | 31 | <snapshotNexusPath>/content/repositories/snapshots/</snapshotNexusPath> |
Claudio David Gasparini | 900ba02 | 2020-11-08 22:18:36 +0100 | [diff] [blame] | 32 | <tag.version>${project.version}</tag.version> |
Claudio David Gasparini | 70c1702 | 2020-10-26 10:12:10 +0100 | [diff] [blame] | 33 | </properties> |
| 34 | |
Claudio David Gasparini | 24c217c | 2020-11-17 13:46:10 +0100 | [diff] [blame] | 35 | <distributionManagement> |
| 36 | <repository> |
| 37 | <id>ecomp-releases</id> |
| 38 | <name>ECOMP Release Repository</name> |
| 39 | <url>${nexusproxy}${releaseNexusPath}</url> |
| 40 | </repository> |
| 41 | <snapshotRepository> |
| 42 | <id>ecomp-snapshots</id> |
| 43 | <name>ECOMP Snapshot Repository</name> |
| 44 | <url>${nexusproxy}${snapshotNexusPath}</url> |
| 45 | </snapshotRepository> |
| 46 | </distributionManagement> |
| 47 | |
Claudio David Gasparini | 8710dc4 | 2020-11-16 17:37:15 +0100 | [diff] [blame] | 48 | <profiles> |
| 49 | <profile> |
Claudio David Gasparini | 3ef227a | 2020-11-16 18:50:40 +0100 | [diff] [blame] | 50 | <id>docker</id> |
Claudio David Gasparini | 8710dc4 | 2020-11-16 17:37:15 +0100 | [diff] [blame] | 51 | <activation> |
| 52 | <activeByDefault>false</activeByDefault> |
| 53 | </activation> |
| 54 | <build> |
| 55 | <pluginManagement> |
| 56 | <plugins> |
| 57 | <plugin> |
| 58 | <groupId>com.google.cloud.tools</groupId> |
| 59 | <artifactId>jib-maven-plugin</artifactId> |
| 60 | <version>${jib-maven-plugin.version}</version> |
| 61 | <configuration> |
| 62 | <container> |
| 63 | <mainClass>${app}</mainClass> |
| 64 | <creationTime>USE_CURRENT_TIMESTAMP</creationTime> |
| 65 | </container> |
| 66 | <from> |
| 67 | <image>${base.image}</image> |
| 68 | </from> |
| 69 | <to> |
| 70 | <image>${repository.name}</image> |
| 71 | <tags> |
| 72 | <tag>${tag.version}</tag> |
| 73 | </tags> |
| 74 | </to> |
| 75 | </configuration> |
| 76 | <executions> |
| 77 | <execution> |
| 78 | <phase>package</phase> |
| 79 | <id>build</id> |
| 80 | <goals> |
| 81 | <goal>dockerBuild</goal> |
| 82 | </goals> |
| 83 | </execution> |
| 84 | <execution> |
| 85 | <phase>deploy</phase> |
| 86 | <id>buildAndPush</id> |
| 87 | <goals> |
| 88 | <goal>build</goal> |
| 89 | </goals> |
| 90 | </execution> |
| 91 | </executions> |
| 92 | </plugin> |
| 93 | </plugins> |
| 94 | </pluginManagement> |
| 95 | </build> |
| 96 | </profile> |
Ruslan Kashapov | 7cca029 | 2020-11-24 11:13:43 +0200 | [diff] [blame] | 97 | <profile> |
| 98 | <id>skip-db-tests</id> |
| 99 | <activation> |
| 100 | <!-- exclude module tests by default till Jenkins is configured to support test containers --> |
| 101 | <activeByDefault>true</activeByDefault> |
| 102 | </activation> |
| 103 | <build> |
| 104 | <plugins> |
| 105 | <plugin> |
| 106 | <groupId>org.apache.maven.plugins</groupId> |
| 107 | <artifactId>maven-surefire-plugin</artifactId> |
| 108 | <configuration> |
| 109 | <excludes> |
| 110 | <exclude>**/spi/impl/*Test.java</exclude> |
| 111 | </excludes> |
| 112 | </configuration> |
| 113 | </plugin> |
| 114 | </plugins> |
| 115 | </build> |
| 116 | </profile> |
Claudio David Gasparini | 8710dc4 | 2020-11-16 17:37:15 +0100 | [diff] [blame] | 117 | </profiles> |
| 118 | |
Claudio David Gasparini | 70c1702 | 2020-10-26 10:12:10 +0100 | [diff] [blame] | 119 | <dependencyManagement> |
| 120 | <dependencies> |
| 121 | <dependency> |
| 122 | <groupId>org.onap.cps</groupId> |
| 123 | <artifactId>cps-dependencies</artifactId> |
| 124 | <version>${project.version}</version> |
| 125 | <type>pom</type> |
| 126 | <scope>import</scope> |
| 127 | </dependency> |
| 128 | <dependency> |
| 129 | <groupId>org.onap.cps</groupId> |
| 130 | <artifactId>cps-bom</artifactId> |
| 131 | <version>${project.version}</version> |
| 132 | <type>pom</type> |
| 133 | <scope>import</scope> |
| 134 | </dependency> |
| 135 | </dependencies> |
| 136 | </dependencyManagement> |
| 137 | |
| 138 | <build> |
| 139 | <resources> |
| 140 | <resource> |
| 141 | <directory>src/main/resources</directory> |
| 142 | <filtering>true</filtering> |
| 143 | </resource> |
| 144 | <resource> |
| 145 | <directory>target/generated-sources/license</directory> |
| 146 | <includes> |
| 147 | <include>third-party-licenses.txt</include> |
| 148 | </includes> |
| 149 | </resource> |
| 150 | <resource> |
| 151 | <directory>target/generated-resources/licenses</directory> |
| 152 | <includes> |
| 153 | <include>*.*</include> |
| 154 | </includes> |
| 155 | <targetPath>third-party-licenses</targetPath> |
| 156 | </resource> |
| 157 | </resources> |
| 158 | <pluginManagement> |
| 159 | <plugins> |
| 160 | <plugin> |
| 161 | <groupId>org.springframework.boot</groupId> |
| 162 | <artifactId>spring-boot-maven-plugin</artifactId> |
| 163 | <version>${spring-boot-maven-plugin.version}</version> |
| 164 | <executions> |
| 165 | <execution> |
| 166 | <goals> |
Ruslan Kashapov | f4d1c98 | 2020-10-29 11:39:31 +0200 | [diff] [blame] | 167 | <goal>build-info</goal> |
Claudio David Gasparini | 70c1702 | 2020-10-26 10:12:10 +0100 | [diff] [blame] | 168 | <goal>repackage</goal> |
| 169 | </goals> |
| 170 | </execution> |
| 171 | </executions> |
| 172 | </plugin> |
puthuparambil.aditya | 4759811 | 2020-11-02 11:31:39 +0000 | [diff] [blame] | 173 | <!-- Swagger code generation. --> |
| 174 | <plugin> |
| 175 | <groupId>io.swagger.codegen.v3</groupId> |
| 176 | <artifactId>swagger-codegen-maven-plugin</artifactId> |
| 177 | <version>${swagger-codegen-maven-plugin.version}</version> |
| 178 | <executions> |
| 179 | <execution> |
| 180 | <goals> |
| 181 | <goal>generate</goal> |
| 182 | </goals> |
| 183 | <configuration> |
| 184 | <inputSpec>${project.basedir}/docs/api/swagger/openapi.yml</inputSpec> |
| 185 | <invokerPackage>org.onap.cps.rest.controller</invokerPackage> |
| 186 | <modelPackage>org.onap.cps.rest.model</modelPackage> |
| 187 | <apiPackage>org.onap.cps.rest.api</apiPackage> |
| 188 | <language>spring</language> |
| 189 | <generateSupportingFiles>false</generateSupportingFiles> |
| 190 | <configOptions> |
| 191 | <sourceFolder>src/gen/java</sourceFolder> |
| 192 | <dateLibrary>java11</dateLibrary> |
| 193 | <interfaceOnly>true</interfaceOnly> |
| 194 | <useTags>true</useTags> |
| 195 | </configOptions> |
| 196 | </configuration> |
| 197 | </execution> |
| 198 | </executions> |
| 199 | </plugin> |
Claudio David Gasparini | 87c74a1 | 2020-11-18 08:38:01 +0100 | [diff] [blame] | 200 | <plugin> |
| 201 | <groupId>com.google.cloud.tools</groupId> |
| 202 | <artifactId>jib-maven-plugin</artifactId> |
| 203 | <version>${jib-maven-plugin.version}</version> |
| 204 | <configuration> |
| 205 | <container> |
| 206 | <mainClass>${app}</mainClass> |
| 207 | <creationTime>USE_CURRENT_TIMESTAMP</creationTime> |
| 208 | </container> |
| 209 | <from> |
| 210 | <image>${base.image}</image> |
| 211 | </from> |
| 212 | <to> |
| 213 | <image>${repository.name}</image> |
| 214 | <tags> |
| 215 | <tag>${tag.version}</tag> |
| 216 | </tags> |
| 217 | </to> |
| 218 | </configuration> |
| 219 | </plugin> |
Claudio David Gasparini | 70c1702 | 2020-10-26 10:12:10 +0100 | [diff] [blame] | 220 | </plugins> |
| 221 | </pluginManagement> |
| 222 | <plugins> |
| 223 | <plugin> |
| 224 | <groupId>org.apache.maven.plugins</groupId> |
| 225 | <artifactId>maven-compiler-plugin</artifactId> |
| 226 | <configuration> |
| 227 | <source>${java.version}</source> |
| 228 | <target>${java.version}</target> |
| 229 | </configuration> |
| 230 | </plugin> |
| 231 | <plugin> |
| 232 | <groupId>org.apache.maven.plugins</groupId> |
| 233 | <artifactId>maven-checkstyle-plugin</artifactId> |
| 234 | <executions> |
| 235 | <execution> |
Claudio David Gasparini | 35b2b44 | 2020-12-01 14:53:40 +0100 | [diff] [blame] | 236 | <id>onap-license</id> |
| 237 | <goals> |
| 238 | <goal>check</goal> |
| 239 | </goals> |
| 240 | <phase>process-sources</phase> |
| 241 | <configuration> |
| 242 | <configLocation>onap-checkstyle/check-license.xml</configLocation> |
| 243 | <includeResources>false</includeResources> |
| 244 | <includeTestSourceDirectory>true</includeTestSourceDirectory> |
| 245 | <includeTestResources>false</includeTestResources> |
| 246 | <sourceDirectories> |
| 247 | <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory> |
| 248 | </sourceDirectories> |
| 249 | <consoleOutput>false</consoleOutput> |
| 250 | <violationSeverity>warning</violationSeverity> |
| 251 | <failOnViolation>true</failOnViolation> |
| 252 | </configuration> |
| 253 | </execution> |
| 254 | <execution> |
Claudio David Gasparini | 70c1702 | 2020-10-26 10:12:10 +0100 | [diff] [blame] | 255 | <id>onap-java-style</id> |
| 256 | <goals> |
| 257 | <goal>check</goal> |
| 258 | </goals> |
| 259 | <phase>process-sources</phase> |
| 260 | <configuration> |
| 261 | <configLocation>onap-checkstyle/onap-java-style.xml</configLocation> |
Claudio David Gasparini | 35b2b44 | 2020-12-01 14:53:40 +0100 | [diff] [blame] | 262 | <sourceDirectories> |
| 263 | <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory> |
| 264 | </sourceDirectories> |
Claudio David Gasparini | 70c1702 | 2020-10-26 10:12:10 +0100 | [diff] [blame] | 265 | <includeResources>true</includeResources> |
| 266 | <includeTestSourceDirectory>true</includeTestSourceDirectory> |
| 267 | <includeTestResources>true</includeTestResources> |
| 268 | <consoleOutput>false</consoleOutput> |
| 269 | <violationSeverity>warning</violationSeverity> |
| 270 | <failOnViolation>true</failOnViolation> |
| 271 | </configuration> |
| 272 | </execution> |
Claudio David Gasparini | 35b2b44 | 2020-12-01 14:53:40 +0100 | [diff] [blame] | 273 | <execution> |
| 274 | <id>cps-java-style</id> |
| 275 | <goals> |
| 276 | <goal>check</goal> |
| 277 | </goals> |
| 278 | <phase>process-sources</phase> |
| 279 | <configuration> |
| 280 | <configLocation>cps-java-style.xml</configLocation> |
| 281 | <sourceDirectories> |
| 282 | <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory> |
| 283 | </sourceDirectories> |
| 284 | <includeResources>true</includeResources> |
| 285 | <includeTestSourceDirectory>true</includeTestSourceDirectory> |
| 286 | <includeTestResources>true</includeTestResources> |
| 287 | <consoleOutput>true</consoleOutput> |
| 288 | <violationSeverity>warning</violationSeverity> |
| 289 | <failOnViolation>true</failOnViolation> |
| 290 | </configuration> |
| 291 | </execution> |
Claudio David Gasparini | 70c1702 | 2020-10-26 10:12:10 +0100 | [diff] [blame] | 292 | </executions> |
| 293 | <dependencies> |
| 294 | <dependency> |
| 295 | <groupId>org.onap.oparent</groupId> |
| 296 | <artifactId>checkstyle</artifactId> |
| 297 | <version>${oparent.version}</version> |
| 298 | </dependency> |
Claudio David Gasparini | 35b2b44 | 2020-12-01 14:53:40 +0100 | [diff] [blame] | 299 | <dependency> |
| 300 | <groupId>${project.groupId}</groupId> |
| 301 | <artifactId>checkstyle</artifactId> |
| 302 | <version>${project.version}</version> |
| 303 | </dependency> |
Claudio David Gasparini | 70c1702 | 2020-10-26 10:12:10 +0100 | [diff] [blame] | 304 | </dependencies> |
| 305 | </plugin> |
| 306 | <!-- Mandatory plugins for using Spock --> |
| 307 | <plugin> |
| 308 | <!-- The gmavenplus plugin is used to compile Groovy code. |
| 309 | To learn more about this plugin, visit https://github.com/groovy/GMavenPlus/wiki --> |
| 310 | <groupId>org.codehaus.gmavenplus</groupId> |
| 311 | <artifactId>gmavenplus-plugin</artifactId> |
| 312 | <version>1.9.0</version> |
| 313 | <executions> |
| 314 | <execution> |
| 315 | <goals> |
| 316 | <goal>compileTests</goal> |
| 317 | </goals> |
| 318 | </execution> |
| 319 | </executions> |
| 320 | </plugin> |
| 321 | <!-- Required because names of spec classes don't match default |
| 322 | Surefire patterns (`*Test` etc.) --> |
| 323 | <plugin> |
| 324 | <groupId>org.apache.maven.plugins</groupId> |
| 325 | <artifactId>maven-surefire-plugin</artifactId> |
Claudio David Gasparini | 70c1702 | 2020-10-26 10:12:10 +0100 | [diff] [blame] | 326 | <configuration> |
puthuparambil.aditya | 008c0ad | 2020-12-14 15:46:30 +0000 | [diff] [blame] | 327 | <!--suppress UnresolvedMavenProperty --> |
Claudio David Gasparini | 13cc64d | 2020-12-02 18:47:09 +0100 | [diff] [blame] | 328 | <argLine>${surefireArgLine}</argLine> |
Claudio David Gasparini | 70c1702 | 2020-10-26 10:12:10 +0100 | [diff] [blame] | 329 | <useFile>false</useFile> |
| 330 | <includes> |
| 331 | <include>**/*Spec.java</include> |
| 332 | <include>**/*Test.java</include> <!-- Just in case of having also "normal" JUnit tests --> |
| 333 | </includes> |
Claudio David Gasparini | 13cc64d | 2020-12-02 18:47:09 +0100 | [diff] [blame] | 334 | <excludes> |
| 335 | <exclude>**/IT*.java</exclude> |
| 336 | </excludes> |
Claudio David Gasparini | 70c1702 | 2020-10-26 10:12:10 +0100 | [diff] [blame] | 337 | </configuration> |
| 338 | </plugin> |
Claudio David Gasparini | 900ba02 | 2020-11-08 22:18:36 +0100 | [diff] [blame] | 339 | <plugin> |
Claudio David Gasparini | 87c74a1 | 2020-11-18 08:38:01 +0100 | [diff] [blame] | 340 | <groupId>org.jacoco</groupId> |
| 341 | <artifactId>jacoco-maven-plugin</artifactId> |
Claudio David Gasparini | 87c74a1 | 2020-11-18 08:38:01 +0100 | [diff] [blame] | 342 | <executions> |
| 343 | <execution> |
| 344 | <id>default-prepare-agent</id> |
| 345 | <goals> |
| 346 | <goal>prepare-agent</goal> |
| 347 | </goals> |
| 348 | </execution> |
| 349 | <execution> |
| 350 | <id>coverage-check</id> |
| 351 | <goals> |
| 352 | <goal>check</goal> |
| 353 | </goals> |
| 354 | <configuration> |
puthuparambil.aditya | 008c0ad | 2020-12-14 15:46:30 +0000 | [diff] [blame] | 355 | <excludes> |
| 356 | <exclude>org/onap/cps/rest/model/*</exclude> |
| 357 | </excludes> |
Claudio David Gasparini | 13cc64d | 2020-12-02 18:47:09 +0100 | [diff] [blame] | 358 | <dataFile>${project.build.directory}/code-coverage/jacoco-ut.exec</dataFile> |
Claudio David Gasparini | 87c74a1 | 2020-11-18 08:38:01 +0100 | [diff] [blame] | 359 | <rules> |
| 360 | <rule> |
| 361 | <element>BUNDLE</element> |
| 362 | <limits> |
| 363 | <limit> |
| 364 | <counter>INSTRUCTION</counter> |
| 365 | <value>COVEREDRATIO</value> |
| 366 | <minimum>${minimum-coverage}</minimum> |
| 367 | </limit> |
| 368 | </limits> |
| 369 | </rule> |
| 370 | </rules> |
| 371 | </configuration> |
| 372 | </execution> |
| 373 | </executions> |
Claudio David Gasparini | 900ba02 | 2020-11-08 22:18:36 +0100 | [diff] [blame] | 374 | </plugin> |
Claudio David Gasparini | 70c1702 | 2020-10-26 10:12:10 +0100 | [diff] [blame] | 375 | </plugins> |
| 376 | </build> |
| 377 | </project> |