Skip to content

Commit

Permalink
Do not execute spotless in Java 21
Browse files Browse the repository at this point in the history
  • Loading branch information
gortiz committed Sep 25, 2023
1 parent e6655dd commit 2cb9bbb
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 54 deletions.
53 changes: 24 additions & 29 deletions pinot-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -61,35 +61,6 @@
<groupId>org.xolstice.maven.plugins</groupId>
<artifactId>protobuf-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
<version>2.28.0</version>
<executions>
<execution>
<phase>verify</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
<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>
<plugin>
<!-- Extract parser grammar template from calcite-core.jar and put
it under ${project.build.directory} where all freemarker templates are. -->
Expand Down Expand Up @@ -178,6 +149,30 @@
</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
64 changes: 39 additions & 25 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,20 @@
</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 @@ -1306,6 +1320,31 @@
</extensions>
<pluginManagement>
<plugins>
<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
<version>2.28.0</version>
<executions>
<execution>
<phase>verify</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
<configuration>
<java>
<includes>
<include>src/main/java/**/*.java</include>
<include>src/test/java/**/*.java</include>
</includes>
<importOrder>
<order>,\#</order>
</importOrder>
<removeUnusedImports/>
</java>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>appassembler-maven-plugin</artifactId>
Expand Down Expand Up @@ -1641,31 +1680,6 @@
<artifactId>sonar-maven-plugin</artifactId>
<version>2.7.1</version>
</plugin>
<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
<version>2.28.0</version>
<executions>
<execution>
<phase>verify</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
<configuration>
<java>
<includes>
<include>src/main/java/**/*.java</include>
<include>src/test/java/**/*.java</include>
</includes>
<importOrder>
<order>,\#</order>
</importOrder>
<removeUnusedImports/>
</java>
</configuration>
</plugin>
<plugin>
<groupId>com.mycila</groupId>
<artifactId>license-maven-plugin</artifactId>
Expand Down

0 comments on commit 2cb9bbb

Please sign in to comment.