i'm implementing a JavaFX-Application and use Cirrus-CI for continuous Integragtion for Github.
this is my build-configuration .cirrus.yml
:
container:
image: maven:3.6.1-jdk-8
build_task:
build_script: mvn clean compile test sonar:sonar
During build it has problems in finding the JavaFX lib from within the installed JDK(these error log lines are just examples, there are many many more):
[ERROR] /tmp/cirrus-ci-build/src/main/java/com/github/martinfrank/catansettler/gui/ControllerFactory.java:[4,19] package javafx.util does not exist
[ERROR] /tmp/cirrus-ci-build/src/main/java/com/github/martinfrank/catansettler/gui/alert/GameSetupAlertController.java:[6,28] package javafx.scene.control does not exist
Note:
of course, with my local DevEnvirnment it's working...
Question:
what's the proper setup (Cirrus Build Definition) which includes a JDK with JavaFx? (or am i doing something complety wrong here?)
You need to install
openjfx
. You can do it like this:You can also consider using Dockerfile as a CI environment feature and create a Dockerfile like this (with
.ci/Dockerfile
relative path in your repository):And you is in your
.cirrus.yml
:This will strip of 30-40 seconds which takes to execute the
install
script.