Skip to content

Commit

Permalink
Re-enable the Spotless plugin for Java 21 (#12992)
Browse files Browse the repository at this point in the history
  • Loading branch information
yashmayya authored Apr 25, 2024
1 parent 3f0b748 commit 84a4c70
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 40 deletions.
38 changes: 13 additions & 25 deletions pinot-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,19 @@
<artifactId>protobuf-maven-plugin</artifactId>
</plugin>

<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
<configuration>
<java>
<excludes>
<exclude>src/main/java/org/apache/pinot/common/request/*.java</exclude>
<exclude>src/main/java/org/apache/pinot/common/response/ProcessingException.java</exclude>
</excludes>
</java>
</configuration>
</plugin>

<!-- Following plugins and their configurations are used to generate the custom Calcite's SQL parser -->
<!-- Copy the templates present in the codegen directory to ${project.build.directory}/codegen -->
<plugin>
Expand Down Expand Up @@ -129,31 +142,6 @@
</executions>
</plugin>
</plugins>

<pluginManagement>
<plugins>
<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
<configuration>
<java>
<includes>
<include>src/main/java/**/*.java</include>
<include>src/test/java/**/*.java</include>
</includes>
<excludes>
<exclude>src/main/java/org/apache/pinot/common/request/*.java</exclude>
<exclude>src/main/java/org/apache/pinot/common/response/ProcessingException.java</exclude>
</excludes>
<importOrder>
<order>,\#</order>
</importOrder>
<removeUnusedImports/>
</java>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
<dependencies>
<dependency>
Expand Down
19 changes: 4 additions & 15 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -254,20 +254,6 @@
</properties>

<profiles>
<profile>
<id>not-java-21</id>
<activation>
<jdk>!21</jdk>
</activation>
<build>
<plugins>
<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>github-actions</id>
<activation>
Expand Down Expand Up @@ -1609,7 +1595,6 @@
<version>2.43.0</version>
<executions>
<execution>
<phase>verify</phase>
<goals>
<goal>check</goal>
</goals>
Expand Down Expand Up @@ -2063,6 +2048,10 @@
<artifactId>sonar-maven-plugin</artifactId>
<version>2.7.1</version>
</plugin>
<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>com.mycila</groupId>
<artifactId>license-maven-plugin</artifactId>
Expand Down

0 comments on commit 84a4c70

Please sign in to comment.