|
179 | 179 | <mojo.java.target>8</mojo.java.target> |
180 | 180 | <maven.compiler.source>${mojo.java.target}</maven.compiler.source> |
181 | 181 | <maven.compiler.target>${mojo.java.target}</maven.compiler.target> |
| 182 | + <maven.compiler.release>${mojo.java.target}</maven.compiler.release> |
182 | 183 | <maven.compiler.showDeprecation>true</maven.compiler.showDeprecation> |
183 | 184 |
|
184 | 185 | <minimalJavaBuildVersion>${mojo.java.target}</minimalJavaBuildVersion> |
|
235 | 236 | <versions-maven-plugin.version>2.18.0</versions-maven-plugin.version> |
236 | 237 | <sisu-maven-plugin.version>0.9.0.M4</sisu-maven-plugin.version> |
237 | 238 | <spotless-maven-plugin.version>2.44.5</spotless-maven-plugin.version> |
| 239 | + <!-- we use version 2.56.0 due to: https://github.com/palantir/palantir-java-format/issues/1320 --> |
| 240 | + <palantirJavaFormat.version>2.56.0</palantirJavaFormat.version> |
238 | 241 | <project.build.outputTimestamp>2025-06-02T19:00:39Z</project.build.outputTimestamp> |
239 | 242 | <!-- mono-module doesn't require site:stage for scm-publish --> |
240 | 243 | <scmpublish.content>${project.reporting.outputDirectory}</scmpublish.content> |
|
610 | 613 | <java> |
611 | 614 | <!-- orders of used formatters are important --> |
612 | 615 | <!-- eg. palantir override importOrder, so should be first --> |
613 | | - <palantirJavaFormat /> |
| 616 | + <palantirJavaFormat> |
| 617 | + <!-- Declare version so that spotless does not choose a version based on JDK version --> |
| 618 | + <!-- https://github.com/diffplug/spotless/issues/2503#issuecomment-2953146277 --> |
| 619 | + <version>${palantirJavaFormat.version}</version> |
| 620 | + </palantirJavaFormat> |
614 | 621 | <removeUnusedImports /> |
615 | 622 | <importOrder> |
616 | 623 | <order>javax,java,,\#</order> |
|
711 | 718 | </execution> |
712 | 719 | </executions> |
713 | 720 | </plugin> |
714 | | - <plugin> |
715 | | - <groupId>com.diffplug.spotless</groupId> |
716 | | - <artifactId>spotless-maven-plugin</artifactId> |
717 | | - <executions> |
718 | | - <execution> |
719 | | - <id>spotless-check</id> |
720 | | - <goals> |
721 | | - <goal>check</goal> |
722 | | - </goals> |
723 | | - <phase>validate</phase> |
724 | | - </execution> |
725 | | - </executions> |
726 | | - </plugin> |
727 | 721 | <plugin> |
728 | 722 | <groupId>org.apache.maven.plugins</groupId> |
729 | 723 | <artifactId>maven-site-plugin</artifactId> |
|
773 | 767 | </build> |
774 | 768 |
|
775 | 769 | <profiles> |
776 | | - <profile> |
777 | | - <id>jdk8</id> |
778 | | - <activation> |
779 | | - <jdk>[1.8,11)</jdk> |
780 | | - </activation> |
781 | | - <properties> |
782 | | - <!-- last version working with java 8 --> |
783 | | - <spotless-maven-plugin.version>2.30.0</spotless-maven-plugin.version> |
784 | | - </properties> |
785 | | - </profile> |
786 | 770 | <profile> |
787 | 771 | <id>java11+</id> |
788 | 772 | <activation> |
789 | | - <jdk>[11,)</jdk> |
| 773 | + <!-- TODO check support for JDK 25 after palantirJavaFormat upgraded --> |
| 774 | + <jdk>[11,25)</jdk> |
790 | 775 | </activation> |
791 | | - <properties> |
792 | | - <maven.compiler.release>${mojo.java.target}</maven.compiler.release> |
793 | | - </properties> |
| 776 | + <build> |
| 777 | + <!--- newer versions of plugins requires JDK 11 --> |
| 778 | + <plugins> |
| 779 | + <plugin> |
| 780 | + <groupId>com.diffplug.spotless</groupId> |
| 781 | + <artifactId>spotless-maven-plugin</artifactId> |
| 782 | + </plugin> |
| 783 | + </plugins> |
| 784 | + </build> |
794 | 785 | </profile> |
795 | 786 |
|
796 | 787 | <profile> |
|
0 commit comments