<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ============LICENSE_START=======================================================
+ Copyright (c) 2021 Pantheon.tech.
+ Modifications Copyright (C) 2021 Bell Canada.
+ Modifications Copyright (C) 2021-2022 Nordix Foundation.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ============LICENSE_END=========================================================
+-->
+
<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>
+ <version>3.2.0</version>
<relativePath/>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.onap.cps</groupId>
<artifactId>cps-parent</artifactId>
- <version>0.0.1-SNAPSHOT</version>
+ <version>3.1.0-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>
- <minimum-coverage>0.9</minimum-coverage>
- <nexusproxy>https://nexus.onap.org</nexusproxy>
- <oparent.version>3.1.0</oparent.version>
- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- <releaseNexusPath>/content/repositories/releases/</releaseNexusPath>
- <repository.name>nexus3.onap.org:10001/onap/cps-service</repository.name>
- <spotbugs-maven-plugin.version>4.1.3</spotbugs-maven-plugin.version>
- <spring-boot-maven-plugin.version>2.3.3.RELEASE</spring-boot-maven-plugin.version>
- <spotbugs.slf4j.version>1.8.0-beta4</spotbugs.slf4j.version>
- <spotbugs.bug-pattern.version>1.5.0</spotbugs.bug-pattern.version>
- <spotbugs.version>4.2.0</spotbugs.version>
- <swagger-codegen-maven-plugin.version>3.0.18</swagger-codegen-maven-plugin.version>
- <snapshotNexusPath>/content/repositories/snapshots/</snapshotNexusPath>
- <tag.version>${project.version}</tag.version>
+ <minimum-coverage>0.97</minimum-coverage>
<jacoco.reportDirectory.aggregate>${project.reporting.outputDirectory}/jacoco-aggregate</jacoco.reportDirectory.aggregate>
<sonar.coverage.jacoco.xmlReportPaths>
- ../cps-ri/target/site/jacoco-ut/jacoco.xml,
- ../cps-ri/target/site/jacoco-aggregate/jacoco.xml,
- ../cps-service/target/site/jacoco-ut/jacoco.xml,
- ../cps-service/target/site/jacoco-aggregate/jacoco.xml,
- ../cps-rest/target/site/jacoco-ut/jacoco.xml,
- ../cps-rest/target/site/jacoco-aggregate/jacoco.xml,
- ../cps-nf-proxy-rest/target/site/jacoco-ut/jacoco.xml,
- ../cps-nf-proxy-rest/target/site/jacoco-aggregate/jacoco.xml,
+ ../jacoco-report/target/site/jacoco-aggregate/jacoco.xml
</sonar.coverage.jacoco.xmlReportPaths>
</properties>
- <distributionManagement>
- <repository>
- <id>ecomp-releases</id>
- <name>ECOMP Release Repository</name>
- <url>${nexusproxy}${releaseNexusPath}</url>
- </repository>
- <snapshotRepository>
- <id>ecomp-snapshots</id>
- <name>ECOMP Snapshot Repository</name>
- <url>${nexusproxy}${snapshotNexusPath}</url>
- </snapshotRepository>
- </distributionManagement>
+ <profiles>
+ <profile>
+ <id>Windows</id>
+ <activation>
+ <os>
+ <family>Windows</family>
+ </os>
+ </activation>
+ <properties>
+ <script.executor>python</script.executor>
+ </properties>
+ </profile>
+ <profile>
+ <id>unix</id>
+ <activation>
+ <os>
+ <family>unix</family>
+ </os>
+ </activation>
+ <properties>
+ <script.executor>python3</script.executor>
+ </properties>
+ </profile>
+ </profiles>
<dependencyManagement>
<dependencies>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
- <version>${spring-boot-maven-plugin.version}</version>
+ <version>2.6.4</version>
<executions>
<execution>
<goals>
</execution>
</executions>
</plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>3.0.0-M5</version>
+ </plugin>
<!-- Swagger code generation. -->
<plugin>
<groupId>io.swagger.codegen.v3</groupId>
<artifactId>swagger-codegen-maven-plugin</artifactId>
- <version>${swagger-codegen-maven-plugin.version}</version>
+ <version>3.0.27</version>
<executions>
<execution>
+ <id>openapi-yaml-gen</id>
<goals>
<goal>generate</goal>
</goals>
+ <phase>compile</phase>
<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>
+ <inputSpec>${project.basedir}/docs/openapi/openapi.yml</inputSpec>
+ <language>openapi-yaml</language>
</configuration>
</execution>
</executions>
</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>
<plugin>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
- <version>${spotbugs-maven-plugin.version}</version>
+ <version>4.1.3</version>
<dependencies>
<dependency>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs</artifactId>
- <version>${spotbugs.version}</version>
+ <version>4.2.0</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<!-- The SpotBugs Maven plugin uses SLF4J 1.8 beta 2 -->
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
- <version>${spotbugs.slf4j.version}</version>
+ <version>1.8.0-beta4</version>
</dependency>
</dependencies>
<configuration>
If you run out of memory, changes the value of the effort element
to 'Low'.
-->
+ <addSourceDirs>true</addSourceDirs>
<effort>Max</effort>
<!-- Reports all bugs (other values are medium and max) -->
<threshold>Low</threshold>
</execution>
</executions>
</plugin>
+ <plugin>
+ <groupId>org.jsonschema2pojo</groupId>
+ <artifactId>jsonschema2pojo-maven-plugin</artifactId>
+ <version>1.1.1</version>
+ <configuration>
+ <targetVersion>${java.version}</targetVersion>
+ </configuration>
+ <executions>
+ <execution>
+ <goals>
+ <goal>generate</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</pluginManagement>
<plugins>
<dependency>
<groupId>org.onap.oparent</groupId>
<artifactId>checkstyle</artifactId>
- <version>${oparent.version}</version>
+ <version>3.1.0</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
see https://www.testcontainers.org/features/configuration/#disabling-ryuk
-->
<TESTCONTAINERS_RYUK_DISABLED>true</TESTCONTAINERS_RYUK_DISABLED>
+ <TESTCONTAINERS_HUB_IMAGE_NAME_PREFIX>${docker.pull.registry}/</TESTCONTAINERS_HUB_IMAGE_NAME_PREFIX>
</environmentVariables>
</configuration>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
+ <configuration>
+ <excludes>
+ <exclude>org/onap/cps/event/model/*</exclude>
+ <exclude>org/onap/cps/rest/model/*</exclude>
+ <exclude>org/onap/cps/cpspath/parser/antlr4/*</exclude>
+ <exclude>org/onap/cps/ncmp/rest/model/*</exclude>
+ </excludes>
+ </configuration>
<executions>
<execution>
<id>default-prepare-agent</id>
<goal>check</goal>
</goals>
<configuration>
- <excludes>
- <exclude>org/onap/cps/rest/model/*</exclude>
- </excludes>
<dataFile>${project.build.directory}/code-coverage/jacoco-ut.exec</dataFile>
<rules>
<rule>
</rules>
</configuration>
</execution>
- <execution>
- <id>report</id>
- <goals>
- <goal>report-aggregate</goal>
- </goals>
- <phase>verify</phase>
- <configuration>
- <dataFileIncludes>
- <fileInclude>**/code-coverage/jacoco-ut.exec</fileInclude>
- </dataFileIncludes>
- </configuration>
- </execution>
</executions>
</plugin>
<plugin>
<groupId>org.sonarsource.scanner.maven</groupId>
<artifactId>sonar-maven-plugin</artifactId>
</plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>exec-maven-plugin</artifactId>
+ <version>1.6.0</version>
+ <executions>
+ <execution>
+ <id>generate-csv</id>
+ <phase>prepare-package</phase>
+ <goals>
+ <goal>exec</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <executable>${script.executor}</executable>
+ <workingDirectory>../cps-ri/src/main/resources/</workingDirectory>
+ <arguments>
+ <argument>yangResourceCsvGenerator.py</argument>
+ <argument>dmi-registry@2021-12-13</argument>
+ <argument>dmi-registry@2022-02-10</argument>
+ </arguments>
+ </configuration>
+ </plugin>
</plugins>
</build>
-</project>
\ No newline at end of file
+</project>