Skip to content

Commit

Permalink
Enforcing JDK 11 on release
Browse files Browse the repository at this point in the history
Enforcing the use of JDK 11 on release guarantees that the published Multi-Release JAR contains ALL code versions: JDK 8 (default fallback), JDK 9 (enhanced NIO) and JDK 10 (even further enhanced NIO). Without this enforcement, there would be a risk of not having some of these versions packed into the MRJAR due to the way the POM checks for the existence of supported JDK levels using JDK-enabled profiles.
  • Loading branch information
mkarg authored and slachiewicz committed Apr 17, 2021
1 parent d349b5f commit 2db9aac
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -223,5 +223,30 @@ limitations under the License.
</pluginManagement>
</build>
</profile>
<profile>
<id>plexus-release</id>
<build>
<plugins>
<plugin>
<artifactId>maven-enforcer-plugin</artifactId>
<executions>
<execution>
<id>enforce-java</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireJavaVersion>
<version>11</version>
</requireJavaVersion>
</rules>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>

0 comments on commit 2db9aac

Please sign in to comment.