Skip to content

Commit ba8daf8

Browse files
committed
Migrate -proc:full setting to a profile
I misread the linked notice about the new -proc:full option, thinking it would be available with OpenJDK 8u411+, but for Java 8 it's only available in Oracle's flavor of Java, not OpenJDK. So we instead wrap the setting in a profile that activates only as appropriate.
1 parent 45f3e0d commit ba8daf8

File tree

1 file changed

+18
-8
lines changed

1 file changed

+18
-8
lines changed

pom.xml

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -171,12 +171,9 @@
171171
<scijava.jvm.version>8</scijava.jvm.version>
172172
<scijava.jvm.test.version>${scijava.jvm.version}</scijava.jvm.test.version>
173173
<!--
174-
Note:
175-
* 1.8.0_101 is needed for SciJava Maven repository HTTPS support.
176-
* 1.8.0_411 is needed for javac's -proc:full flag to exist;
177-
see https://inside.java/2024/06/18/quality-heads-up/
174+
Note: 1.8.0_101 is needed for SciJava Maven repository HTTPS support.
178175
-->
179-
<scijava.jvm.build.version>[1.8.0-411,)</scijava.jvm.build.version>
176+
<scijava.jvm.build.version>[1.8.0-101,)</scijava.jvm.build.version>
180177
<maven.compiler.source>${scijava.jvm.version}</maven.compiler.source>
181178
<maven.compiler.target>${scijava.jvm.version}</maven.compiler.target>
182179
<maven.compiler.testSource>${scijava.jvm.test.version}</maven.compiler.testSource>
@@ -187,9 +184,6 @@
187184
-->
188185
<maven.compiler.useIncrementalCompilation>false</maven.compiler.useIncrementalCompilation>
189186

190-
<!-- Enable annotation processing even with Java 23+. -->
191-
<maven.compiler.proc>full</maven.compiler.proc>
192-
193187
<!-- Extra maven-surefire-plugin args. -->
194188
<scijava.surefire.args />
195189

@@ -2014,6 +2008,22 @@
20142008
</build>
20152009
</profile>
20162010

2011+
<!--
2012+
The java-23 profile includes adjustments for Java 23+; in particular, it
2013+
passes the -proc:full argument to javac to enable annotation processing.
2014+
See: https://inside.java/2024/06/18/quality-heads-up/
2015+
-->
2016+
<profile>
2017+
<id>java-23</id>
2018+
<activation>
2019+
<jdk>[23,)</jdk>
2020+
</activation>
2021+
<properties>
2022+
<!-- Enable annotation processing even with Java 23+. -->
2023+
<maven.compiler.proc>full</maven.compiler.proc>
2024+
</properties>
2025+
</profile>
2026+
20172027
<!--
20182028
The following profiles set the scijava.platform system properties to
20192029
match the detected architecture. The main intended use case is for

0 commit comments

Comments
 (0)