summaryrefslogtreecommitdiffstats
path: root/pom.xml
diff options
context:
space:
mode:
authorsourabh_sourabh <sourabh.sourabh@est.tech>2024-10-22 14:00:29 +0100
committersourabh_sourabh <sourabh.sourabh@est.tech>2024-10-23 11:29:07 +0100
commit1e1f49f7947271b15fa9b096a022e827d952a043 (patch)
tree3958d835c4df52547590bdfb98d945233e72a035 /pom.xml
parent46cbc868a7d0adbd8d5f2de0f33ec995c6c13f0a (diff)
Added maven-checkstyle-plugin to parent POM for code style checks
- Integrate Checkstyle to enforce coding standards across modules. - Ensure Checkstyle applies to both dmi-service and dmi-stub modules. - Fixed all code check style issues. Issue-ID: CPS-2461 Change-Id: Ie84928c1f2e3de549cc8fab2001974369884a831 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
Diffstat (limited to 'pom.xml')
-rw-r--r--pom.xml82
1 files changed, 82 insertions, 0 deletions
diff --git a/pom.xml b/pom.xml
index b457e235..f8d34c52 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1,3 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
<!--
============LICENSE_START=======================================================
Copyright (c) 2021-2024 Nordix Foundation.
@@ -18,6 +19,7 @@
SPDX-License-Identifier: Apache-2.0
============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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
@@ -43,4 +45,84 @@
<name>ncmp-dmi-plugin</name>
<description>DMI Plugin Service</description>
+ <properties>
+ <cps.version>3.5.2</cps.version>
+ </properties>
+
+ <build>
+ <plugins>
+ <!-- Add the Maven Checkstyle Plugin here -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>onap-license</id>
+ <goals>
+ <goal>check</goal>
+ </goals>
+ <phase>process-sources</phase>
+ <configuration>
+ <configLocation>onap-checkstyle/check-license.xml</configLocation>
+ <includeResources>false</includeResources>
+ <includeTestSourceDirectory>true</includeTestSourceDirectory>
+ <includeTestResources>false</includeTestResources>
+ <sourceDirectories>
+ <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
+ </sourceDirectories>
+ <consoleOutput>false</consoleOutput>
+ <violationSeverity>warning</violationSeverity>
+ <failOnViolation>true</failOnViolation>
+ </configuration>
+ </execution>
+ <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>
+ <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
+ </sourceDirectories>
+ <includeResources>true</includeResources>
+ <includeTestSourceDirectory>true</includeTestSourceDirectory>
+ <includeTestResources>true</includeTestResources>
+ <consoleOutput>false</consoleOutput>
+ <violationSeverity>warning</violationSeverity>
+ <failOnViolation>true</failOnViolation>
+ </configuration>
+ </execution>
+ <execution>
+ <id>cps-java-style</id>
+ <goals>
+ <goal>check</goal>
+ </goals>
+ <phase>process-sources</phase>
+ <configuration>
+ <configLocation>cps-java-style.xml</configLocation>
+ <sourceDirectories>
+ <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
+ </sourceDirectories>
+ <includeResources>true</includeResources>
+ <includeTestSourceDirectory>true</includeTestSourceDirectory>
+ <includeTestResources>true</includeTestResources>
+ <consoleOutput>true</consoleOutput>
+ <violationSeverity>warning</violationSeverity>
+ <failOnViolation>true</failOnViolation>
+ </configuration>
+ </execution>
+ </executions>
+ <dependencies>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>checkstyle</artifactId>
+ <version>${cps.version}</version>
+ </dependency>
+ </dependencies>
+ </plugin>
+ </plugins>
+ </build>
+
</project>