I am trying to build JavaFx project using bitbucket pipelines. For that I am using maven:3-jdk-8 docker image. This Docker image uses OpenJDK 8 instead of Oracle's one (due to the lincensing issue) which does not include the JavaFx part. Note that I have to use Java 8 to build my project! Problem that I am getting is that I am not able to build the application using that docker image alone.
As proposed in an answer to the same question (https://stackoverflow.com/a/40167253/2000338): I tried using this bitbucket-pipelines.yml to try to overcome the situation:
image: maven:3-jdk-8
pipelines:
default:
- step:
script: # Modify the commands below to build your repository.
- apt-get update
- apt-get install -y openjfx
- mvn clean install # -B batch mode makes Maven less verbose
In step 2 it seems that openjfx is installed properly. But in step 3 I am getting following error:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.0:compile (default-compile) on project ***********: Compilation failure: Compilation failure:
[ERROR] /opt/atlassian/pipelines/agent/build/src/main/java/********/******/****/MainFx.java:[7,26] package javafx.application does not exist
It seams that it is still complaining on the JavaFx libraries missing, but I am not aware of why. On my developer machine (Windows 7, jdk1.8.0_221) I can execute maven build without an issue.