Skip to content

Commit

Permalink
Support build-release-17 and build-release-21 control files
Browse files Browse the repository at this point in the history
  • Loading branch information
dmlloyd committed Sep 20, 2023
1 parent 76f461e commit 5d09e42
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 1 deletion.
4 changes: 3 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`, `build-release-17`, or `build-release-21` 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,8 @@ 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-release-21|Use the `<release>` option to set Java 21 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
60 changes: 60 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -471,6 +471,66 @@
</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>

<profile>
<id>compile-java21-release-flag</id>
<activation>
<file>
<exists>${basedir}/build-release-21</exists>
</file>
<jdk>[21,)</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>21</release>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>

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

0 comments on commit 5d09e42

Please sign in to comment.