From c7db0668aab6178e56821f4cb5af53a9ab8492f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thiago=20Henrique=20H=C3=BCpner?= Date: Fri, 16 Jun 2023 09:23:40 -0300 Subject: [PATCH] Fixes #3335 - Build with all JDKs but run tests with JDK 21 only --- .../classfile/AnnotationScanExtensionTest.java | 3 +++ extension/pom.xml | 13 +------------ 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/extension/annotationscan-classfile/src/test/java/cloud/piranha/extension/annotationscan/classfile/AnnotationScanExtensionTest.java b/extension/annotationscan-classfile/src/test/java/cloud/piranha/extension/annotationscan/classfile/AnnotationScanExtensionTest.java index d7ba72eb5e..563737742c 100644 --- a/extension/annotationscan-classfile/src/test/java/cloud/piranha/extension/annotationscan/classfile/AnnotationScanExtensionTest.java +++ b/extension/annotationscan-classfile/src/test/java/cloud/piranha/extension/annotationscan/classfile/AnnotationScanExtensionTest.java @@ -35,6 +35,8 @@ import cloud.piranha.resource.impl.DirectoryResource; import jakarta.servlet.annotation.WebServlet; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.condition.EnabledOnJre; +import org.junit.jupiter.api.condition.JRE; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; @@ -67,6 +69,7 @@ void testConfigure() { * Test configure method. */ @Test + @EnabledOnJre(value = JRE.JAVA_21, disabledReason = "Only JDK 21 includes the Classfile API") void testConfigure2() { DefaultResourceManager resourceManager = new DefaultResourceManager(); resourceManager.addResource(new DirectoryResource("target/test-classes")); diff --git a/extension/pom.xml b/extension/pom.xml index e8783f5037..748f7849a6 100644 --- a/extension/pom.xml +++ b/extension/pom.xml @@ -17,6 +17,7 @@ annotationscan + annotationscan-classfile apache-fileupload bytesstreamhandler coreprofile @@ -75,16 +76,4 @@ test - - - - jdk21 - - 21 - - - annotationscan-classfile - - -