Skip to content

Commit

Permalink
Support build-release-17 control file
Browse files Browse the repository at this point in the history
  • Loading branch information
dmlloyd committed Sep 20, 2023
1 parent 76f461e commit 7708bec
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ Choose your base layer version. This can be Java 11 or anything later. Configu
</plugin>
----

If the `build-release-11` file is present in the root of your project, then this step is automatically done for you.
If the `build-release-11` or `build-release-17` file is present in the root of your project, then this step is automatically done for you, for the corresponding version. Only one such file should be present.

[id='mr-jar-highest-layer']
==== Step 2: Highest layer version
Expand Down Expand Up @@ -160,6 +160,7 @@ They do not need to have any content (i.e. they can be zero-sized).
|===
|File name|Purpose|Reference
|build-release-11|Use the `<release>` option to set Java 11 for the base layer.|<<mr-jar-base-layer>>
|build-release-17|Use the `<release>` option to set Java 17 for the base layer.|<<mr-jar-base-layer>>
|build-test-java11|Run tests for Java 11 when `java11.home` is set and JDK 17 or later is used.|<<mr-jar-testing>>
|build-test-java17|Run tests for Java 17 when `java17.home` is set and JDK 18 or later is used.|<<mr-jar-testing>>
|build-test-java18|Run tests for Java 18 when `java18.home` is set and JDK 19 or later is used.|<<mr-jar-testing>>
Expand Down
30 changes: 30 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -471,6 +471,36 @@
</build>
</profile>

<profile>
<id>compile-java17-release-flag</id>
<activation>
<file>
<exists>${basedir}/build-release-17</exists>
</file>
<jdk>[17,)</jdk>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<executions>
<execution>
<id>default-compile</id>
<phase>compile</phase>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<release>17</release>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>

<!-- -->
<!-- Java 17 support -->
<!-- -->
Expand Down

0 comments on commit 7708bec

Please sign in to comment.