我正在尝试使用github
从travis-ci
构建应用java-cloud-sample。
.travis.yml
看起来像这样
language: java
sudo: true
dist: trusty
jdk: oraclejdk9
addons:
apt:
packages:
- oracle-java9-installer
before_script:
- chmod a+x ./mvnw
但是当它试图构建应用程序时我得到了这个错误
$ export PATH=$JAVA_HOME/bin:$PATH
$ java -Xmx32m -version
java version "9"
Java(TM) SE Runtime Environment (build 9+181)
Java HotSpot(TM) 64-Bit Server VM (build 9+181, mixed mode)
$ javac -J-Xmx32m -version
javac 9
3.01s$ ./mvnw install -DskipTests=true -Dmaven.javadoc.skip=true -B -V
/home/travis/.travis/job_stages: line 236: ./mvnw: Permission denied
The command "eval ./mvnw install -DskipTests=true -Dmaven.javadoc.skip=true -B -V " failed. Retrying, 2 of 3.
/home/travis/.travis/job_stages: line 236: ./mvnw: Permission denied
The command "eval ./mvnw install -DskipTests=true -Dmaven.javadoc.skip=true -B -V " failed. Retrying, 3 of 3.
/home/travis/.travis/job_stages: line 236: ./mvnw: Permission denied
The command "eval ./mvnw install -DskipTests=true -Dmaven.javadoc.skip=true -B -V " failed 3 times.
The command "./mvnw install -DskipTests=true -Dmaven.javadoc.skip=true -B -V" failed and exited with 126 during .
Your build has been stopped.
我试图设置chmod a+x mvnw
,但它也没有帮助。有什么问题?
答案 0 :(得分:6)
您可以尝试将cross_val_score
更改为before_script
吗?,如下所示:
before_install