CircleCI并且在插件org.apache.maven.plugins:maven-dependency-plugin:3.0.2中找不到目标“执行”

时间:2018-11-11 20:31:36

标签: java spring maven circleci

我尝试利用CircleCI在多模块化Spring项目上运行测试 我不知道为什么会这样,但是当我尝试在CircleCI上运行spring boot项目时,我得到了

    [INFO] Reactor Summary for sfg-pet-clinic 0.0.5-SNAPSHOT:
[INFO] 
[INFO] sfg-pet-clinic ..................................... SKIPPED
[INFO] pet-clinic-data .................................... SKIPPED
[INFO] pet-clinic-web ..................................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  1.602 s
[INFO] Finished at: 2018-11-11T19:25:39Z
[INFO] ------------------------------------------------------------------------
[ERROR] Could not find goal 'go' in plugin org.apache.maven.plugins:maven-dependency-plugin:3.0.2 among available goals analyze, analyze-dep-mgt, analyze-duplicate, analyze-only, analyze-report, build-classpath, collect, copy, copy-dependencies, display-ancestors, get, go-offline, help, list, list-repositories, properties, purge-local-repository, resolve, resolve-plugins, sources, tree, unpack, unpack-dependencies -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoNotFoundException
Exited with code 1

但是当我通过Intellij手动进行测试时,一切都很好

这是我的config.yml

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: ~/repo

    environment:
      # Customize the JVM maximum heap limit
      MAVEN_OPTS: -Xmx3200m

    steps:
      - checkout

      # Download and cache dependencies
      - restore_cache:
          keys:
          - v1-dependencies-{{ checksum "pom.xml" }}
          # fallback to using the latest cache if no exact match is found
          - v1-dependencies-

      - run: mvn dependency:go -DskipTests

      - run: mvn dependency:go-offline



      - save_cache:
          paths:
            - ~/.m2
          key: v1-dependencies-{{ checksum "pom.xml" }}

      # run tests!
      - run: mvn integration-test

1 个答案:

答案 0 :(得分:0)

mvn依赖项没有名为“ go”的目标。因此,以下行将失败。

运行:mvn依赖项:go -DskipTests

请参阅https://maven.apache.org/plugins/maven-dependency-plugin/