【发布时间】:2018-05-28 16:15:24
【问题描述】:
我正在尝试将我的 springboot 教程项目与 CircleCi 集成。
我的项目位于 Github 存储库的子目录中,我从 CircleCi 收到以下错误。
Goal 需要一个项目来执行,但其中没有 POM 目录(/home/circleci/recipe)。请验证您调用了 Maven 从正确的目录。
我不知道如何告诉 circle-ci 我的项目在子目录中。我已经尝试了几件事,以及尝试在“食谱”中 cd,但它不起作用甚至感觉不对。
这是我的项目的结构:
Spring-tutorials
|
+-- projectA
|
+-- recipe
| | +--pom.xml
这是我的config.yml
# Java Maven CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-java/ for more details
#
version: 2
jobs:
build:
docker:
# specify the version you desire here
- image: circleci/openjdk:8-jdk
# Specify service dependencies here if necessary
# CircleCI maintains a library of pre-built images
# documented at https://circleci.com/docs/2.0/circleci-images/
# - image: circleci/postgres:9.4
working_directory: ~/recipe
environment:
# Customize the JVM maximum heap limit
MAVEN_OPTS: -Xmx3200m
steps:
- checkout
- run: cd recipe/; ls -la; pwd;
# Download and cache dependencies
- restore_cache:
keys:
- recipe-{{ checksum "pom.xml" }}
# fallback to using the latest cache if no exact match is found
- recipe-
- run: cd recipe; mvn dependency:go-offline
- save_cache:
paths:
- ~/recipe/.m2
key: recipe-{{ checksum "pom.xml" }}
# run tests!
- run: mvn integration-test
【问题讨论】:
标签: circleci circleci-2.0