My setup includes Travis-ci, Jacoco plugin via maven pom, Codecov and Java10. When trying to setup the code coverage functionality travis-ci outputs an syntax error when evaluating the codecov-bash script (see the last 2 lines in Travis ci output)
.travis.yml
language: java
jdk: oraclejdk10
after_success:
- bash <(curl -s https://codecov.io/bash)
pom.xml
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.2</version>
<executions>
<execution>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>report</id>
<phase>test</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
Travis ci output
[INFO] Results:
[INFO]
[WARNING] Tests run: 174, Failures: 0, Errors: 0, Skipped: 7
[INFO]
[INFO]
[INFO] --- jacoco-maven-plugin:0.8.2:report (report) @ PROJECT ---
[INFO] Loading execution data file /home/travis/build/x/y/target/jacoco.exec
[INFO] Analyzed bundle 'PROJECT' with 14 classes
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6.121 s
[INFO] Finished at: 2018-09-20T20:25:14Z
[INFO] Final Memory: 18M/512M
[INFO] ------------------------------------------------------------------------
The command "mvn test -B" exited with 0.
after_success
0.00s$ bash < (curl -s https://codecov.io/bash)
/home/travis/.travis/job_stages: eval: line 98: syntax error near unexpected token `('
/home/travis/.travis/job_stages: eval: line 98: `bash < (curl -s https://codecov.io/bash) '
Done. Your build exited with 0.
I read about every single article on how to setup codecov with jacoco and travis ci, made a detour via cobertura just to figure out that Java10 is not supported and read change logs to see if some versions are uncompatible.
Did I make any mistakes configuring my build or is codecov-bash at fault? When running mvn:test
locally I do get the expected jacoco.csv, jacoco.xml and index.html files.