|
1 | | -# [Codecov][0] Java Example |
2 | | - |
3 | | -[](https://travis-ci.org/codecov/example-java) |
4 | | -[](https://codecov.io/gh/codecov/example-java) |
| 1 | +# [Codecov](https://codecov.io) Java |
5 | 2 | [](https://app.fossa.com/projects/git%2Bgithub.com%2Fcodecov%2Fexample-java?ref=badge_shield) |
6 | 3 |
|
7 | | -## Guide |
8 | | - |
9 | | -### Travis Setup |
10 | | - |
11 | | -Add the following to your `.travis.yml`: |
12 | | -```yml |
13 | | -language: java |
14 | | -after_success: |
15 | | - - bash <(curl -s https://codecov.io/bash) |
16 | | -``` |
17 | | -
|
18 | | -### Produce Coverage Reports |
19 | | -1. Add JaCoCo Plugin to your pom.xml file, [see here](https://github.com/codecov/example-java/blob/master/pom.xml#L43-L61) |
20 | | -
|
21 | | -## Caveats |
22 | | -
|
23 | | -#### Private Repo |
24 | | -You will need to add the following your `.travis.yml`: |
25 | | -```yml |
26 | | -env: |
27 | | - global: |
28 | | - - CODECOV_TOKEN=:uuid-repo-token |
29 | | -``` |
30 | | - |
31 | | -#### JaCoCo Reports |
32 | | - |
33 | | -- Make sure you are using the latest version of JaCoCo. There are issues with previous versions of JaCoCo. |
34 | | -- JaCoCo reports can expire - Codecov will reject reports that are older than 12 hours. The logs contain details if a report expired. |
35 | | - |
36 | | -## Support |
37 | | - |
38 | | -### FAQ |
39 | | -- Q: How do I enable multi-module projects?<br/>A: In your `pom.xml` file please append a list of modules in your projects: |
40 | | -```xml |
41 | | -<project> |
42 | | - <modules> |
43 | | - <module>module_a/</module> |
44 | | - <module>module_b/</module> |
45 | | - </modules> |
46 | | -</project> |
47 | | -``` |
48 | | -- 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). |
49 | | -- We should talk about using other CIs here. |
50 | | -- 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]. |
51 | | -- Q: Is there a Gradle example?<br/>A: **Yes**, enter [codecov/example-gradle][2] |
52 | | -- Q: Is there a Android example?<br/>A: **Yes**, enter [codecov/example-android][3] |
53 | | -- Q: Is there a Maven example?<br/>A: **Yes**, enter [codecov/example-maven][4] |
54 | | - |
55 | | -1. More documentation at https://docs.codecov.io |
56 | | -2. Configure codecov through the `codecov.yml` https://docs.codecov.io/docs/codecov-yaml |
57 | | -3. View source and learn more about [Codecov Global Uploader](https://github.com/codecov/codecov-bash) |
58 | | - |
59 | | -We are happy to help if you have any questions. Please contact email our Support at [support@codecov.io](mailto:support@codecov.io) |
| 4 | +This repository points to other example repositories on how Codecov can be integrated with a simple Java project. |
60 | 5 |
|
61 | | -[0]: https://codecov.io/ |
62 | | -[1]: https://github.com/codecov/example-java |
63 | | -[2]: https://github.com/codecov/example-gradle |
64 | | -[3]: https://github.com/codecov/example-android |
65 | | -[4]: https://github.com/codecov/example-java-maven |
66 | | -[5]: https://docs.codecov.io/docs/about-the-codecov-bash-uploader#section-upload-token |
| 6 | +- [example-java-gradle](https://github.com/codecov/example-java-gradle) |
| 7 | +- [example-java-maven](https://github.com/codecov/example-java-maven) |
| 8 | +- [example-java-android](https://github.com/codecov/example-java-android) |
67 | 9 |
|
| 10 | +For more information, please see the links below. |
68 | 11 |
|
69 | | -## License |
70 | | -[](https://app.fossa.com/projects/git%2Bgithub.com%2Fcodecov%2Fexample-java?ref=badge_large) |
| 12 | +## Links |
| 13 | +- [Quick Start](https://docs.codecov.com/docs/quick-start) |
| 14 | +- [GitHub Tutorial](https://docs.codecov.com/docs/github-tutorial) |
| 15 | +- [Community Boards](https://community.codecov.io) |
| 16 | +- [Support](https://codecov.io/support) |
| 17 | +- [Documentation](https://docs.codecov.io) |
0 commit comments