首页 > 解决方案 > Travis CI 因 oraclejdk10 失败

问题描述

我在使用 Travis CI 时遇到问题。

我开始使用 oraclejdk8,但 Travis 因“预期版本介于 9 和 14 之间”而失败。

所以现在我正在尝试使用 oraclejdk10 但它继续失败并出现新的错误消息

"命令 "~/bin/install-jdk.sh --target "/home/travis/oraclejdk9" --workspace "/home/travis/.cache/install-jdk" --feature "9" --license " BCL"" 失败并在 8 期间退出。"

这里是构建日志:https ://travis-ci.org/DavidGeirola/advxml/builds/547648800

特拉维斯文件

# Use container-based infrastructure
sudo: false
dist: xenial

language: scala
jdk: oraclejdk9
scala:
  - 2.12.8


# These directories are cached to a cloud storage provider "close" to the infrastructure the builds run on.
cache:
  directories:
    - $HOME/.ivy2/cache
    - $HOME/.sbt

before_cache:
  # Cleanup the cached directories to avoid unnecessary cache updates
  - rm -fv $HOME/.ivy2/.sbt.ivy.lock
  - find $HOME/.ivy2/cache -name "ivydata-*.properties" -print -delete
  - find $HOME/.sbt        -name "*.lock"               -print -delete

script:
  - sbt ++$TRAVIS_SCALA_VERSION coverage test coverageReport coverageAggregate

after_success:
  - bash <(curl -s https://codecov.io/bash)

标签: javascalagithubtravis-ci

解决方案


有一个类似的问题:

[INFO] --------------------------------[ jar ]---------------------------------
[INFO] Downloading from google-maven-central: https://maven-central.storage-download.googleapis.com/repos/central/data/org/apache/maven/plugins/maven-resources-plugin/2.6/maven-resources-plugin-2.6.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  0.813 s
[INFO] Finished at: 2019-07-18T19:21:41Z
[INFO] ------------------------------------------------------------------------
[ERROR] Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.6: Could not transfer artifact org.apache.maven.plugins:maven-resources-plugin:pom:2.6 from/to google-maven-central (https://maven-central.storage-download.googleapis.com/repos/central/data/): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target -> [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/PluginResolutionException
The command "eval mvn install -DskipTests=true -Dmaven.javadoc.skip=true -B -V " failed 3 times.

改变以openjdk11解决一切。,


推荐阅读