ph4r05 / javacard-gradle-template

JavaCard project template for building CAP and running JCardSim with gradle + coverage
MIT License
51 stars 23 forks source link

Unable to build on Ubuntu 22.04 #15

Open jeremyherbert opened 2 years ago

jeremyherbert commented 2 years ago

Hi,

(I'm not very experienced with Java build systems, so perhaps I am doing something obvious wrong)

I have tried to clone this repo and then build the image, but unfortunately it fails on ubuntu 22.04 with openjdk-11-jdk installed.

Could you please help me understand what I am doing wrong here?

I have included the full log below:

$ ./gradlew buildJavaCard --info --rerun-tasks
Downloading https://services.gradle.org/distributions/gradle-6.6-all.zip
..........................................................................................................................................
Unzipping /home/jeremy/.gradle/wrapper/dists/gradle-6.6-all/dm6whvs5m6hlkbnc6ae2jubui/gradle-6.6-all.zip to /home/jeremy/.gradle/wrapper/dists/gradle-6.6-all/dm6whvs5m6hlkbnc6ae2jubui
Set executable permissions for: /home/jeremy/.gradle/wrapper/dists/gradle-6.6-all/dm6whvs5m6hlkbnc6ae2jubui/gradle-6.6/bin/gradle
Initialized native services in: /home/jeremy/.gradle/native

Welcome to Gradle 6.6!

Here are the highlights of this release:
 - Experimental build configuration caching
 - Built-in conventions for handling credentials
 - Java compilation supports --release flag

For more details see https://docs.gradle.org/6.6/release-notes.html

Removing 0 daemon stop events from registry
Starting a Gradle Daemon (subsequent builds will be faster)
Starting process 'Gradle build daemon'. Working directory: /home/jeremy/.gradle/daemon/6.6 Command: /usr/lib/jvm/java-11-openjdk-amd64/bin/java --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.lang.invoke=ALL-UNNAMED --add-opens java.prefs/java.util.prefs=ALL-UNNAMED -XX:MaxMetaspaceSize=256m -XX:+HeapDumpOnOutOfMemoryError -Xms256m -Xmx512m -Dfile.encoding=UTF-8 -Duser.country=AU -Duser.language=en -Duser.variant -cp /home/jeremy/.gradle/wrapper/dists/gradle-6.6-all/dm6whvs5m6hlkbnc6ae2jubui/gradle-6.6/lib/gradle-launcher-6.6.jar org.gradle.launcher.daemon.bootstrap.GradleDaemon 6.6
Successfully started process 'Gradle build daemon'
An attempt to start the daemon took 0.66 secs.
The client will now receive all logging from the daemon (pid: 1478). The daemon log file: /home/jeremy/.gradle/daemon/6.6/daemon-1478.out.log
Starting build in new daemon [memory: 536.9 MB]
Using 4 worker leases.
Starting Build
Compiling settings file '/home/jeremy/Downloads/javacard-gradle-template/settings.gradle' using SubsetScriptTransformer.
Compiling settings file '/home/jeremy/Downloads/javacard-gradle-template/settings.gradle' using BuildScriptTransformer.
Settings evaluated using settings file '/home/jeremy/Downloads/javacard-gradle-template/settings.gradle'.
Projects loaded. Root project using build file '/home/jeremy/Downloads/javacard-gradle-template/build.gradle'.
Included projects: [root project 'jcard', project ':applet']

> Configure project :
Evaluating root project 'jcard' using build file '/home/jeremy/Downloads/javacard-gradle-template/build.gradle'.
Compiling build file '/home/jeremy/Downloads/javacard-gradle-template/build.gradle' using SubsetScriptTransformer.
Compiling build file '/home/jeremy/Downloads/javacard-gradle-template/build.gradle' using BuildScriptTransformer.

> Configure project :applet
Evaluating project ':applet' using build file '/home/jeremy/Downloads/javacard-gradle-template/applet/build.gradle'.
Compiling build file '/home/jeremy/Downloads/javacard-gradle-template/applet/build.gradle' using SubsetScriptTransformer.
Downloading https://repo.maven.apache.org/maven2/com/klinec/gradle-javacard/1.8.0/gradle-javacard-1.8.0.pom to /tmp/gradle_download3791331106388656672bin
Resource missing. [HTTP GET: https://repo.maven.apache.org/maven2/com/github/martinpaljak/gppro/20.08.12/gppro-20.08.12.pom]
Resource missing. [HTTP GET: https://repo.maven.apache.org/maven2/com/github/martinpaljak/ant-javacard/20.03.25/ant-javacard-20.03.25.pom]
Resource missing. [HTTP GET: https://repo.maven.apache.org/maven2/com/github/martinpaljak/gptool/20.08.12/gptool-20.08.12.pom]
Resource missing. [HTTP GET: https://repo.maven.apache.org/maven2/com/github/martinpaljak/globalplatformpro/20.08.12/globalplatformpro-20.08.12.pom]
Downloading https://javacard.pro/maven/com/github/martinpaljak/gppro/20.08.12/gppro-20.08.12.pom to /tmp/gradle_download13939791449709744749bin
Downloading https://javacard.pro/maven/com/github/martinpaljak/ant-javacard/20.03.25/ant-javacard-20.03.25.pom to /tmp/gradle_download3664334405948910102bin
Downloading https://repo.maven.apache.org/maven2/com/github/martinpaljak/metacard/20.08.07/metacard-20.08.07.pom to /tmp/gradle_download1852065914618227511bin
Downloading https://javacard.pro/maven/com/github/martinpaljak/gptool/20.08.12/gptool-20.08.12.pom to /tmp/gradle_download10247294961339006254bin
Downloading https://javacard.pro/maven/com/github/martinpaljak/globalplatformpro/20.08.12/globalplatformpro-20.08.12.pom to /tmp/gradle_download5398048566026107508bin
Downloading https://repo.maven.apache.org/maven2/com/github/martinpaljak/metacard/20.02.19/metacard-20.02.19.pom to /tmp/gradle_download14514351057267616466bin
Resource missing. [HTTP GET: https://repo.maven.apache.org/maven2/com/github/martinpaljak/capfile/20.02.19/capfile-20.02.19.pom]
Downloading https://javacard.pro/maven/com/github/martinpaljak/capfile/20.02.19/capfile-20.02.19.pom to /tmp/gradle_download398611946799660664bin
Downloading https://repo.maven.apache.org/maven2/net/sf/jopt-simple/jopt-simple/5.0.4/jopt-simple-5.0.4.pom to /tmp/gradle_download2130014151511125326bin
Resource missing. [HTTP GET: https://repo.maven.apache.org/maven2/com/github/martinpaljak/apdu4j-pcsc/20.08.12/apdu4j-pcsc-20.08.12.pom]
Found locally available resource with matching checksum: [https://repo.maven.apache.org/maven2/org/sonatype/oss/oss-parent/7/oss-parent-7.pom, /home/jeremy/.m2/repository/org/sonatype/oss/oss-parent/7/oss-parent-7.pom]
Downloading https://javacard.pro/maven/com/github/martinpaljak/apdu4j-pcsc/20.08.12/apdu4j-pcsc-20.08.12.pom to /tmp/gradle_download2031336091690403818bin
Resource missing. [HTTP GET: https://repo.maven.apache.org/maven2/com/github/martinpaljak/apdu4j/20.08.12/apdu4j-20.08.12.pom]
Downloading https://javacard.pro/maven/com/github/martinpaljak/apdu4j/20.08.12/apdu4j-20.08.12.pom to /tmp/gradle_download5039168886812771621bin
Resource missing. [HTTP GET: https://repo.maven.apache.org/maven2/com/github/martinpaljak/capfile/20.08.12/capfile-20.08.12.pom]
Downloading https://javacard.pro/maven/com/github/martinpaljak/capfile/20.08.12/capfile-20.08.12.pom to /tmp/gradle_download7442609752187292393bin
Downloading https://repo.maven.apache.org/maven2/org/slf4j/slf4j-api/1.7.30/slf4j-api-1.7.30.pom to /tmp/gradle_download4994108410065110380bin
Downloading https://repo.maven.apache.org/maven2/org/bouncycastle/bcpkix-jdk15on/1.66/bcpkix-jdk15on-1.66.pom to /tmp/gradle_download1726348369092835537bin
Downloading https://repo.maven.apache.org/maven2/com/payneteasy/ber-tlv/1.0-11/ber-tlv-1.0-11.pom to /tmp/gradle_download2485811417540377792bin
Downloading https://repo.maven.apache.org/maven2/com/github/martinpaljak/apdu4j-core/2020b1/apdu4j-core-2020b1.pom to /tmp/gradle_download5107028290856402651bin
Downloading https://repo.maven.apache.org/maven2/org/slf4j/slf4j-parent/1.7.30/slf4j-parent-1.7.30.pom to /tmp/gradle_download1530154397124526520bin
Downloading https://repo.maven.apache.org/maven2/org/sonatype/oss/oss-parent/4/oss-parent-4.pom to /tmp/gradle_download16121195238547074874bin
Downloading https://repo.maven.apache.org/maven2/com/github/martinpaljak/apdu4j/20.01.01/apdu4j-20.01.01.pom to /tmp/gradle_download12837156275181003665bin
Downloading https://repo.maven.apache.org/maven2/com/github/martinpaljak/metacard/19.10.01/metacard-19.10.01.pom to /tmp/gradle_download5302065045055874623bin
Downloading https://repo.maven.apache.org/maven2/org/yaml/snakeyaml/1.26/snakeyaml-1.26.pom to /tmp/gradle_download723850507732727557bin
Downloading https://repo.maven.apache.org/maven2/com/github/martinpaljak/apdu4j-jnasmartcardio/0.2.7+191107/apdu4j-jnasmartcardio-0.2.7+191107.pom to /tmp/gradle_download16681120771354859882bin
Downloading https://repo.maven.apache.org/maven2/org/bouncycastle/bcprov-jdk15on/1.66/bcprov-jdk15on-1.66.pom to /tmp/gradle_download1142003508767236679bin
Downloading https://repo.maven.apache.org/maven2/net/java/dev/jna/jna/5.5.0/jna-5.5.0.pom to /tmp/gradle_download2429723267455444342bin
Resource missing. [HTTP HEAD: https://javacard.pro/maven/com/github/martinpaljak/gppro/20.08.12/gppro-20.08.12.jar]
Downloading https://repo.maven.apache.org/maven2/com/klinec/gradle-javacard/1.8.0/gradle-javacard-1.8.0.jar to /tmp/gradle_download10904208042922992760bin
Downloading https://javacard.pro/maven/com/github/martinpaljak/ant-javacard/20.03.25/ant-javacard-20.03.25.jar to /tmp/gradle_download5384662587303104351bin
Downloading https://javacard.pro/maven/com/github/martinpaljak/globalplatformpro/20.08.12/globalplatformpro-20.08.12.jar to /tmp/gradle_download7328245395697760798bin
Downloading https://javacard.pro/maven/com/github/martinpaljak/gptool/20.08.12/gptool-20.08.12.jar to /tmp/gradle_download16030994870116425395bin
Downloading https://repo.maven.apache.org/maven2/net/sf/jopt-simple/jopt-simple/5.0.4/jopt-simple-5.0.4.jar to /tmp/gradle_download1247259879119764954bin
Downloading https://repo.maven.apache.org/maven2/com/github/martinpaljak/apdu4j-core/2020b1/apdu4j-core-2020b1.jar to /tmp/gradle_download606241066395505646bin
Downloading https://javacard.pro/maven/com/github/martinpaljak/apdu4j-pcsc/20.08.12/apdu4j-pcsc-20.08.12.jar to /tmp/gradle_download13373997546270618264bin
Downloading https://repo.maven.apache.org/maven2/org/bouncycastle/bcpkix-jdk15on/1.66/bcpkix-jdk15on-1.66.jar to /tmp/gradle_download4616990242707798349bin
Downloading https://repo.maven.apache.org/maven2/org/slf4j/slf4j-api/1.7.30/slf4j-api-1.7.30.jar to /tmp/gradle_download2410500144442521577bin
Downloading https://repo.maven.apache.org/maven2/com/payneteasy/ber-tlv/1.0-11/ber-tlv-1.0-11.jar to /tmp/gradle_download11977587641192138156bin
Downloading https://repo.maven.apache.org/maven2/org/yaml/snakeyaml/1.26/snakeyaml-1.26.jar to /tmp/gradle_download9822459426120017835bin
Downloading https://repo.maven.apache.org/maven2/com/github/martinpaljak/apdu4j-jnasmartcardio/0.2.7+191107/apdu4j-jnasmartcardio-0.2.7+191107.jar to /tmp/gradle_download15403094066255719436bin
Downloading https://repo.maven.apache.org/maven2/org/bouncycastle/bcprov-jdk15on/1.66/bcprov-jdk15on-1.66.jar to /tmp/gradle_download5042277673048740994bin
Downloading https://repo.maven.apache.org/maven2/net/java/dev/jna/jna/5.5.0/jna-5.5.0.jar to /tmp/gradle_download16033485825689235070bin
Downloading https://javacard.pro/maven/com/github/martinpaljak/capfile/20.08.12/capfile-20.08.12.jar to /tmp/gradle_download1438377432859057766bin
Compiling build file '/home/jeremy/Downloads/javacard-gradle-template/applet/build.gradle' using BuildScriptTransformer.
jckit location : /home/jeremy/Downloads/javacard-gradle-template/libs-sdks/jc310b43_kit
jcardsim: com.klinec:jcardsim:3.0.5.11
gptool version: 20.08.12
addImplicitJcardSimJunit disabled junit inclusion
addImplicitJcardSim disabled jcardsim inclusion
SDK path: /home/jeremy/Downloads/javacard-gradle-template/libs-sdks/jc310b43_kit/lib/api_classic-3.1.0.jar
Downloading https://repo.maven.apache.org/maven2/org/apache/logging/log4j/log4j-core/2.17.0/log4j-core-2.17.0.pom to /tmp/gradle_download11181607810699125211bin
Downloading https://repo.maven.apache.org/maven2/org/slf4j/slf4j-log4j12/1.7.33/slf4j-log4j12-1.7.33.pom to /tmp/gradle_download14226983696135447907bin
Downloading https://repo.maven.apache.org/maven2/com/klinec/jcardsim/3.0.5.11/jcardsim-3.0.5.11.pom to /tmp/gradle_download1006300678804323552bin
Downloading https://repo.maven.apache.org/maven2/org/testng/testng/6.1.1/testng-6.1.1.pom to /tmp/gradle_download9513062189159684453bin
Downloading https://repo.maven.apache.org/maven2/org/slf4j/slf4j-parent/1.7.33/slf4j-parent-1.7.33.pom to /tmp/gradle_download15401405094564769773bin
Downloading https://repo.maven.apache.org/maven2/org/sonatype/oss/oss-parent/3/oss-parent-3.pom to /tmp/gradle_download17835368210619921880bin
Downloading https://repo.maven.apache.org/maven2/org/apache/logging/log4j/log4j/2.17.0/log4j-2.17.0.pom to /tmp/gradle_download12404052291599853793bin
Downloading https://repo.maven.apache.org/maven2/junit/junit/4.13.2/junit-4.13.2.pom to /tmp/gradle_download12682720216020169057bin
Downloading https://repo.maven.apache.org/maven2/org/junit/jupiter/junit-jupiter-api/5.1.1/junit-jupiter-api-5.1.1.pom to /tmp/gradle_download13443802047541994184bin
Downloading https://repo.maven.apache.org/maven2/com/klinec/javacard-tools/1.0.4/javacard-tools-1.0.4.pom to /tmp/gradle_download8500972125489584447bin
Downloading https://repo.maven.apache.org/maven2/org/slf4j/slf4j-api/1.7.33/slf4j-api-1.7.33.pom to /tmp/gradle_download10967385651794214284bin
Downloading https://repo.maven.apache.org/maven2/org/apache/logging/logging-parent/3/logging-parent-3.pom to /tmp/gradle_download9786032934040482117bin
Found locally available resource with matching checksum: [https://repo.maven.apache.org/maven2/org/apache/apache/23/apache-23.pom, /home/jeremy/.m2/repository/org/apache/apache/23/apache-23.pom]
Downloading https://repo.maven.apache.org/maven2/org/yaml/snakeyaml/1.6/snakeyaml-1.6.pom to /tmp/gradle_download8339941256495754172bin
Downloading https://repo.maven.apache.org/maven2/org/beanshell/bsh/2.0b4/bsh-2.0b4.pom to /tmp/gradle_download10615043027680375940bin
Downloading https://repo.maven.apache.org/maven2/com/beust/jcommander/1.12/jcommander-1.12.pom to /tmp/gradle_download12490943947105984931bin
Downloading https://repo.maven.apache.org/maven2/org/beanshell/beanshell/2.0b4/beanshell-2.0b4.pom to /tmp/gradle_download18039341379442438788bin
Downloading https://repo.maven.apache.org/maven2/log4j/log4j/1.2.17/log4j-1.2.17.pom to /tmp/gradle_download11153241155348259257bin
Downloading https://repo.maven.apache.org/maven2/org/apache/logging/log4j/log4j-api/2.17.0/log4j-api-2.17.0.pom to /tmp/gradle_download18000667240424339542bin
Downloading https://repo.maven.apache.org/maven2/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.pom to /tmp/gradle_download4160735532626664598bin
Downloading https://repo.maven.apache.org/maven2/org/hamcrest/hamcrest-parent/1.3/hamcrest-parent-1.3.pom to /tmp/gradle_download13104309907948988707bin
Downloading https://repo.maven.apache.org/maven2/org/opentest4j/opentest4j/1.0.0/opentest4j-1.0.0.pom to /tmp/gradle_download15645919198527715824bin
Downloading https://repo.maven.apache.org/maven2/org/apiguardian/apiguardian-api/1.0.0/apiguardian-api-1.0.0.pom to /tmp/gradle_download12414343499285027099bin
Downloading https://repo.maven.apache.org/maven2/org/junit/platform/junit-platform-commons/1.1.1/junit-platform-commons-1.1.1.pom to /tmp/gradle_download4963987919561280069bin
Downloading https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk8/1.4.21/kotlin-stdlib-jdk8-1.4.21.pom to /tmp/gradle_download1440200004626876596bin
Downloading https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.4.21/kotlin-stdlib-1.4.21.pom to /tmp/gradle_download15616818304755078898bin
Downloading https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk7/1.4.21/kotlin-stdlib-jdk7-1.4.21.pom to /tmp/gradle_download11803423486252246188bin
Downloading https://repo.maven.apache.org/maven2/org/jetbrains/annotations/13.0/annotations-13.0.pom to /tmp/gradle_download8428735485334256198bin
Downloading https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-common/1.4.21/kotlin-stdlib-common-1.4.21.pom to /tmp/gradle_download11922694018589587388bin
Downloading https://repo.maven.apache.org/maven2/com/klinec/jcardsim/3.0.5.11/jcardsim-3.0.5.11.jar to /tmp/gradle_download971090986348100014bin
Downloading https://repo.maven.apache.org/maven2/org/testng/testng/6.1.1/testng-6.1.1.jar to /tmp/gradle_download2349120573507554425bin
Downloading https://repo.maven.apache.org/maven2/org/slf4j/slf4j-api/1.7.33/slf4j-api-1.7.33.jar to /tmp/gradle_download4085075471475488072bin
Downloading https://repo.maven.apache.org/maven2/org/slf4j/slf4j-log4j12/1.7.33/slf4j-log4j12-1.7.33.jar to /tmp/gradle_download15660610439546826443bin
Downloading https://repo.maven.apache.org/maven2/org/apache/logging/log4j/log4j-core/2.17.0/log4j-core-2.17.0.jar to /tmp/gradle_download16195350876222896737bin
Downloading https://repo.maven.apache.org/maven2/org/junit/jupiter/junit-jupiter-api/5.1.1/junit-jupiter-api-5.1.1.jar to /tmp/gradle_download8480208753452323912bin
Downloading https://repo.maven.apache.org/maven2/com/klinec/javacard-tools/1.0.4/javacard-tools-1.0.4.jar to /tmp/gradle_download17134412491242396128bin
Downloading https://repo.maven.apache.org/maven2/org/beanshell/bsh/2.0b4/bsh-2.0b4.jar to /tmp/gradle_download10942359117556067343bin
Downloading https://repo.maven.apache.org/maven2/com/beust/jcommander/1.12/jcommander-1.12.jar to /tmp/gradle_download9801669336239298732bin
Downloading https://repo.maven.apache.org/maven2/log4j/log4j/1.2.17/log4j-1.2.17.jar to /tmp/gradle_download1929367889642179911bin
Downloading https://repo.maven.apache.org/maven2/org/yaml/snakeyaml/1.6/snakeyaml-1.6.jar to /tmp/gradle_download2894406146768723186bin
Downloading https://repo.maven.apache.org/maven2/org/apache/logging/log4j/log4j-api/2.17.0/log4j-api-2.17.0.jar to /tmp/gradle_download604546697285676354bin
Downloading https://repo.maven.apache.org/maven2/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar to /tmp/gradle_download997670585897904434bin
Downloading https://repo.maven.apache.org/maven2/org/junit/platform/junit-platform-commons/1.1.1/junit-platform-commons-1.1.1.jar to /tmp/gradle_download5476989531186653853bin
Downloading https://repo.maven.apache.org/maven2/org/apiguardian/apiguardian-api/1.0.0/apiguardian-api-1.0.0.jar to /tmp/gradle_download6387390280015236955bin
Downloading https://repo.maven.apache.org/maven2/org/opentest4j/opentest4j/1.0.0/opentest4j-1.0.0.jar to /tmp/gradle_download2758990301017105987bin
Downloading https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk8/1.4.21/kotlin-stdlib-jdk8-1.4.21.jar to /tmp/gradle_download18184409244933566162bin
Downloading https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk7/1.4.21/kotlin-stdlib-jdk7-1.4.21.jar to /tmp/gradle_download17105420129501819723bin
Downloading https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.4.21/kotlin-stdlib-1.4.21.jar to /tmp/gradle_download11402349170593725703bin
Downloading https://repo.maven.apache.org/maven2/org/jetbrains/annotations/13.0/annotations-13.0.jar to /tmp/gradle_download11802375303195541735bin
Downloading https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-common/1.4.21/kotlin-stdlib-common-1.4.21.jar to /tmp/gradle_download4182789888587634646bin
Downloading https://repo.maven.apache.org/maven2/junit/junit/4.13.2/junit-4.13.2.jar to /tmp/gradle_download3972762543443925171bin
Downloading https://repo.maven.apache.org/maven2/org/junit/jupiter/junit-jupiter-engine/5.1.1/junit-jupiter-engine-5.1.1.pom to /tmp/gradle_download11819481701555070616bin
Downloading https://repo.maven.apache.org/maven2/com/squareup/okhttp3/okhttp/4.9.1/okhttp-4.9.1.pom to /tmp/gradle_download16695819264363883225bin
Downloading https://repo.maven.apache.org/maven2/com/squareup/okhttp3/okhttp/4.9.1/okhttp-4.9.1.module to /tmp/gradle_download3363638788846670701bin
Downloading https://repo.maven.apache.org/maven2/org/json/json/20180130/json-20180130.pom to /tmp/gradle_download5860964039132418765bin
Downloading https://repo.maven.apache.org/maven2/commons-codec/commons-codec/1.15/commons-codec-1.15.pom to /tmp/gradle_download15323026688711462241bin
Found locally available resource with matching checksum: [https://repo.maven.apache.org/maven2/org/sonatype/oss/oss-parent/9/oss-parent-9.pom, /home/jeremy/.m2/repository/org/sonatype/oss/oss-parent/9/oss-parent-9.pom]
Downloading https://repo.maven.apache.org/maven2/org/apache/commons/commons-parent/52/commons-parent-52.pom to /tmp/gradle_download11527234700176621880bin
Downloading https://repo.maven.apache.org/maven2/org/junit/platform/junit-platform-engine/1.1.1/junit-platform-engine-1.1.1.pom to /tmp/gradle_download13618229492773689452bin
Downloading https://repo.maven.apache.org/maven2/com/squareup/okio/okio/2.8.0/okio-2.8.0.pom to /tmp/gradle_download6980275602627515229bin
Downloading https://repo.maven.apache.org/maven2/com/squareup/okio/okio/2.8.0/okio-2.8.0.module to /tmp/gradle_download4845547555351455099bin
Downloading https://repo.maven.apache.org/maven2/commons-codec/commons-codec/1.15/commons-codec-1.15.jar to /tmp/gradle_download458130911749792773bin
Downloading https://repo.maven.apache.org/maven2/org/junit/jupiter/junit-jupiter-engine/5.1.1/junit-jupiter-engine-5.1.1.jar to /tmp/gradle_download3892698050629028658bin
Downloading https://repo.maven.apache.org/maven2/org/json/json/20180130/json-20180130.jar to /tmp/gradle_download7188778214102437020bin
Downloading https://repo.maven.apache.org/maven2/com/squareup/okio/okio/2.8.0/okio-2.8.0.jar to /tmp/gradle_download13689320990064474591bin
Downloading https://repo.maven.apache.org/maven2/com/squareup/okhttp3/okhttp/4.9.1/okhttp-4.9.1.jar to /tmp/gradle_download2053452005708182389bin
Downloading https://repo.maven.apache.org/maven2/org/junit/platform/junit-platform-engine/1.1.1/junit-platform-engine-1.1.1.jar to /tmp/gradle_download8096405495129968537bin
All projects evaluated.
Selected primary task 'buildJavaCard' from project :
Tasks to be executed: [task ':applet:buildJavaCard']
Tasks that were excluded: []
:applet:buildJavaCard (Thread[Daemon worker,5,main]) started.
[ant:compile] /home/jeremy/Downloads/javacard-gradle-template/applet/src/main/java/main/Run.java:4: error: package com.licel.jcardsim.smartcardio does not exist
[ant:compile] import com.licel.jcardsim.smartcardio.CardSimulator;
[ant:compile]                                      ^
[ant:compile] /home/jeremy/Downloads/javacard-gradle-template/applet/src/main/java/main/Run.java:5: error: package com.licel.jcardsim.utils does not exist
[ant:compile] import com.licel.jcardsim.utils.AIDUtil;
[ant:compile]                                ^
[ant:compile] /home/jeremy/Downloads/javacard-gradle-template/applet/src/main/java/main/Run.java:12: error: cannot find symbol
[ant:compile]         CardSimulator simulator = new CardSimulator();
[ant:compile]         ^
[ant:compile]   symbol:   class CardSimulator
[ant:compile]   location: class Run
[ant:compile] /home/jeremy/Downloads/javacard-gradle-template/applet/src/main/java/main/Run.java:12: error: cannot find symbol
[ant:compile]         CardSimulator simulator = new CardSimulator();
[ant:compile]                                       ^
[ant:compile]   symbol:   class CardSimulator
[ant:compile]   location: class Run
[ant:compile] /home/jeremy/Downloads/javacard-gradle-template/applet/src/main/java/main/Run.java:15: error: cannot find symbol
[ant:compile]         AID appletAID = AIDUtil.create("F000000001");
[ant:compile]                         ^
[ant:compile]   symbol:   variable AIDUtil
[ant:compile]   location: class Run
[ant:compile] 5 errors

> Task :applet:buildJavaCard FAILED
Caching disabled for task ':applet:buildJavaCard' because:
  Build cache is disabled
Task ':applet:buildJavaCard' is not up-to-date because:
  Task has not declared any outputs despite executing actions.
javacard task location auto-detected : /home/jeremy/.gradle/caches/jars-8/b3e8ad333f8d7a09de00a047b3973290/ant-javacard-20.03.25.jar:/home/jeremy/.gradle/caches/jars-8/f7dba84678a752180187b855f6a2ceef/capfile-20.08.12.jar
javacard task location : /home/jeremy/.gradle/caches/jars-8/b3e8ad333f8d7a09de00a047b3973290/ant-javacard-20.03.25.jar:/home/jeremy/.gradle/caches/jars-8/f7dba84678a752180187b855f6a2ceef/capfile-20.08.12.jar
javacard attributes : [jckit:/home/jeremy/Downloads/javacard-gradle-template/libs-sdks/jc310b43_kit]
update source path to /home/jeremy/Downloads/javacard-gradle-template/applet/src/main/java
update jca path to /home/jeremy/Downloads/javacard-gradle-template/applet/build/javacard/applet.jca
update export path to /home/jeremy/Downloads/javacard-gradle-template/applet/build/javacard/applet.exp
update jar path to /home/jeremy/Downloads/javacard-gradle-template/applet/build/javacard/applet.exp/applet.jar
cap attributes : [targetsdk:/home/jeremy/Downloads/javacard-gradle-template/libs-sdks/jc304_kit, sources:/home/jeremy/Downloads/javacard-gradle-template/applet/src/main/java, package:applet, version:0.1, aid:01:ff:ff:04:05:06:07:08:09, output:/home/jeremy/Downloads/javacard-gradle-template/applet/build/javacard/applet.cap, export:/home/jeremy/Downloads/javacard-gradle-template/applet/build/javacard/applet.exp, jar:/home/jeremy/Downloads/javacard-gradle-template/applet/build/javacard/applet.exp/applet.jar, jca:/home/jeremy/Downloads/javacard-gradle-template/applet/build/javacard/applet.jca, verify:true, ints:false, debug:false]
applet attributes : [class:applet.MainApplet, aid:01:ff:ff:04:05:06:07:08:09:01:02]
[ant:cap] INFO: using JavaCard 3.1.0 SDK in /home/jeremy/Downloads/javacard-gradle-template/libs-sdks/jc310b43_kit
[ant:cap] INFO: targeting JavaCard 3.0.4 SDK in /home/jeremy/Downloads/javacard-gradle-template/libs-sdks/jc304_kit
[ant:cap] Building CAP with 1 applet from package applet (AID: 01FFFF040506070809)
[ant:cap] applet.MainApplet 01FFFF0405060708090102
[ant:compile] Compiling files from /home/jeremy/Downloads/javacard-gradle-template/applet/src/main/java
[ant:compile] Compiling 3 source files to /tmp/jccpro12569461748388498692
:applet:buildJavaCard (Thread[Daemon worker,5,main]) completed. Took 0.857 secs.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':applet:buildJavaCard'.
> Compile failed; see the compiler error output for details.

* Try:
Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 39s
1 actionable task: 1 executed

java --version:

openjdk 11.0.16 2022-07-19
OpenJDK Runtime Environment (build 11.0.16+8-post-Ubuntu-0ubuntu122.04)
OpenJDK 64-Bit Server VM (build 11.0.16+8-post-Ubuntu-0ubuntu122.04, mixed mode, sharing)

Edit: It seems that the test runs ok:

$ ./gradlew run

> Task :applet:run
Hello World!

BUILD SUCCESSFUL in 663ms
2 actionable tasks: 1 executed, 1 up-to-date

I'm guessing the problem I am seeing is that the applet build is trying to include the simulator run file in the applet - but I have no idea how to change this ;)

jeremyherbert commented 2 years ago

Ok, some further points: