Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 43 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,34 @@
[Codecov][0] Java Example
=========================

1. Add JaCoCo Plugin to your pom.xml file, [see here](https://github.com/codecov/example-java/blob/master/pom.xml#L38-L56)
2. Call `bash <(curl -s https://codecov.io/bash) -t repository-upload-token` at the end of your CI build
- Using Travis CI, CircleCI or AppVeyor **AND** the repository is public? **You're done!** No token needed.
- Otherwise, please add your [repository token token][5].

> Other examples
> - [Maven Example][4]
> - [Gradle Example][2]
> - [Android Example][3]


# Frequently Asked Questions
# [Codecov][0] Java Example
## Guide
### Travis Setup

#### ❔How do I enable multi-module projects?

In your `pom.xml` file please append a list of modules in your projects
Add the following to your `.travis.yml`:
```yml
language:
LANG_FOR_REPO
after_success:
- bash <(curl -s https://codecov.io/bash)
```
### Produce Coverage Reports
1. Add JaCoCo Plugin to your pom.xml file, [see here](https://github.com/codecov/example-java/blob/master/pom.xml#L38-L56)
## Caveats
#### Private Repo
You will need to add the following your `.travis.yml`:
```yml
env:
global:
- CODECOV_TOKEN=:uuid-repo-token
```
#### JaCoCo Reports
- Make sure you are on the most up-to-date JaCoCo version. There are issues with previous versions of JaCoCo.
- JaCoCo reports can expire - Codecov will reject reports that are older than 12 hours. The logs contain details if a report expired.
## Support

### FAQ
- Q: How do I enable multi-module projects?<br/>A: In your `pom.xml` file please append a list of modules in your projects:
```xml
<project>
<modules>
Expand All @@ -26,24 +37,23 @@ In your `pom.xml` file please append a list of modules in your projects
</modules>
</project>
```

#### ❔Seeing `Skipping JaCoCo execution due to missing execution data file`?

Please see [http://stackoverflow.com/questions/18107375/...](http://stackoverflow.com/questions/18107375/getting-skipping-jacoco-execution-due-to-missing-execution-data-file-upon-exec)

#### ❔Does Codecov accept `jacoco.exec` reports?

**No**, these files are not supported. Please produce a `xml` file as detailed in the pom.xml file at [codecov/example-java][1]

#### ❔Is there a Gradle example?

**Yes**, enter [codecov/example-gradle][2]

#### ❔Is there a Android example?

**Yes**, enter [codecov/example-android][3]


- Q: Seeing `Skipping JaCoCo execution due to missing execution data file`?<br/>A: Please see [http://stackoverflow.com/questions/18107375/...](http://stackoverflow.com/questions/18107375/getting-skipping-jacoco-execution-due-to-missing-execution-data-file-upon-exec).
- We should talk about using other CIs here.
- Q: Does Codecov accept `jacoco.exec` reports?<br/>A: **No**, these files are not supported. Please produce a `xml` file as detailed in the pom.xml file at [codecov/example-java][1].
- Q: Is there a Gradle example?<br/>A: **Yes**, enter [codecov/example-gradle][2]
- Q: Is there a Andorid example?<br/>A: **Yes**, enter [codecov/example-android][3]
- Q: Is there a Maven example?<br/>A: **Yes**, enter [codecov/example-maven][4]

### Contact
- Intercom (in-app messanger)
- Email: support@codecov.io
- Slack: slack.codecov.io
- [gh/codecov/support](https://github.com/codecov/support)


1. More documentation at https://docs.codecov.io
2. Configure codecov through the `codecov.yml` https://docs.codecov.io/docs/codecov-yaml
3. View source and learn more about [Codecov Global Uploader](https://github.com/codecov/codecov-bash)

[0]: https://codecov.io/
[1]: https://github.com/codecov/example-java
Expand Down