Skip to content

Commit

Permalink
Fixes piranhacloud#3335 - Build with all JDKs but run tests with JDK …
Browse files Browse the repository at this point in the history
…21 only
  • Loading branch information
Thihup committed Jun 16, 2023
1 parent e6505e3 commit c7db066
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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"));
Expand Down
13 changes: 1 addition & 12 deletions extension/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

<modules>
<module>annotationscan</module>
<module>annotationscan-classfile</module>
<module>apache-fileupload</module>
<module>bytesstreamhandler</module>
<module>coreprofile</module>
Expand Down Expand Up @@ -75,16 +76,4 @@
<scope>test</scope>
</dependency>
</dependencies>

<profiles>
<profile>
<id>jdk21</id>
<activation>
<jdk>21</jdk>
</activation>
<modules>
<module>annotationscan-classfile</module>
</modules>
</profile>
</profiles>
</project>

0 comments on commit c7db066

Please sign in to comment.