Skip to content

Commit

Permalink
Move Checkstyle to the root pom.xml
Browse files Browse the repository at this point in the history
  • Loading branch information
Net-burst committed Feb 27, 2025
1 parent 8dbce72 commit 7a8bcc3
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 52 deletions.
48 changes: 48 additions & 0 deletions extra/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
<maven-failsafe-plugin.version>${maven-surefire-plugin.version}</maven-failsafe-plugin.version>
<jacoco-maven-plugin.version>0.8.12</jacoco-maven-plugin.version>
<docker-maven-plugin.version>0.44.0</docker-maven-plugin.version>
<checkstyle-plugin.version>3.6.0</checkstyle-plugin.version>
<checkstyle.version>10.17.0</checkstyle.version>

<!-- Project production dependency versions -->
<spring.boot.version>3.2.3</spring.boot.version>
Expand Down Expand Up @@ -263,6 +265,35 @@

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>${checkstyle-plugin.version}</version>
<configuration>
<!-- Project rooted path to CheckStyle configuration file. -->
<configLocation>${maven.multiModuleProjectDirectory}/checkstyle.xml</configLocation>
<consoleOutput>true</consoleOutput>
<!-- true if project build should fails on any style violation. -->
<failsOnError>true</failsOnError>
<linkXRef>false</linkXRef>
<includeTestSourceDirectory>true</includeTestSourceDirectory>
</configuration>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>checkstyle-aggregate</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle</artifactId>
<version>${checkstyle.version}</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
Expand Down Expand Up @@ -296,4 +327,21 @@
</plugin>
</plugins>
</build>

<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>${checkstyle-plugin.version}</version>
<reportSets>
<reportSet>
<reports>
<report>checkstyle</report>
</reports>
</reportSet>
</reportSets>
</plugin>
</plugins>
</reporting>
</project>
52 changes: 0 additions & 52 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@
<dockerfileName>Dockerfile</dockerfileName>

<!-- plugin versions -->
<checkstyle-plugin.version>3.4.0</checkstyle-plugin.version>
<checkstyle.version>10.17.0</checkstyle.version>
<download-plugin.version>1.9.0</download-plugin.version>
<git-commmit-plugin.version>4.9.10</git-commmit-plugin.version>

Expand Down Expand Up @@ -398,28 +396,6 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>${checkstyle-plugin.version}</version>
<configuration>
<!-- Project rooted path to CheckStyle configuration file. -->
<configLocation>checkstyle.xml</configLocation>
<encoding>UTF-8</encoding>
<consoleOutput>true</consoleOutput>
<!-- true if project build should fails on any style violation. -->
<failsOnError>true</failsOnError>
<linkXRef>false</linkXRef>
<includeTestSourceDirectory>true</includeTestSourceDirectory>
</configuration>
<dependencies>
<dependency>
<groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle</artifactId>
<version>${checkstyle.version}</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.codehaus.gmavenplus</groupId>
<artifactId>gmavenplus-plugin</artifactId>
Expand Down Expand Up @@ -455,18 +431,6 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>checkstyle</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.xolstice.maven.plugins</groupId>
<artifactId>protobuf-maven-plugin</artifactId>
Expand Down Expand Up @@ -690,22 +654,6 @@
</plugins>
</build>

<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<reportSets>
<reportSet>
<reports>
<report>checkstyle</report>
</reports>
</reportSet>
</reportSets>
</plugin>
</plugins>
</reporting>

<profiles>
<profile>
<!-- Run only one application container instance on fixed ports for debugging purposes -->
Expand Down

0 comments on commit 7a8bcc3

Please sign in to comment.