|
Hi,
The Sonar Team is pleased to announce the release of the Groovy plugin version 0.6. This new version:
You can install or update it via the Sonar Update Center. Documentation is available on the product page. Enjoy! -- The Sonar Team |
|
After upgrading, my project is now not showing any code coverage. It is a grails project. I've tried using a simple pom file and sonar-runner that is built into Jenkins, and get the same result, no coverage. It does not show 0%, just a "-" in the code coverage widget. In the Time Machine, or Timeline dashboards I can see previous coverage, but now no entries.
Here is my sonar.properties: --- sonar.projectKey=com.mgl.application:ApplicationName sonar.projectName=ApplicationName sonar.projectVersion=1.0.1-SNAPSHOT
sonar.language=grvy sources=grails-app sonar.dynamicAnalysis=reuseReports sonar.surefire.reportsPath=target/test-reports sonar.cobertura.reportPath=target/test-reports/cobertura/coverage.xml
sonar.scm.url=scm:svn:https://svn/location ---Now the Sonar plugin for Jenkins uses the 1.2 version, would be nice to get a new version with the new version of the Sonar Runner (or a way to point to different versions of the Sonar Runner).
-- Larry On Mon, Aug 6, 2012 at 4:24 AM, David Racodon <[hidden email]> wrote: Hi, |
|
Hi,
See my comments below :
On Mon, Aug 6, 2012 at 10:30 PM, Larry Shatzer, Jr. <[hidden email]> wrote: After upgrading, my project is now not showing any code coverage. It is a grails project. I've tried using a simple pom file and sonar-runner that is built into Jenkins, and get the same result, no coverage. It does not show 0%, just a "-" in the code coverage widget. In the Time Machine, or Timeline dashboards I can see previous coverage, but now no entries. In order to investigate your issue, please provide us file "target/test-reports/cobertura/coverage.xml".
Your last statement was hard to understand in context of Groovy Plugin, so please don't mix two things in same thread in future. I created two tickets : SONARPLUGINS-2125 and SONARPLUGINS-2126
Best regards, Evgeny Mandrikov aka Godin <http://godin.net.ru> http://twitter.com/_godin_ |
|
I am seeing the same issue with a similar configuration trying sonar-runner 1.3 and 1.4.
It appears that the Cobertura Sensor never activates. e.g. I see this in the debug: 16:38:47.308 DEBUG p.PhasesTimeProfiler - Sensors : GroovySourceImporter -> CodeNarc -> GroovySensor -> Groovy SurefireSensor -> CpdSensor -> ProfileSensor -> ProfileEventsSensor -> VersionEventsSensor Thanks, Brandon
|
|
Hi all,
First of all - there is no connection with version of sonar-runner, because bug is in Groovy plugin. After some investigations I created Jira ticket - http://jira.codehaus.org/browse/SONARPLUGINS-2127
However from my point of view this is not a regression in version 0.6, because same happens with version 0.5. So Larry I wonder how before it worked for you and which version you used. Maybe before you used Maven to analyse your project?
On Tue, Aug 7, 2012 at 3:46 AM, bjfish <[hidden email]> wrote: I am seeing the same issue with a similar configuration trying sonar-runner Best regards, Evgeny Mandrikov aka Godin <http://godin.net.ru> http://twitter.com/_godin_ |
|
I only started using the sonar runner after the upgrade to see if it was the maven method that was causing problems, I just copied the entries in the pom for sonar into the properties for the Sonar Runner. I think I was running 0.5 before, but can't be sure, unless there is a log somewhere. With either Sonar Runner of Maven with 0.6, I can't get the coverage.
On Mon, Aug 6, 2012 at 11:58 PM, Evgeny Mandrikov <[hidden email]> wrote: Hi all, |
|
As stated in Jira ticket SONARPLUGINS-2127 - this issue with coverage affects only sonar-runner, this means that analysis with Maven will show coverage correctly. If this is not the case for you, then please provide minimalistic example to reproduce problem.
On Tue, Aug 7, 2012 at 7:46 PM, Larry Shatzer, Jr. <[hidden email]> wrote: I only started using the sonar runner after the upgrade to see if it was the maven method that was causing problems, I just copied the entries in the pom for sonar into the properties for the Sonar Runner. I think I was running 0.5 before, but can't be sure, unless there is a log somewhere. With either Sonar Runner of Maven with 0.6, I can't get the coverage. Best regards, Evgeny Mandrikov aka Godin <http://godin.net.ru> http://twitter.com/_godin_ |
|
Here is the pom file I use for the grails project for just sonar analysis:
http://pastebin.com/8tzFxBxQ
On Tue, Aug 7, 2012 at 11:02 AM, Evgeny Mandrikov <[hidden email]> wrote:
As stated in Jira ticket SONARPLUGINS-2127 - this issue with coverage affects only sonar-runner, this means that analysis with Maven will show coverage correctly. If this is not the case for you, then please provide minimalistic example to reproduce problem. |
|
I asked not just a POM file, but a complete project, which I can build and analyse and which will demonstrate that coverage not saved into Sonar.
On Tue, Aug 7, 2012 at 11:43 PM, Larry Shatzer, Jr. <[hidden email]> wrote: Here is the pom file I use for the grails project for just sonar analysis: http://pastebin.com/8tzFxBxQ Best regards, Evgeny Mandrikov aka Godin <http://godin.net.ru> http://twitter.com/_godin_ |
|
I'm working on that, might take me a bit of time. I just wanted to send the pom incase there was anything glaring in the pom file. I'll let you know once I have a sample project that exhibits this behavior.
On Tue, Aug 7, 2012 at 11:54 AM, Evgeny Mandrikov <[hidden email]> wrote: I asked not just a POM file, but a complete project, which I can build and analyse and which will demonstrate that coverage not saved into Sonar. |
|
In reply to this post by Evgeny Mandrikov
In short - "grails-app" is not a source root directory, becuase paths in coverage.xml are relative to other directories like "grails-app/domain".
You'll find corrected pom.xml in attachment, which shows exactly the same result as "target/test-reports/cobertura/index.html" - 100% code coverage.
On Wed, Aug 8, 2012 at 12:30 AM, Larry Shatzer, Jr. <[hidden email]> wrote: Here is a simple grails project with just one domain added, and a simple (dumb) test. Best regards, Evgeny Mandrikov aka Godin <http://godin.net.ru> http://twitter.com/_godin_ --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
BTW seems that structure of Grails project are standardized (http://grails.org/doc/latest/guide/gettingStarted.html#conventionOverConfiguration) and seems that Sonar Groovy Plugin commonly used for Grails projects, so we could imagine to improve it in order to automatically detect source directories in Grails projects in order to reduce efforts on configuration.
On Wed, Aug 8, 2012 at 3:07 AM, Evgeny Mandrikov <[hidden email]> wrote: In short - "grails-app" is not a source root directory, becuase paths in coverage.xml are relative to other directories like "grails-app/domain". Best regards, Evgeny Mandrikov aka Godin <http://godin.net.ru> http://twitter.com/_godin_ |
|
Thanks!
I added the services directory as well, since we have a bit of code in there. If you create a jira for better Grails integration, I'll vote for it, and help test it out as well.
On Tue, Aug 7, 2012 at 3:11 PM, Evgeny Mandrikov <[hidden email]> wrote: BTW seems that structure of Grails project are standardized (http://grails.org/doc/latest/guide/gettingStarted.html#conventionOverConfiguration) and seems that Sonar Groovy Plugin commonly used for Grails projects, so we could imagine to improve it in order to automatically detect source directories in Grails projects in order to reduce efforts on configuration. |
| Powered by Nabble | Edit this page |
