#8695: make sure the Foreign binding is used for testing when running on JDK 17 and not any older nor a more recent version.

Signed-off-by: Ludovic Orban <lorban@bitronix.be>
This commit is contained in:
Ludovic Orban 2022-10-17 10:10:19 +02:00
parent 15e90acab6
commit 3c6c83da07
2 changed files with 6 additions and 22 deletions

View File

@ -53,8 +53,12 @@
<profile> <profile>
<id>jdk17</id> <id>jdk17</id>
<activation> <activation>
<jdk>[17,)</jdk> <jdk>17</jdk>
</activation> </activation>
<!--
This profile makes sure the Foreign binding is used for tests when running exactly on JDK 17.
Older and newer JDKs will revert to the JNA binding.
-->
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>org.eclipse.jetty.quic</groupId> <groupId>org.eclipse.jetty.quic</groupId>
@ -79,25 +83,5 @@
</plugins> </plugins>
</build> </build>
</profile> </profile>
<profile>
<!-- Don't use the Foreign binding if the JDK version != 17. -->
<id>jdk18+</id>
<activation>
<jdk>[18,)</jdk>
</activation>
<build>
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<argLine>
@{argLine}
${jetty.surefire.argLine}
</argLine>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles> </profiles>
</project> </project>

View File

@ -77,7 +77,7 @@
changed both its API (18) and its name (19), so tests are disabled on JDKs over 17. changed both its API (18) and its name (19), so tests are disabled on JDKs over 17.
Eventually, new Foreign modules for JDKs 18 and 19 should be added. Eventually, new Foreign modules for JDKs 18 and 19 should be added.
--> -->
<id>jdk18+</id> <id>jdk18</id>
<activation> <activation>
<jdk>[18,)</jdk> <jdk>[18,)</jdk>
</activation> </activation>