| <?xml version="1.0" encoding="UTF-8"?> |
| <project xmlns="http://maven.apache.org/POM/4.0.0" |
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
| <parent> |
| <groupId>org.onap.oparent</groupId> |
| <artifactId>oparent</artifactId> |
| <version>3.1.0</version> |
| <relativePath/> |
| </parent> |
| <modelVersion>4.0.0</modelVersion> |
| |
| <groupId>org.onap.cps</groupId> |
| <artifactId>cps-parent</artifactId> |
| <version>0.0.1-SNAPSHOT</version> |
| <packaging>pom</packaging> |
| |
| <properties> |
| <app>org.onap.cps.Application</app> |
| <base.image>openjdk:11-jre-slim</base.image> |
| <java.version>11</java.version> |
| <jib-maven-plugin.version>2.6.0</jib-maven-plugin.version> |
| <oparent.version>3.1.0</oparent.version> |
| <repository.name>nexus3.onap.org:10001/onap/cps-service</repository.name> |
| <spring-boot-maven-plugin.version>2.3.3.RELEASE</spring-boot-maven-plugin.version> |
| <swagger-codegen-maven-plugin.version>3.0.18</swagger-codegen-maven-plugin.version> |
| <tag.version>${project.version}</tag.version> |
| </properties> |
| |
| <profiles> |
| <profile> |
| <id>docker</id> |
| <activation> |
| <activeByDefault>false</activeByDefault> |
| </activation> |
| <build> |
| <pluginManagement> |
| <plugins> |
| <plugin> |
| <groupId>com.google.cloud.tools</groupId> |
| <artifactId>jib-maven-plugin</artifactId> |
| <version>${jib-maven-plugin.version}</version> |
| <configuration> |
| <container> |
| <mainClass>${app}</mainClass> |
| <creationTime>USE_CURRENT_TIMESTAMP</creationTime> |
| </container> |
| <from> |
| <image>${base.image}</image> |
| </from> |
| <to> |
| <image>${repository.name}</image> |
| <tags> |
| <tag>${tag.version}</tag> |
| </tags> |
| </to> |
| </configuration> |
| <executions> |
| <execution> |
| <phase>package</phase> |
| <id>build</id> |
| <goals> |
| <goal>dockerBuild</goal> |
| </goals> |
| </execution> |
| <execution> |
| <phase>deploy</phase> |
| <id>buildAndPush</id> |
| <goals> |
| <goal>build</goal> |
| </goals> |
| </execution> |
| </executions> |
| </plugin> |
| </plugins> |
| </pluginManagement> |
| </build> |
| </profile> |
| </profiles> |
| |
| <dependencyManagement> |
| <dependencies> |
| <dependency> |
| <groupId>org.onap.cps</groupId> |
| <artifactId>cps-dependencies</artifactId> |
| <version>${project.version}</version> |
| <type>pom</type> |
| <scope>import</scope> |
| </dependency> |
| <dependency> |
| <groupId>org.onap.cps</groupId> |
| <artifactId>cps-bom</artifactId> |
| <version>${project.version}</version> |
| <type>pom</type> |
| <scope>import</scope> |
| </dependency> |
| </dependencies> |
| </dependencyManagement> |
| |
| <build> |
| <resources> |
| <resource> |
| <directory>src/main/resources</directory> |
| <filtering>true</filtering> |
| </resource> |
| <resource> |
| <directory>target/generated-sources/license</directory> |
| <includes> |
| <include>third-party-licenses.txt</include> |
| </includes> |
| </resource> |
| <resource> |
| <directory>target/generated-resources/licenses</directory> |
| <includes> |
| <include>*.*</include> |
| </includes> |
| <targetPath>third-party-licenses</targetPath> |
| </resource> |
| </resources> |
| <pluginManagement> |
| <plugins> |
| <plugin> |
| <groupId>org.springframework.boot</groupId> |
| <artifactId>spring-boot-maven-plugin</artifactId> |
| <version>${spring-boot-maven-plugin.version}</version> |
| <executions> |
| <execution> |
| <goals> |
| <goal>build-info</goal> |
| <goal>repackage</goal> |
| </goals> |
| </execution> |
| </executions> |
| </plugin> |
| <!-- Swagger code generation. --> |
| <plugin> |
| <groupId>io.swagger.codegen.v3</groupId> |
| <artifactId>swagger-codegen-maven-plugin</artifactId> |
| <version>${swagger-codegen-maven-plugin.version}</version> |
| <executions> |
| <execution> |
| <goals> |
| <goal>generate</goal> |
| </goals> |
| <configuration> |
| <inputSpec>${project.basedir}/docs/api/swagger/openapi.yml</inputSpec> |
| <invokerPackage>org.onap.cps.rest.controller</invokerPackage> |
| <modelPackage>org.onap.cps.rest.model</modelPackage> |
| <apiPackage>org.onap.cps.rest.api</apiPackage> |
| <language>spring</language> |
| <generateSupportingFiles>false</generateSupportingFiles> |
| <configOptions> |
| <sourceFolder>src/gen/java</sourceFolder> |
| <dateLibrary>java11</dateLibrary> |
| <interfaceOnly>true</interfaceOnly> |
| <useTags>true</useTags> |
| </configOptions> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| </plugins> |
| </pluginManagement> |
| <plugins> |
| <plugin> |
| <groupId>org.apache.maven.plugins</groupId> |
| <artifactId>maven-compiler-plugin</artifactId> |
| <configuration> |
| <source>${java.version}</source> |
| <target>${java.version}</target> |
| </configuration> |
| </plugin> |
| <plugin> |
| <groupId>org.apache.maven.plugins</groupId> |
| <artifactId>maven-checkstyle-plugin</artifactId> |
| <executions> |
| <execution> |
| <id>onap-java-style</id> |
| <goals> |
| <goal>check</goal> |
| </goals> |
| <phase>process-sources</phase> |
| <configuration> |
| <configLocation>onap-checkstyle/onap-java-style.xml</configLocation> |
| <sourceDirectories>${project.build.sourceDirectory}</sourceDirectories> |
| <includeResources>true</includeResources> |
| <includeTestSourceDirectory>true</includeTestSourceDirectory> |
| <includeTestResources>true</includeTestResources> |
| <consoleOutput>false</consoleOutput> |
| <violationSeverity>warning</violationSeverity> |
| <failOnViolation>true</failOnViolation> |
| </configuration> |
| </execution> |
| </executions> |
| <dependencies> |
| <dependency> |
| <groupId>org.onap.oparent</groupId> |
| <artifactId>checkstyle</artifactId> |
| <version>${oparent.version}</version> |
| </dependency> |
| </dependencies> |
| </plugin> |
| <!-- Mandatory plugins for using Spock --> |
| <plugin> |
| <!-- The gmavenplus plugin is used to compile Groovy code. |
| To learn more about this plugin, visit https://github.com/groovy/GMavenPlus/wiki --> |
| <groupId>org.codehaus.gmavenplus</groupId> |
| <artifactId>gmavenplus-plugin</artifactId> |
| <version>1.9.0</version> |
| <executions> |
| <execution> |
| <goals> |
| <goal>compileTests</goal> |
| </goals> |
| </execution> |
| </executions> |
| </plugin> |
| <!-- Required because names of spec classes don't match default |
| Surefire patterns (`*Test` etc.) --> |
| <plugin> |
| <groupId>org.apache.maven.plugins</groupId> |
| <artifactId>maven-surefire-plugin</artifactId> |
| <version>3.0.0-M5</version> |
| <configuration> |
| <useFile>false</useFile> |
| <includes> |
| <include>**/*Spec.java</include> |
| <include>**/*Test.java</include> <!-- Just in case of having also "normal" JUnit tests --> |
| </includes> |
| </configuration> |
| </plugin> |
| <plugin> |
| <groupId>com.google.cloud.tools</groupId> |
| <artifactId>jib-maven-plugin</artifactId> |
| <version>${jib-maven-plugin.version}</version> |
| <configuration> |
| <container> |
| <mainClass>${app}</mainClass> |
| <creationTime>USE_CURRENT_TIMESTAMP</creationTime> |
| </container> |
| <from> |
| <image>${base.image}</image> |
| </from> |
| <to> |
| <image>${repository.name}</image> |
| <tags> |
| <tag>${tag.version}</tag> |
| </tags> |
| </to> |
| </configuration> |
| </plugin> |
| </plugins> |
| </build> |
| </project> |