Git repository:- xyz/repository
Project:- xyz/repository/project/pom.xml
.travis.yml: [kept in /project]
language: java
script: mvn clean install
Travis CI always executes the script in xyz/repository I tried with below
language: java
script: cd project
mvn clean install
But it still executes in xyz/repository
Error: The goal you specified requires a project to execute but there is no POM in this directory
Could someone please help?
Got it working.
Corrected the yml format.
language: java
script:
- cd project
- mvn clean install
The above works.
Create a bash script with simple cd commands before maven clean install. Then reference your bash script in .travis
build.sh :
cd git_repo/
mvn clean install
.travis.yml :
script: ./build.sh
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