|
1 | | -Codecov Java Example |
2 | | -==================== |
3 | | - |
4 | | -| [https://codecov.io][1] | [@codecov][2] | [hello@codecov.io][3] | |
5 | | -| ----------------------- | ------------- | --------------------- | |
6 | | - |
7 | | -This repository serves as an **example** on how to use [Codecov Global][4] for Java. |
8 | | - |
9 | | -## Usage |
10 | | - |
11 | | - |
12 | | -### Add Jacoco plugin |
13 | | -```xml |
14 | | -<plugin> |
15 | | - <groupId>org.jacoco</groupId> |
16 | | - <artifactId>jacoco-maven-plugin</artifactId> |
17 | | - <version>0.7.5.201505241946</version> |
18 | | - <executions> |
19 | | - <execution> |
20 | | - <goals> |
21 | | - <goal>prepare-agent</goal> |
22 | | - </goals> |
23 | | - </execution> |
24 | | - <execution> |
25 | | - <id>report</id> |
26 | | - <phase>test</phase> |
27 | | - <goals> |
28 | | - <goal>report</goal> |
29 | | - </goals> |
30 | | - </execution> |
31 | | - </executions> |
32 | | -</plugin> |
33 | | -``` |
34 | | -> For the [newest version check here](http://www.eclemma.org/jacoco/) |
35 | | -
|
36 | | - |
37 | | -# Travis CI |
38 | | - |
39 | | -Add to your `.travis.yml` file. |
40 | | -```yml |
41 | | -language: |
42 | | - java |
43 | | - |
44 | | -after_success: |
45 | | - - bash <(curl -s https://codecov.io/bash) |
46 | | -``` |
47 | | -
|
48 | | -## Private Repos |
49 | | -
|
50 | | -Add to your `.travis.yml` file. |
51 | | -```yml |
52 | | -after_success: |
53 | | - - bash <(curl -s https://codecov.io/bash) -t uuid-repo-token |
54 | | -``` |
55 | | - |
56 | | -View source and learn more about [Codecov Global Uploader][4] |
57 | | - |
58 | | -[1]: https://codecov.io/ |
59 | | -[2]: https://twitter.com/codecov |
60 | | -[3]: mailto:hello@codecov.io |
61 | | -[4]: https://github.com/codecov/codecov-bash |
| 1 | +[Codecov][0] Java Example |
| 2 | +========================= |
| 3 | + |
| 4 | +1. Add JaCoCo Plugin to your pom.xml file, [see here](https://github.com/codecov/example-java/blob/master/pom.xml#L38-L56) |
| 5 | +2. Call `bash <(curl -s https://codecov.io/bash) -t repository-upload-token` at the end of your CI build |
| 6 | + - Is you repository public and tested with Travis, CircleCI or AppVeyor? Then the repository upload token is not required! |
| 7 | + |
| 8 | + |
| 9 | +# Frequently Asked Questions |
| 10 | + |
| 11 | +####❔Seeing `Skipping JaCoCo execution due to missing execution data file`? |
| 12 | + |
| 13 | +Please see [http://stackoverflow.com/questions/18107375/...](http://stackoverflow.com/questions/18107375/getting-skipping-jacoco-execution-due-to-missing-execution-data-file-upon-exec) |
| 14 | + |
| 15 | +####❔Does Codecov accept `jacoco.exec` reports? |
| 16 | + |
| 17 | +**No**, these files are not supported. Please produce a `xml` file as detailed in the pom.xml file at [codecov/example-java][1] |
| 18 | + |
| 19 | +####❔Is there a Gradle example? |
| 20 | + |
| 21 | +**Yes**, enter [codecov/example-gradle][2] |
| 22 | + |
| 23 | + |
| 24 | +[0]: https://codecov.io/ |
| 25 | +[1]: https://github.com/codecov/example-java |
| 26 | +[2]: https://github.com/codecov/example-gradle |
0 commit comments