Codecov Java Maven Example
Add to your .travis.yml
file.
language: java
# Cobertura is not supported in JDK11 so you must downgrade the JDK that Travis uses if you want to use Cobertura with Travis.
# See https://github.com/cobertura/cobertura/issues/381
jdk:
- openjdk8
script: "mvn cobertura:cobertura"
after_success:
- bash <(curl -s https://codecov.io/bash)
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
<version>2.7</version>
<configuration>
<formats>
<format>html</format>
<format>xml</format>
</formats>
<check />
</configuration>
</plugin>
Call mvn cobertura:cobertura
during your CI tests, see here
Add to your .travis.yml
file.
after_success:
- bash <(curl -s https://codecov.io/bash) -t uuid-repo-token
- Q: Is there a Gradle example?
A: Yes, enter codecov/example-gradle - Q: Is there a Android example?
A: Yes, enter codecov/example-android - Q: Is there a JaCoCo example?
A: Yes, enter codecov/example-java
- More documentation at https://docs.codecov.io
- Configure codecov through the
codecov.yml
https://docs.codecov.io/docs/codecov-yaml
We are happy to help if you have any questions. Please contact email our Support at [email protected]