Skip to content

Commit

Permalink
Updated POM (#60)
Browse files Browse the repository at this point in the history
* Updated POM

* quick fix
  • Loading branch information
Kuldeep-knoldus authored Jan 12, 2024
1 parent a632936 commit 362fb33
Show file tree
Hide file tree
Showing 8 changed files with 752 additions and 144 deletions.
141 changes: 99 additions & 42 deletions admin-service/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,9 @@
<azure.version>2.3.5</azure.version>
<spring-cloud-gcp.version>4.5.1</spring-cloud-gcp.version>
<spring-cloud-azure.version>4.9.0</spring-cloud-azure.version>
<sonar.organization>java-competency-demo</sonar.organization>
<sonar.host.url>https://sonarcloud.io</sonar.host.url>
<sonar.projectKey>com.nashtech.java-competency-demo</sonar.projectKey>
<sonar.login>7c1f6c0cdb5f298f1bb3f516c7882bcc9dc3d529</sonar.login>
<maven.compiler.source>19</maven.compiler.source>
<maven.sonar.version>3.9.1.2184</maven.sonar.version>
<maven.jacoco.version>0.8.8</maven.jacoco.version>
</properties>
<dependencies>
<dependency>
Expand Down Expand Up @@ -92,67 +91,125 @@
</dependencyManagement>

<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.sonarsource.scanner.maven</groupId>
<artifactId>sonar-maven-plugin</artifactId>
<version>${sonarVersion}</version>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>${maven.jacoco.version}</version>
</plugin>
</plugins>
</pluginManagement>

<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>${maven.jacoco.version}</version>
<configuration>
<excludes>
<exclude>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</exclude>
<exclude>**/*config*/**</exclude>
<exclude>**/*common*/**</exclude>
<exclude>**/*constant*/**</exclude>
<exclude>**/*model*/**</exclude>
<exclude>**/*Application*</exclude>
<exclude>**/*entity*/**</exclude>
<exclude>**/resources/**</exclude>
</excludes>
</configuration>
</plugin>
<plugin>
<groupId>org.sonarsource.scanner.maven</groupId>
<artifactId>sonar-maven-plugin</artifactId>
<version>3.9.1.2184</version>
<executions>
<execution>
<phase>verify</phase>
<id>prepare-agent</id>
<goals>
<goal>sonar</goal>
<goal>prepare-agent</goal>
</goals>
<phase>test-compile</phase>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<configuration>
<suppressionsLocation>checkstyle-suppressions.xml</suppressionsLocation>
</configuration>
<executions>
<execution>
<phase>validate</phase>
<id>report</id>
<phase>test</phase>
<goals>
<goal>check</goal>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
<version>3.15.0</version>
<executions>
<execution>
<id>analyze</id>
<phase>verify</phase>
<id>jacoco-check</id>
<goals>
<goal>pmd</goal>
<goal>check</goal>
</goals>
<configuration>
<rules>
<rule implementation="org.jacoco.maven.RuleConfiguration">
<element>PACKAGE</element>
<limits>
<limit implementation="org.jacoco.report.check.Limit">
<counter>LINE</counter>
<value>COVEREDRATIO</value>
</limit>
</limits>
</rule>
</rules>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<linkXRef>false</linkXRef>
<format>html</format>
<outputDirectory>${project.build.directory}/pmd-reports</outputDirectory>
<excludes>
<exclude>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</build>

<profiles>
<profile>
<id>sonar</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<properties>
<!-- Sonar Config -->
<sonar.organization>nashtech</sonar.organization>
<sonar.host.url>https://sonarcloud.io</sonar.host.url>
<sonarConfig>b47aeba29df2889126c736ee7012a5a490edc34a</sonarConfig> <!-- NOSONAR -->
<sonar.login>${sonarConfig}</sonar.login> <!-- NOSONAR -->
<sonar.jacoco.reportPath>target/coverage-reports/jacoco.exec</sonar.jacoco.reportPath>
<sonar.coverage.exclusions>
**/*config*/**,
**/*common*/**,
**/*constant*/**,
**/*model*/**,
**/*Application.*
</sonar.coverage.exclusions>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.sonarsource.scanner.maven</groupId>
<artifactId>sonar-maven-plugin</artifactId>
<version>${maven.sonar.version}</version>
<executions>
<execution>
<phase>verify</phase>
<goals>
<goal>sonar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
89 changes: 0 additions & 89 deletions cart-service/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,6 @@
<dotenv.version>4.0.0</dotenv.version>
<maven.junit.jupiter.version>5.9.2</maven.junit.jupiter.version>
<maven.sonar.version>3.9.1.2184</maven.sonar.version>
<maven.checkstyle.version>3.2.1</maven.checkstyle.version>
<maven.spotbugs.version>4.7.3.4</maven.spotbugs.version>
<maven.findbugs.version>1.12.0</maven.findbugs.version>
<maven.pmd.version>3.20.0</maven.pmd.version>
<maven.jacoco.version>0.8.8</maven.jacoco.version>
<minimumCodeCoverage>.80</minimumCodeCoverage>
</properties>
Expand Down Expand Up @@ -118,21 +114,6 @@
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
<version>${maven.pmd.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>${maven.checkstyle.version}</version>
</plugin>
<plugin>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<version>${maven.spotbugs.version}</version>
</plugin>
<plugin>
<groupId>org.sonarsource.scanner.maven</groupId>
<artifactId>sonar-maven-plugin</artifactId>
Expand All @@ -147,38 +128,6 @@
</pluginManagement>

<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
<version>${maven.pmd.version}</version>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>pmd</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>${maven.checkstyle.version}</version>
<configuration>
<consoleOutput>true</consoleOutput>
<failsOnError>false</failsOnError>
<failOnViolation>false</failOnViolation>
</configuration>
<executions>
<execution>
<id>validate</id>
<phase>validate</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
Expand Down Expand Up @@ -222,8 +171,6 @@
<limit implementation="org.jacoco.report.check.Limit">
<counter>LINE</counter>
<value>COVEREDRATIO</value>
<minimum>${minimumCodeCoverage}
</minimum>
</limit>
</limits>
</rule>
Expand All @@ -232,38 +179,6 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<version>${maven.spotbugs.version}</version>
<executions>
<execution>
<id>check</id>
<phase>test</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
<configuration>
<failOnError>true</failOnError>
<spotbugsXmlOutputFilename>findbugs.xml
</spotbugsXmlOutputFilename>
<includeFilterFile>
${basedir}/src/main/resources/spotbugs/spotbugs-security-include.xml
</includeFilterFile>
<excludeFilterFile>
${basedir}/src/main/resources/spotbugs/spotbugs-security-exclude.xml
</excludeFilterFile>
<plugins>
<plugin>
<groupId>com.h3xstream.findsecbugs</groupId>
<artifactId>findsecbugs-plugin</artifactId>
<version>${maven.findbugs.version}</version>
</plugin>
</plugins>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
Expand All @@ -286,7 +201,6 @@
</plugin>
</plugins>
</build>

<profiles>
<profile>
<id>sonar</id>
Expand All @@ -299,9 +213,6 @@
<sonar.host.url>https://sonarcloud.io</sonar.host.url>
<sonarConfig>b47aeba29df2889126c736ee7012a5a490edc34a</sonarConfig> <!-- NOSONAR -->
<sonar.login>${sonarConfig}</sonar.login> <!-- NOSONAR -->
<sonar.java.checkstyle.reportPaths>target/checkstyle-result.xml</sonar.java.checkstyle.reportPaths>
<sonar.java.pmd.reportPaths>target/pmd.xml</sonar.java.pmd.reportPaths>
<sonar.java.findbugs.reportPaths>target/findbugsXml.xml</sonar.java.findbugs.reportPaths>
<sonar.jacoco.reportPath>target/coverage-reports/jacoco.exec</sonar.jacoco.reportPath>
<sonar.coverage.exclusions>
**/*config*/**,
Expand Down
Loading

0 comments on commit 362fb33

Please sign in to comment.