I am trying to build application java-cloud-sample from github
using travis-ci
.
.travis.yml
looks like this
language: java
sudo: true
dist: trusty
jdk: oraclejdk9
addons:
apt:
packages:
- oracle-java9-installer
before_script:
- chmod a+x ./mvnw
But when it tries to build application I get this error
$ 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.
I was trying to set chmod a+x mvnw
and it did not help either. What is the problem?
Can you try changing before_script
to before_install
?, as follows:
language: java
sudo: true
dist: trusty
jdk: oraclejdk9
addons:
apt:
packages:
- oracle-java9-installer
before_install:
- chmod +x mvnw
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With