docker - Bitbucket Pipelines - mvn clean install 不适用于 JavaFX

标签 docker continuous-integration maven-3 bitbucket-pipelines

我正在使用 Bitbucket Pipelines 构建我们大学的一个项目。

这是我在 bitbucket-pipelines.yml 中的配置:

image: maven:3.3.9-jdk-8

pipelines:
  default:
    - step:
        script: # Modify the commands below to build your repository.
          - mvn -f EasyDiet_JavaFX_View/pom.xml clean install

这里是一些编译错误 -> 与 JavaFX 相关:

ERROR] COMPILATION ERROR : 
[INFO] -------------------------------------------------------------
[ERROR] /opt/atlassian/pipelines/agent/build/EasyDiet_JavaFX_View/src/at/fhv/easyDiet/teamC/presentation/patientFile/PatientFileController.java:[11,19] package javafx.fxml does not exist
[ERROR] /opt/atlassian/pipelines/agent/build/EasyDiet_JavaFX_View/src/at/fhv/easyDiet/teamC/presentation/patientFile/PatientFileController.java:[12,28] package javafx.scene.control does not exist
[ERROR] /opt/atlassian/pipelines/agent/build/EasyDiet_JavaFX_View/src/at/fhv/easyDiet/teamC/presentation/patientFile/PatientFileController.java:[13,27] package javafx.scene.layout does not exist
[ERROR] /opt/atlassian/pipelines/agent/build/EasyDiet_JavaFX_View/src/at/fhv/easyDiet/teamC/presentation/patientFile/PatientFileController.java:[14,27] package javafx.scene.layout does not exist
[ERROR] /opt/atlassian/pipelines/agent/build/EasyDiet_JavaFX_View/src/at/fhv/easyDiet/teamC/presentation/patientFile/PatientFileController.java:[15,20] package javafx.stage does not exist
[ERROR] /opt/atlassian/pipelines/agent/build/EasyDiet_JavaFX_View/src/at/fhv/easyDiet/teamC/presentation/patientFile/PatientFileController.java:[27,13] cannot find symbol
  symbol:   class VBox
  location: class at.fhv.easyDiet.teamC.presentation.patientFile.PatientFileController
[ERROR] /opt/atlassian/pipelines/agent/build/EasyDiet_JavaFX_View/src/at/fhv/easyDiet/teamC/presentation/patientFile/PatientFileController.java:[29,13] cannot find symbol
  symbol:   class BorderPane
  location: class at.fhv.easyDiet.teamC.presentation.patientFile.PatientFileController
[ERROR] /opt/atlassian/pipelines/agent/build/EasyDiet_JavaFX_View/src/at/fhv/easyDiet/teamC/presentation/patientFile/PatientFileController.java:[336,12] cannot find symbol
  symbol:   class Stage
  location: class at.fhv.easyDiet.teamC.presentation.patientFile.PatientFileController

这里是构建失败的一些输出:

    INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 12.828 s
[INFO] Finished at: 2016-10-19T10:18:57+00:00
[INFO] Final Memory: 19M/282M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.3:compile (default-compile) on project easydiet-view: Compilation failure: Compilation failure:
[ERROR] /opt/atlassian/pipelines/agent/build/EasyDiet_JavaFX_View/src/at/fhv/easyDiet/teamC/presentation/patientFile/PatientFileController.java:[11,19] package javafx.fxml does not exist
[ERROR] /opt/atlassian/pipelines/agent/build/EasyDiet_JavaFX_View/src/at/fhv/easyDiet/teamC/presentation/patientFile/PatientFileController.java:[12,28] package javafx.scene.control does not exist
[ERROR] /opt/atlassian/pipelines/agent/build/EasyDiet_JavaFX_View/src/at/fhv/easyDiet/teamC/presentation/patientFile/PatientFileController.java:[13,27] package javafx.scene.layout does not exist
[ERROR] /opt/atlassian/pipelines/agent/build/EasyDiet_JavaFX_View/src/at/fhv/easyDiet/teamC/presentation/patientFile/PatientFileController.java:[14,27] package javafx.scene.layout does not exist
[ERROR] /opt/atlassian/pipelines/agent/build/EasyDiet_JavaFX_View/src/at/fhv/easyDiet/teamC/presentation/patientFile/PatientFileController.java:[15,20] package javafx.stage does not exist
[ERROR] /opt/atlassian/pipelines/agent/build/EasyDiet_JavaFX_View/src/at/fhv/easyDiet/teamC/presentation/patientFile/PatientFileController.java:[27,13] cannot find symbol
[ERROR] symbol:   class VBox
[ERROR] location: class at.fhv.easyDiet.teamC.presentation.patientFile.PatientFileController
[ERROR] /opt/atlassian/pipelines/agent/build/EasyDiet_JavaFX_View/src/at/fhv/easyDiet/teamC/presentation/patientFile/PatientFileController.java:[29,13] cannot find symbol
[ERROR] symbol:   class BorderPane
[ERROR] location: class at.fhv.easyDiet.teamC.presentation.patientFile.PatientFileController

如果我在我的 Mac 上本地构建它,它工作正常,但如果我尝试使用 Bitbucket Pipelines,我只会得到这些错误。我已经尝试过使用默认的 maven:3.3.3 图像。

如何在 Bitbucket Pipelines 中构建 JavaFX?

最佳答案

这对我有用:

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

关于docker - Bitbucket Pipelines - mvn clean install 不适用于 JavaFX,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40131609/

相关文章:

docker - 如何使用 docker cp 从主机 rsync 到 docker 容器

testing - 如果测试用例 100% 失败,我们如何使用 Jenkins 发送自定义电子邮件?

Delphi Tokyo 10.2 的 Powershell 静默/无人值守安装 - 用于在 win docker 容器中使用 CI

pip - 在作业之间共享已安装的要求

spring - Autowire FeignClient 跨 maven 项目

postgresql - 带有 Postgres 的 Mac 上的 Docker 卷

docker - 如何从应用程序服务器容器连接到Rabbitmq容器

docker - Docker Swarm-仅在本地环境中使用mongod服务

java - 如何检查Java,Maven,Gradle的版本

java - 如何创建文件并将其放入与 Maven 的 war 中?