Skip to content

Commit

Permalink
Re-enable the Spotless plugin for Java 21
Browse files Browse the repository at this point in the history
  • Loading branch information
yashmayya committed Apr 23, 2024
1 parent 8e10320 commit ef86863
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 39 deletions.
46 changes: 21 additions & 25 deletions pinot-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,27 @@
<artifactId>protobuf-maven-plugin</artifactId>
</plugin>

<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>

<!-- 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 +150,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
18 changes: 4 additions & 14 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -255,20 +255,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 @@ -2080,6 +2066,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 ef86863

Please sign in to comment.