Skip to content

Commit 17ad39e

Browse files
committed
Enforcing JDK 11 on release
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.
1 parent d349b5f commit 17ad39e

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

pom.xml

+25
Original file line numberDiff line numberDiff line change
@@ -223,5 +223,30 @@ limitations under the License.
223223
</pluginManagement>
224224
</build>
225225
</profile>
226+
<profile>
227+
<id>plexus-release</id>
228+
<build>
229+
<plugins>
230+
<plugin>
231+
<artifactId>maven-enforcer-plugin</artifactId>
232+
<executions>
233+
<execution>
234+
<id>enforce-java</id>
235+
<goals>
236+
<goal>enforce</goal>
237+
</goals>
238+
<configuration>
239+
<rules>
240+
<requireJavaVersion>
241+
<version>11</version>
242+
</requireJavaVersion>
243+
</rules>
244+
</configuration>
245+
</execution>
246+
</executions>
247+
</plugin>
248+
</plugins>
249+
</build>
250+
</profile>
226251
</profiles>
227252
</project>

0 commit comments

Comments
 (0)