The command "travis_wait 30 mvn install" failed and exited with 127 during

my .travis.yml is a bash to docker push images
And I get error of time out for 10 min
from the suggest:https://docs.travis-ci.com/user/common-build-problems/#build-times-out-because-no-output-was-received
I add the travis_wait 30 mvn install
But I get the new error
The command “travis_wait 30 mvn install” failed and exited with 127 during .
so, how can I solve the enviroment error?
my .travis.yml file is like this:

language: bash
install: travis_wait 30 mvn install
env:
  - version=sdk
services:
  - docker
sudo: required
branches:
  only:
    - master
script:
  - echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin ccr.ccs.tencentyun.com
  - docker pull mcr.microsoft.com/dotnet/core/$version

Exit status 127 means that the program to run is not found.

language: bash is an alias to language: minimal, an image that does not have Java (and thus Maven) preinstalled.

Use language: <your language> instead, or language: generic if you only need the extra preinstalled stuff.

I try to use "language": "generic" or "language": "java"
but I got this error

$ javac -J-Xmx32m -version
javac 11.0.2
2.19s$ travis_wait 30 mvn install
Still running (1 of 30): mvn install
The command mvn install exited with 1.
Log:
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  0.102 s
[INFO] Finished at: 2020-04-13T00:56:23Z
[INFO] ------------------------------------------------------------------------
[ERROR] The goal you specified requires a project to execute but there is no POM in this directory (/home/travis/build/wangshuai-007/Exceptionless5.0Copy). Please verify you invoked Maven from the correct directory. -> [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/MissingProjectException
/home/travis/.travis/functions: line 607:  3678 Terminated              travis_jigger "${!}" "${timeout}" "${cmd[@]}"
The command "travis_wait 30 mvn install" failed and exited with 1 during .
Your build has been stopped.

I think,the project of mvn is necessary,But I do not need it.
so, how to use travis_wait 30 mvn install easylly?

If you don’t have a Maven project, why are you trying to run Maven? This doesn’t make any sense.
Figure out what you actually need to do to build your project.

My docker push command get time out error with 10 min.
from this solution,I use travis_wait 30 mvn install

Read the text carefully. That section says to run travis_wait [optional timeout] <your command>. mvn install is only given as an example of a command.

2 Likes

Thank you for your Answar,Now,I know this’s my fault.

Imprint