In this post I am adding those several issues which I faced using Jenkins,
I will add more whenever I found
1)- [ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.0:sonar (default-cli) on project project-name: Execution default-cli of goal org.codehaus.mojo:sonar-maven-plugin:2.0:sonar failed: A required class was missing while executing org.codehaus.mojo:sonar-maven-plugin:2.0:sonar: org/sonatype/aether/graph/DependencyFilter
If you see this error on Jenkins console it means there is compatibility issue of maven version installed at your system and sonar-maven-plugin version used in your project POM, In my case I have maven 3.1 at Jenkins server and 2.0 version of sonar-maven-plugin in POM ,
So to resolve this issues you need to upgrade your sonar-maven-plugin version as I upgrade it from 2.0 to 2.1
3)- I have also mention one jenkins issue in my other post , you can refer
http://pathakamit783.blogspot.in/2014/08/jenkins-you-must-use-post-method-to.html
4) - Test coverage is showing zero %
Some time we are in dilemma that why our test coverage is showing zero % when we have some successful test,
Like you can see the above snagit , I have 8 success test but my test coverage is still zero,
I thought it is an issue but after wasting plenty of time , I got one conclusion as I have less number of line coverage as compared to my lines of code , So the total percentage is too low to displayed by sonar
To check this follow below steps
a)- Click on 0.0% line coverage.
b)- Select your test case.
c)- In your particular test you can see line coverage percentage.
d)- To see covered line select Line to cover from drop down.
5)- " Can not execute SonarQube analysis: Can not execute Findbugs with a timeout threshold value of 1200000 milliseconds: TimeoutException -> [Help 1]"
If you are facing such issue means your project is too large and it need more time to create findbugs-result.xml ,So to fix this issue you need to increase sonar.findbugs.timeout uptu appropriate miliseconds.
you can find this property file here. Logon to sonar dashboard.
Settings > General Settings > Java > Findbugs > sonar.findbugs.timeout
Please refer below snagit.
6)- Can not execute SonarQube analysis: Can not execute Findbugs:
java.lang.OutOfMemoryError: GC overhead limit exceeded -
I will add more whenever I found
1)- [ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.0:sonar (default-cli) on project project-name: Execution default-cli of goal org.codehaus.mojo:sonar-maven-plugin:2.0:sonar failed: A required class was missing while executing org.codehaus.mojo:sonar-maven-plugin:2.0:sonar: org/sonatype/aether/graph/DependencyFilter
If you see this error on Jenkins console it means there is compatibility issue of maven version installed at your system and sonar-maven-plugin version used in your project POM, In my case I have maven 3.1 at Jenkins server and 2.0 version of sonar-maven-plugin in POM ,
So to resolve this issues you need to upgrade your sonar-maven-plugin version as I upgrade it from 2.0 to 2.1
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>sonar-maven-plugin</artifactId>
<version>2.1</version>
</plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>sonar-maven-plugin</artifactId>
<version>2.1</version>
</plugin>
2)- [ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.7:run (1) on project project-name: An Ant BuildException has occured: exec returned: 1
OR
[exec] bower backbone.paginator#0.8.1 ECMDERR Failed to execute "git
ls-remote --tags --heads
git://github.com/test.git", exit code
To solve this issue you need to follow two steps
1) - Check permission on git://github.com/test.git , try to open the git url(which shows in error console (red color )) in browser with the same user name and password which you are using in Jenkins.
2)- Some time due to some permission issue Jenkins not able to hit directly to git url using git,
So we need to update git config.
you can simply fire a command which tells to use https instead of git
git config --global
url."https://".insteadOf git://
3)- I have also mention one jenkins issue in my other post , you can refer
http://pathakamit783.blogspot.in/2014/08/jenkins-you-must-use-post-method-to.html
4) - Test coverage is showing zero %
Some time we are in dilemma that why our test coverage is showing zero % when we have some successful test,
Like you can see the above snagit , I have 8 success test but my test coverage is still zero,
I thought it is an issue but after wasting plenty of time , I got one conclusion as I have less number of line coverage as compared to my lines of code , So the total percentage is too low to displayed by sonar
To check this follow below steps
a)- Click on 0.0% line coverage.
b)- Select your test case.
c)- In your particular test you can see line coverage percentage.
d)- To see covered line select Line to cover from drop down.
5)- " Can not execute SonarQube analysis: Can not execute Findbugs with a timeout threshold value of 1200000 milliseconds: TimeoutException -> [Help 1]"
If you are facing such issue means your project is too large and it need more time to create findbugs-result.xml ,So to fix this issue you need to increase sonar.findbugs.timeout uptu appropriate miliseconds.
you can find this property file here. Logon to sonar dashboard.
Settings > General Settings > Java > Findbugs > sonar.findbugs.timeout
Please refer below snagit.
6)- Can not execute SonarQube analysis: Can not execute Findbugs:
java.lang.OutOfMemoryError: GC overhead limit exceeded -
To fix this issue you need to increase memory size and
also add GCoverheadlimit option under MAVEN_OPTS of jenkins job.Please
refer below snip.
Thanks for such a nice collection.
ReplyDelete