簡體   English   中英

CircleCI maven 構建失敗,缺少 pom.xml

[英]CircleCI maven build fails, missing pom.xml

我剛剛開始試驗 CircleCI,我的項目存儲在 Github 上。 我剛剛遵循標准的香草設置,並創建了一個只有一個工作流程的項目。 我的 github 存儲庫結構包含 4 個子項目(每個都在自己的文件夾中),都在同一層次(根)級別:

- α

-- 測試版

- 設置

-- 實用程序

我對 config.yml 文件進行了如下調整:

version: 2.1
app_src_directory: alpha
orbs:
  maven: circleci/maven@0.0.12

workflows:
  maven_test:
    jobs:
      - maven/test # checkout, build, test, and upload test results

構建成功通過了 Spin up environment、Preparing environment variables、Checkout code、Generate Cache Checksum 和 Restoring cache 階段,但在 Install Dependencies 上失敗並顯示錯誤消息:

#!/bin/bash -eo pipefail
mvn dependency:go-offline --settings 'pom.xml'
[ERROR] Error executing Maven.
[ERROR] The specified user settings file does not exist: /home/circleci/project/pom.xml

Exited with code exit status 1
CircleCI received exit code 1

我有一種感覺,這很明顯,我太幼稚了,無法弄清楚。 我沒有在任何地方明確提到 circleci 用戶(包括我的代碼),所以我不確定這個引用來自哪里。 構建在我的機器上本地運行良好,使用 Maven。

感謝您的任何提示!

這有效:

orbs:
  maven: circleci/maven@1.1.0
version: 2.1
workflows:
  maven_test:
    jobs:
      - maven/test:
          app_src_directory: alpha

我現在得到一個預期的錯誤,這與生成的 war 文件無法部署到(丟失的)Tomcat 安裝有關——我必須在 CircleCI 構建映像中以某種方式解決這個問題。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM