diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f48598c..170adf0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - java: [ 8, 11, 17, 20 ] + java: [ 8, 11, 17 ] name: Java ${{ matrix.java }} steps: - name: Checkout with submodules diff --git a/README.md b/README.md index 01db9d0..b7b3844 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ * Supports **all available JavaCard SDK versions**: 2.1.2, 2.2.1, 2.2.2, 3.0.3, 3.0.4, 3.0.5 and 3.1.0 * Get one from [oracle.com](https://www.oracle.com/java/technologies/javacard-sdk-downloads.html) or use the [handy Github repository](https://github.com/martinpaljak/oracle_javacard_sdks) * **Works on all platforms** with LTS Java 1.8+: Windows, OSX, Linux. - * [Usable SDK-s depend on JDK version](https://github.com/martinpaljak/ant-javacard/wiki/JavaCard-SDK-and-JDK-version-compatibility); 1.8 recommended! + * **[Usable SDK-s depend on JDK version](https://github.com/martinpaljak/ant-javacard/wiki/JavaCard-SDK-and-JDK-version-compatibility)**; 1.8 recommended! * Almost **everything integrates** or works with Ant. * Trigger it [from Maven](https://github.com/martinpaljak/ant-javacard/wiki/How-to-use-from-Maven) or via [Gradle wrapper](https://github.com/bertrandmartel/javacard-gradle-plugin) * Can be easily integrated into **continuous integration** workflows. diff --git a/src/main/java/pro/javacard/ant/JavaCard.java b/src/main/java/pro/javacard/ant/JavaCard.java index f495142..86c2980 100644 --- a/src/main/java/pro/javacard/ant/JavaCard.java +++ b/src/main/java/pro/javacard/ant/JavaCard.java @@ -190,10 +190,10 @@ public void setAID(String msg) { } } - @SuppressWarnings("serial") public static class HelpingBuildException extends BuildException { + private final static long serialVersionUID = -2365126253968479314L; public HelpingBuildException(String msg) { - super(msg + "\n\nPLEASE READ https://github.com/martinpaljak/ant-javacard#syntax"); + super(msg + "\n\nPLEASE READ https://github.com/martinpaljak/ant-javacard#readme"); } } @@ -557,10 +557,12 @@ private void compile() { // Warn in human readable way if Java not compatible with JC Kit // See https://github.com/martinpaljak/ant-javacard/issues/79 int jdkver = getCurrentJDKVersion(); - if (jckit.getVersion().isOneOf(V211, V212, V221, V222) && jdkver > 8) { - throw new BuildException("Use JDK 8 with JavaCard kit v2.x"); + if (jdkver > 17) { + throw new HelpingBuildException("JDK 17 LTS is the latest supported JDK."); + } else if (jckit.getVersion().isOneOf(V211, V212, V221, V222) && jdkver > 8) { + throw new HelpingBuildException("Use JDK 8 with JavaCard kit v2.x"); } else if (jdkver > 11 && !jckit.getVersion().isOneOf(V310)) { - throw new BuildException("Use JDK 11 with JavaCard kit " + jckit.getVersion()); + throw new HelpingBuildException("Use JDK 11 with JavaCard kit " + jckit.getVersion()); } j.setTarget(javaVersion); diff --git a/tests-20.xml b/tests-20.xml deleted file mode 120000 index 37d84c8..0000000 --- a/tests-20.xml +++ /dev/null @@ -1 +0,0 @@ -tests-17.xml \ No newline at end of file