trautonen / coveralls-maven-plugin

Maven plugin for submitting Java code coverage reports to Coveralls web service.
MIT License
312 stars 123 forks source link

Travis CI and Coveralls integration question #93

Closed lucamartellucci closed 8 years ago

lucamartellucci commented 8 years ago

Hi, i've a stupid question about the integration of Coveralls, Travis CI and maven but I can't find any documentation to resolve my problem.

Actually i've a simple java project with a basic .travis.yml file that contains only the information about the JDK to be used. I would like to add the coveralls integration so I've added the JaCoCo plugin and the coveralls-maven-plugin to my pom.xml. According to the documentation I've added the following lines to my .travis.yml file:

after_success:

now, the missing part of my configuration is the setup of the coveralls KEY into the the coveralls-maven-plugin. I'm trying to put the coveralls KEY into the ENV GLOBAL section of the .travis.yml file following the guide available here: https://docs.travis-ci.com/user/encryption-keys/

What is the name of the variable to encrypt ?? I've to replace SOMEVAR with the correct var name.

travis encrypt SOMEVAR=yourcoverallsprojectrepositorytoken

Thank you

trautonen commented 8 years ago

If you have a public repository in GitHub and also use free version (for public repositories) of Travis CI and Coveralls, everything is automatically wired for you. You just need to configure your Coveralls account for the source repository and trigger a Travis build with this plugin enabled. Like you already have there in after_success.

Coveralls has built in support for Travis CI and this plugin detects Travis CI from some magic environment variables and sets all the required information for Coveralls.

lucamartellucci commented 8 years ago

Thank you for your reply! It worked like a charm! This plugin is super cool!! :-)