Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
219 views
in Technique[技术] by (71.8m points)

java - CircleCI maven build fails, missing pom.xml

I'm just beginning to experiment with CircleCI and my project stored on Github. I've just followed the standard, vanilla setup, and created a single project with just one workflow. My github repo structure contains 4 sub-projects (each in their own folder), all on the same hierarchical (root) level:

-- alpha

-- beta

-- setup

-- utilities

I've adapted the config.yml file as follows:

version: 2.1
app_src_directory: alpha
orbs:
  maven: circleci/[email protected]

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

The build successfuly goes through the Spin up environment, Preparing environment variables, Checkout code, Generate Cache Checksum and Restoring cache stages, but fails on Install Dependencies with the error message:

#!/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

I have a feeling this is something obvious that I'm too green to figure out. I haven't explicitly mentioned the circleci user anywhere (including my code), so I'm not sure where this reference comes from. The build runs fine locally on my machine, using Maven.

Thanks for any hints !


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

This works:

orbs:
  maven: circleci/[email protected]
version: 2.1
workflows:
  maven_test:
    jobs:
      - maven/test:
          app_src_directory: alpha

I now get an expected error, which is related to the generated war file not being able to be deployed to a (missing) Tomcat installation - which I will have to address somehow in the CircleCI build image.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...