Re: [sonar-dev] [VOTE] Sonar dotnet plugin 1.0

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: [sonar-dev] [VOTE] Sonar dotnet plugin 1.0

Alexandre Victoor-2
Hello,
I have fixed the dotnet cpd plugin.
Now I have a similar error with the gallio plugin which does pretty much the same job that the surefire plugin for java projects.
The error is raised from the UnitTestDecorator :

Caused by: java.lang.IllegalArgumentException: This measure has already been saved: org.sonar.api.measures.Measure@441baac1[id=<null>,metric=org.sonar.api.measures.Metric@13684c29[key=tests,name=Unit tests,type=INT,enabled=true,qualitative=false,direction=-1,domain=Tests,worstValue=<null>,bestValue=<null>,optimizedBestValue=<null>,hidden=false],value=21.0,data=<null>,description=<null>,alertStatus=<null>,alertText=<null>,tendency=<null>,diff1=<null>,diff2=<null>,diff3=<null>],resource: org.sonar.api.resources.Project@746787d5[id=1,key=org.codehaus.sonar-plugins.dotnet.example:example,qualifier=TRK]
at org.sonar.batch.indexer.DefaultSonarIndex.addMeasure(DefaultSonarIndex.java:266)
at org.sonar.batch.indexer.DefaultSonarIndex.saveMeasure(DefaultSonarIndex.java:257)
at org.sonar.batch.DefaultDecoratorContext.saveMeasure(DefaultDecoratorContext.java:122)
at org.sonar.plugins.core.sensors.UnitTestDecorator.sumChildren(UnitTestDecorator.java:83)
at org.sonar.plugins.core.sensors.UnitTestDecorator.decorate(UnitTestDecorator.java:56)
at org.sonar.batch.DecoratorsExecutor.decorateResource(DecoratorsExecutor.java:76)
at org.sonar.batch.DecoratorsExecutor.execute(DecoratorsExecutor.java:62)
at org.sonar.batch.ProjectBatch.execute(ProjectBatch.java:53)
at org.sonar.batch.AggregatorBatch.analyzeProject(AggregatorBatch.java:109)
at org.sonar.batch.AggregatorBatch.analyzeProjects(AggregatorBatch.java:101)
at org.sonar.batch.AggregatorBatch.execute(AggregatorBatch.java:85)
at org.sonar.maven2.BatchMojo.executeBatch(BatchMojo.java:149)
... 24 more

This decorator tries to save a measure for metric CoreMetrics.TESTS at the root of the project.
The dotnet gallio plugin does not do that and so I have run the analysis in debug mode.
My conclusions : the problem comes from the surefire plugin. WIth dotnet projects, we do not have any surefire report and the packaging is "sln".
In the surefire plugin the following method is called :

private void insertZeroWhenNoReports(Project pom, SensorContext context) {
    if (!StringUtils.equalsIgnoreCase("pom", pom.getPackaging())) {
      context.saveMeasure(CoreMetrics.TESTS, 0.0);
    }
  }

IMHO the behavior of the surefire plugin should be corrected prior to sonar.2.1.1
Let me know if you need more details
Regards

Alex







On Sat, May 8, 2010 at 12:02 AM, Alexandre Victoor <[hidden email]> wrote:
Thanks Olivier,
I have understand what is wrong. I will fix it monday...
I agree to suspend voting. 
Have a nice week-end

Alex


On Fri, May 7, 2010 at 9:32 PM, Olivier Gaudin <[hidden email]> wrote:
Ok, thank you for this. We have indeed added a verification in Sonar 2.1 to make sure that measures are not saved twice, otherwise you would have them twice in the database. Prior to 2.1, this was not checked this is why you did not realize it.

This needs to be fixed in your plugin. I would recommend you do it prior to voting.

Olivier



On Fri, May 7, 2010 at 9:27 PM, Alexandre Victoor <[hidden email]> wrote:
Hello,
Running mvn sonar:sonar on our "test solution", I get the followings logs :

...
[INFO] FxCop report generated
[INFO]  Execute maven plugin maven-dotnet-plugin done: 1078 ms
[INFO]  Sensor org.sonar.plugin.dotnet.fxcop.FxCopSensor@a05bc3...
[INFO]  Sensor org.sonar.plugin.dotnet.fxcop.FxCopSensor@a05bc3 done: 219 ms
[INFO]  Sensor SurefireSensor...
[INFO]  parsing C:\HOMEWARE\codehaus\maven\dotnet-commons\src\test\resources\solution\Example\target\surefire-reports
[INFO]  Sensor SurefireSensor done: 0 ms
[INFO]  Sensor CpdSensor...
[INFO]  Sensor CpdSensor done: 0 ms
[INFO]  Sensor ProfileSensor...
[INFO]  Sensor ProfileSensor done: 0 ms
[INFO]  Sensor ProjectLinksSensor...
[INFO]  Sensor ProjectLinksSensor done: 16 ms
[INFO]  Sensor VersionEventsSensor...
[INFO]  Sensor VersionEventsSensor done: 0 ms
[INFO]  Sensor Maven dependencies...
[INFO]  Sensor Maven dependencies done: 15 ms
[INFO]  Execute decorators...
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Can not execute Sonar

Embedded error: Can not analyze the project
This measure has already been saved: org.sonar.api.measures.Measure@15b571e[id=<null>,metric=org.sonar.api.measures.Metric@1405ea9[key=duplicated_lines_density,name=Duplicated lines (%),type=PERCENT,enabled=true,qualitative=true,direction=-1,domain=Duplication,worstValue=50.0,bestValue=0.0,optimizedBestValue=true,hidden=false],value=0.0,data=<null>,description=<null>,alertStatus=<null>,alertText=<null>,tendency=<null>,diff1=<null>,diff2=<null>,diff3=<null>],resource: CSharpFile(Folder Example.Application//Program.cs)
[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Can not execute Sonar
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:703)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:553)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:523)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:371)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:268)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:181)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:356)
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:137)
	at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
	at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:41)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
	at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
	at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
	at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.MojoExecutionException: Can not execute Sonar
	at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:87)
	at org.codehaus.mojo.sonar.Bootstraper.start(Bootstraper.java:65)
	at org.codehaus.mojo.sonar.SonarMojo.execute(SonarMojo.java:117)
	at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:483)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:678)
	... 17 more
Caused by: org.apache.maven.plugin.MojoExecutionException: Can not analyze the project
	at org.sonar.maven2.BatchMojo.executeBatch(BatchMojo.java:152)
	at org.sonar.maven2.BatchMojo.execute(BatchMojo.java:131)
	at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:483)
	at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:82)
	... 21 more
Caused by: java.lang.IllegalArgumentException: This measure has already been saved: org.sonar.api.measures.Measure@15b571e[id=<null>,metric=org.sonar.api.measures.Metric@1405ea9[key=duplicated_lines_density,name=Duplicated lines (%),type=PERCENT,enabled=true,qualitative=true,direction=-1,domain=Duplication,worstValue=50.0,bestValue=0.0,optimizedBestValue=true,hidden=false],value=0.0,data=<null>,description=<null>,alertStatus=<null>,alertText=<null>,tendency=<null>,diff1=<null>,diff2=<null>,diff3=<null>],resource: CSharpFile(Folder Example.Application//Program.cs)
	at org.sonar.batch.indexer.DefaultSonarIndex.addMeasure(DefaultSonarIndex.java:266)
	at org.sonar.batch.indexer.DefaultSonarIndex.saveMeasure(DefaultSonarIndex.java:257)
	at org.sonar.batch.DefaultDecoratorContext.saveMeasure(DefaultDecoratorContext.java:122)
	at org.sonar.plugins.cpd.decorators.DuplicationDensityDecorator.decorate(DuplicationDensityDecorator.java:63)
	at org.sonar.batch.DecoratorsExecutor.decorateResource(DecoratorsExecutor.java:76)
	at org.sonar.batch.DecoratorsExecutor.decorateResource(DecoratorsExecutor.java:69)
	at org.sonar.batch.DecoratorsExecutor.decorateResource(DecoratorsExecutor.java:69)
	at org.sonar.batch.DecoratorsExecutor.decorateResource(DecoratorsExecutor.java:69)
	at org.sonar.batch.DecoratorsExecutor.execute(DecoratorsExecutor.java:62)
	at org.sonar.batch.ProjectBatch.execute(ProjectBatch.java:53)
	at org.sonar.batch.AggregatorBatch.analyzeProject(AggregatorBatch.java:109)
	at org.sonar.batch.AggregatorBatch.analyzeProjects(AggregatorBatch.java:101)
	at org.sonar.batch.AggregatorBatch.execute(AggregatorBatch.java:85)
	at org.sonar.maven2.BatchMojo.executeBatch(BatchMojo.java:149)
	... 24 more

Let me know if you need more details

Alex




On Fri, May 7, 2010 at 8:54 PM, Olivier Gaudin <[hidden email]> wrote:
Jose, Alexandre,

Could you please let us know which issue you encountered with 2.1. We noticed an issue with the resource viewer.
Since we are going to make a 2.1.1 fix, it is a good time to report compatibility issues.

Thanks

Olivier



On Fri, May 7, 2010 at 10:39 AM, Jose CHILLAN <[hidden email]> wrote:
Hi,

We thought about hosting the project on Codehaus Mojo, but their policy seemed too restrictive (give
the code first, then maybe you will be granted a right to commit on it...) for the time we had to spend
on this project (this is only a "best effort" project developed in a company where I don't work
since end of april).
But this is definitely a good option.
For my part, who has been using the Sonar .Net plugin more than 6 month in production, I can only vote
+1



On 06/05/2010 23:31, Evgeny Mandrikov wrote:
Hi Alexandre,

Unfortunately I doesn't have enough time to test this plugin yet. So
just my two cents: can we make it compatible with Sonar 2.1 or wait
for upcoming maintenance release 2.1.1 ?

And one more question: what do you think about hosting maven part of
this work in Codehaus mojo? I think it's a best place for third-party
maven plugins ;)

On Fri, May 7, 2010 at 12:07 AM, Alexandre Victoor
<[hidden email]>  wrote:
 
Hello all,
This would be the first official release of the dotnet plugins for maven and
sonar.
You will find more information, including installation instructions in the
wiki :
 http://docs.codehaus.org/display/SONAR/.Net+plugin .

The doc of the maven plugins used to build c# projects with maven is
available at his url :
http://maven-dotnet-plugin.appspot.com

Snapshot jars for the maven and sonar plugins are available from the
snapshot repository :
http://snapshots.repository.codehaus.org/org/codehaus/sonar-plugins/dotnet/

As specified in the wiki, the current supported sonar version is 2.0.1 .
I did a quick test with version 2.1 and I was surprised to see failures... I
will post something about that later.
Let me know if you have any question

Vote open for 72 hours.

[ ] +1
[ ] +0
[ ] -1
   


 

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

  http://xircles.codehaus.org/manage_email







Reply | Threaded
Open this post in threaded view
|

Re: [sonar-dev] [VOTE] Sonar dotnet plugin 1.0

Simon
Administrator
Hi Alexandre,

Which version of Sonar did you use when raising this surefire exception ?

Thank you
Simon Brandhof
SonarSource.org
SonarSource.com
---


On Mon, May 10, 2010 at 12:16 AM, Alexandre Victoor <[hidden email]> wrote:
Hello,
I have fixed the dotnet cpd plugin.
Now I have a similar error with the gallio plugin which does pretty much the same job that the surefire plugin for java projects.
The error is raised from the UnitTestDecorator :

Caused by: java.lang.IllegalArgumentException: This measure has already been saved: org.sonar.api.measures.Measure@441baac1[id=<null>,metric=org.sonar.api.measures.Metric@13684c29[key=tests,name=Unit tests,type=INT,enabled=true,qualitative=false,direction=-1,domain=Tests,worstValue=<null>,bestValue=<null>,optimizedBestValue=<null>,hidden=false],value=21.0,data=<null>,description=<null>,alertStatus=<null>,alertText=<null>,tendency=<null>,diff1=<null>,diff2=<null>,diff3=<null>],resource: org.sonar.api.resources.Project@746787d5[id=1,key=org.codehaus.sonar-plugins.dotnet.example:example,qualifier=TRK]
at org.sonar.batch.indexer.DefaultSonarIndex.addMeasure(DefaultSonarIndex.java:266)
at org.sonar.batch.indexer.DefaultSonarIndex.saveMeasure(DefaultSonarIndex.java:257)
at org.sonar.batch.DefaultDecoratorContext.saveMeasure(DefaultDecoratorContext.java:122)
at org.sonar.plugins.core.sensors.UnitTestDecorator.sumChildren(UnitTestDecorator.java:83)
at org.sonar.plugins.core.sensors.UnitTestDecorator.decorate(UnitTestDecorator.java:56)
at org.sonar.batch.DecoratorsExecutor.decorateResource(DecoratorsExecutor.java:76)
at org.sonar.batch.DecoratorsExecutor.execute(DecoratorsExecutor.java:62)
at org.sonar.batch.ProjectBatch.execute(ProjectBatch.java:53)
at org.sonar.batch.AggregatorBatch.analyzeProject(AggregatorBatch.java:109)
at org.sonar.batch.AggregatorBatch.analyzeProjects(AggregatorBatch.java:101)
at org.sonar.batch.AggregatorBatch.execute(AggregatorBatch.java:85)
at org.sonar.maven2.BatchMojo.executeBatch(BatchMojo.java:149)
... 24 more

This decorator tries to save a measure for metric CoreMetrics.TESTS at the root of the project.
The dotnet gallio plugin does not do that and so I have run the analysis in debug mode.
My conclusions : the problem comes from the surefire plugin. WIth dotnet projects, we do not have any surefire report and the packaging is "sln".
In the surefire plugin the following method is called :

private void insertZeroWhenNoReports(Project pom, SensorContext context) {
    if (!StringUtils.equalsIgnoreCase("pom", pom.getPackaging())) {
      context.saveMeasure(CoreMetrics.TESTS, 0.0);
    }
  }

IMHO the behavior of the surefire plugin should be corrected prior to sonar.2.1.1
Let me know if you need more details
Regards

Alex







On Sat, May 8, 2010 at 12:02 AM, Alexandre Victoor <[hidden email]> wrote:
Thanks Olivier,
I have understand what is wrong. I will fix it monday...
I agree to suspend voting. 
Have a nice week-end

Alex


On Fri, May 7, 2010 at 9:32 PM, Olivier Gaudin <[hidden email]> wrote:
Ok, thank you for this. We have indeed added a verification in Sonar 2.1 to make sure that measures are not saved twice, otherwise you would have them twice in the database. Prior to 2.1, this was not checked this is why you did not realize it.

This needs to be fixed in your plugin. I would recommend you do it prior to voting.

Olivier



On Fri, May 7, 2010 at 9:27 PM, Alexandre Victoor <[hidden email]> wrote:
Hello,
Running mvn sonar:sonar on our "test solution", I get the followings logs :

...

[INFO] FxCop report generated
[INFO]  Execute maven plugin maven-dotnet-plugin done: 1078 ms
[INFO]  Sensor org.sonar.plugin.dotnet.fxcop.FxCopSensor@a05bc3...
[INFO]  Sensor org.sonar.plugin.dotnet.fxcop.FxCopSensor@a05bc3 done: 219 ms
[INFO]  Sensor SurefireSensor...
[INFO]  parsing C:\HOMEWARE\codehaus\maven\dotnet-commons\src\test\resources\solution\Example\target\surefire-reports
[INFO]  Sensor SurefireSensor done: 0 ms
[INFO]  Sensor CpdSensor...
[INFO]  Sensor CpdSensor done: 0 ms
[INFO]  Sensor ProfileSensor...
[INFO]  Sensor ProfileSensor done: 0 ms
[INFO]  Sensor ProjectLinksSensor...
[INFO]  Sensor ProjectLinksSensor done: 16 ms
[INFO]  Sensor VersionEventsSensor...
[INFO]  Sensor VersionEventsSensor done: 0 ms
[INFO]  Sensor Maven dependencies...
[INFO]  Sensor Maven dependencies done: 15 ms
[INFO]  Execute decorators...
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Can not execute Sonar

Embedded error: Can not analyze the project
This measure has already been saved: org.sonar.api.measures.Measure@15b571e[id=<null>,metric=org.sonar.api.measures.Metric@1405ea9[key=duplicated_lines_density,name=Duplicated lines (%),type=PERCENT,enabled=true,qualitative=true,direction=-1,domain=Duplication,worstValue=50.0,bestValue=0.0,optimizedBestValue=true,hidden=false],value=0.0,data=<null>,description=<null>,alertStatus=<null>,alertText=<null>,tendency=<null>,diff1=<null>,diff2=<null>,diff3=<null>],resource: CSharpFile(Folder Example.Application//Program.cs)
[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Can not execute Sonar
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:703)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:553)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:523)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:371)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:268)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:181)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:356)
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:137)
	at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
	at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:41)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
	at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
	at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
	at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.MojoExecutionException: Can not execute Sonar
	at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:87)
	at org.codehaus.mojo.sonar.Bootstraper.start(Bootstraper.java:65)
	at org.codehaus.mojo.sonar.SonarMojo.execute(SonarMojo.java:117)
	at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:483)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:678)
	... 17 more
Caused by: org.apache.maven.plugin.MojoExecutionException: Can not analyze the project
	at org.sonar.maven2.BatchMojo.executeBatch(BatchMojo.java:152)
	at org.sonar.maven2.BatchMojo.execute(BatchMojo.java:131)
	at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:483)
	at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:82)
	... 21 more
Caused by: java.lang.IllegalArgumentException: This measure has already been saved: org.sonar.api.measures.Measure@15b571e[id=<null>,metric=org.sonar.api.measures.Metric@1405ea9[key=duplicated_lines_density,name=Duplicated lines (%),type=PERCENT,enabled=true,qualitative=true,direction=-1,domain=Duplication,worstValue=50.0,bestValue=0.0,optimizedBestValue=true,hidden=false],value=0.0,data=<null>,description=<null>,alertStatus=<null>,alertText=<null>,tendency=<null>,diff1=<null>,diff2=<null>,diff3=<null>],resource: CSharpFile(Folder Example.Application//Program.cs)
	at org.sonar.batch.indexer.DefaultSonarIndex.addMeasure(DefaultSonarIndex.java:266)
	at org.sonar.batch.indexer.DefaultSonarIndex.saveMeasure(DefaultSonarIndex.java:257)
	at org.sonar.batch.DefaultDecoratorContext.saveMeasure(DefaultDecoratorContext.java:122)
	at org.sonar.plugins.cpd.decorators.DuplicationDensityDecorator.decorate(DuplicationDensityDecorator.java:63)
	at org.sonar.batch.DecoratorsExecutor.decorateResource(DecoratorsExecutor.java:76)
	at org.sonar.batch.DecoratorsExecutor.decorateResource(DecoratorsExecutor.java:69)
	at org.sonar.batch.DecoratorsExecutor.decorateResource(DecoratorsExecutor.java:69)
	at org.sonar.batch.DecoratorsExecutor.decorateResource(DecoratorsExecutor.java:69)
	at org.sonar.batch.DecoratorsExecutor.execute(DecoratorsExecutor.java:62)
	at org.sonar.batch.ProjectBatch.execute(ProjectBatch.java:53)
	at org.sonar.batch.AggregatorBatch.analyzeProject(AggregatorBatch.java:109)
	at org.sonar.batch.AggregatorBatch.analyzeProjects(AggregatorBatch.java:101)
	at org.sonar.batch.AggregatorBatch.execute(AggregatorBatch.java:85)
	at org.sonar.maven2.BatchMojo.executeBatch(BatchMojo.java:149)
	... 24 more

Let me know if you need more details

Alex




On Fri, May 7, 2010 at 8:54 PM, Olivier Gaudin <[hidden email]> wrote:
Jose, Alexandre,

Could you please let us know which issue you encountered with 2.1. We noticed an issue with the resource viewer.
Since we are going to make a 2.1.1 fix, it is a good time to report compatibility issues.

Thanks

Olivier



On Fri, May 7, 2010 at 10:39 AM, Jose CHILLAN <[hidden email]> wrote:
Hi,

We thought about hosting the project on Codehaus Mojo, but their policy seemed too restrictive (give
the code first, then maybe you will be granted a right to commit on it...) for the time we had to spend
on this project (this is only a "best effort" project developed in a company where I don't work
since end of april).
But this is definitely a good option.
For my part, who has been using the Sonar .Net plugin more than 6 month in production, I can only vote
+1



On 06/05/2010 23:31, Evgeny Mandrikov wrote:
Hi Alexandre,

Unfortunately I doesn't have enough time to test this plugin yet. So
just my two cents: can we make it compatible with Sonar 2.1 or wait
for upcoming maintenance release 2.1.1 ?

And one more question: what do you think about hosting maven part of
this work in Codehaus mojo? I think it's a best place for third-party
maven plugins ;)

On Fri, May 7, 2010 at 12:07 AM, Alexandre Victoor
<[hidden email]>  wrote:
 
Hello all,
This would be the first official release of the dotnet plugins for maven and
sonar.
You will find more information, including installation instructions in the
wiki :
 http://docs.codehaus.org/display/SONAR/.Net+plugin .

The doc of the maven plugins used to build c# projects with maven is
available at his url :
http://maven-dotnet-plugin.appspot.com

Snapshot jars for the maven and sonar plugins are available from the
snapshot repository :
http://snapshots.repository.codehaus.org/org/codehaus/sonar-plugins/dotnet/

As specified in the wiki, the current supported sonar version is 2.0.1 .
I did a quick test with version 2.1 and I was surprised to see failures... I
will post something about that later.
Let me know if you have any question

Vote open for 72 hours.

[ ] +1
[ ] +0
[ ] -1
   


 

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

  http://xircles.codehaus.org/manage_email








Reply | Threaded
Open this post in threaded view
|

Re: [sonar-dev] [VOTE] Sonar dotnet plugin 1.0

Akram Ben Aissi
Hello Simon, hello Olivier,

while browsing the mailing list, I saw this comment from Alexandre.
And I am expecting the same weird behaviour with number of unit tests metric.
Like Alexandre, I am using Sonar 2.1.1, do you have any clue on this issue ?

greetings.
Akram


Akram Ben Aïssi

Akram Ben Aïssi
Consultant

 



Simon Brandhof a écrit :
Hi Alexandre,

Which version of Sonar did you use when raising this surefire exception ?

Thank you
Simon Brandhof
SonarSource.org
SonarSource.com
---


On Mon, May 10, 2010 at 12:16 AM, Alexandre Victoor <[hidden email]> wrote:
Hello,
I have fixed the dotnet cpd plugin.
Now I have a similar error with the gallio plugin which does pretty much the same job that the surefire plugin for java projects.
The error is raised from the UnitTestDecorator :

Caused by: java.lang.IllegalArgumentException: This measure has already been saved: org.sonar.api.measures.Measure@441baac1[id=<null>,metric=org.sonar.api.measures.Metric@13684c29[key=tests,name=Unit tests,type=INT,enabled=true,qualitative=false,direction=-1,domain=Tests,worstValue=<null>,bestValue=<null>,optimizedBestValue=<null>,hidden=false],value=21.0,data=<null>,description=<null>,alertStatus=<null>,alertText=<null>,tendency=<null>,diff1=<null>,diff2=<null>,diff3=<null>],resource: org.sonar.api.resources.Project@746787d5[id=1,key=org.codehaus.sonar-plugins.dotnet.example:example,qualifier=TRK]
at org.sonar.batch.indexer.DefaultSonarIndex.addMeasure(DefaultSonarIndex.java:266)
at org.sonar.batch.indexer.DefaultSonarIndex.saveMeasure(DefaultSonarIndex.java:257)
at org.sonar.batch.DefaultDecoratorContext.saveMeasure(DefaultDecoratorContext.java:122)
at org.sonar.plugins.core.sensors.UnitTestDecorator.sumChildren(UnitTestDecorator.java:83)
at org.sonar.plugins.core.sensors.UnitTestDecorator.decorate(UnitTestDecorator.java:56)
at org.sonar.batch.DecoratorsExecutor.decorateResource(DecoratorsExecutor.java:76)
at org.sonar.batch.DecoratorsExecutor.execute(DecoratorsExecutor.java:62)
at org.sonar.batch.ProjectBatch.execute(ProjectBatch.java:53)
at org.sonar.batch.AggregatorBatch.analyzeProject(AggregatorBatch.java:109)
at org.sonar.batch.AggregatorBatch.analyzeProjects(AggregatorBatch.java:101)
at org.sonar.batch.AggregatorBatch.execute(AggregatorBatch.java:85)
at org.sonar.maven2.BatchMojo.executeBatch(BatchMojo.java:149)
... 24 more

This decorator tries to save a measure for metric CoreMetrics.TESTS at the root of the project.
The dotnet gallio plugin does not do that and so I have run the analysis in debug mode.
My conclusions : the problem comes from the surefire plugin. WIth dotnet projects, we do not have any surefire report and the packaging is "sln".
In the surefire plugin the following method is called :

private void insertZeroWhenNoReports(Project pom, SensorContext context) {
    if (!StringUtils.equalsIgnoreCase("pom", pom.getPackaging())) {
      context.saveMeasure(CoreMetrics.TESTS, 0.0);
    }
  }

IMHO the behavior of the surefire plugin should be corrected prior to sonar.2.1.1
Let me know if you need more details
Regards

Alex







On Sat, May 8, 2010 at 12:02 AM, Alexandre Victoor <[hidden email]> wrote:
Thanks Olivier,
I have understand what is wrong. I will fix it monday...
I agree to suspend voting. 
Have a nice week-end

Alex


On Fri, May 7, 2010 at 9:32 PM, Olivier Gaudin <[hidden email]> wrote:
Ok, thank you for this. We have indeed added a verification in Sonar 2.1 to make sure that measures are not saved twice, otherwise you would have them twice in the database. Prior to 2.1, this was not checked this is why you did not realize it.

This needs to be fixed in your plugin. I would recommend you do it prior to voting.

Olivier



On Fri, May 7, 2010 at 9:27 PM, Alexandre Victoor <[hidden email]> wrote:
Hello,
Running mvn sonar:sonar on our "test solution", I get the followings logs :

...
[INFO] FxCop report generated
[INFO]  Execute maven plugin maven-dotnet-plugin done: 1078 ms
[INFO]  Sensor org.sonar.plugin.dotnet.fxcop.FxCopSensor@a05bc3...
[INFO]  Sensor org.sonar.plugin.dotnet.fxcop.FxCopSensor@a05bc3 done: 219 ms
[INFO]  Sensor SurefireSensor...
[INFO]  parsing C:\HOMEWARE\codehaus\maven\dotnet-commons\src\test\resources\solution\Example\target\surefire-reports
[INFO]  Sensor SurefireSensor done: 0 ms
[INFO]  Sensor CpdSensor...
[INFO]  Sensor CpdSensor done: 0 ms
[INFO]  Sensor ProfileSensor...
[INFO]  Sensor ProfileSensor done: 0 ms
[INFO]  Sensor ProjectLinksSensor...
[INFO]  Sensor ProjectLinksSensor done: 16 ms
[INFO]  Sensor VersionEventsSensor...
[INFO]  Sensor VersionEventsSensor done: 0 ms
[INFO]  Sensor Maven dependencies...
[INFO]  Sensor Maven dependencies done: 15 ms
[INFO]  Execute decorators...
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Can not execute Sonar

Embedded error: Can not analyze the project
This measure has already been saved: org.sonar.api.measures.Measure@15b571e[id=<null>,metric=org.sonar.api.measures.Metric@1405ea9[key=duplicated_lines_density,name=Duplicated lines (%),type=PERCENT,enabled=true,qualitative=true,direction=-1,domain=Duplication,worstValue=50.0,bestValue=0.0,optimizedBestValue=true,hidden=false],value=0.0,data=<null>,description=<null>,alertStatus=<null>,alertText=<null>,tendency=<null>,diff1=<null>,diff2=<null>,diff3=<null>],resource: CSharpFile(Folder Example.Application//Program.cs)
[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Can not execute Sonar
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:703)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:553)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:523)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:371)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:268)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:181)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:356)
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:137)
	at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
	at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:41)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
	at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
	at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
	at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.MojoExecutionException: Can not execute Sonar
	at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:87)
	at org.codehaus.mojo.sonar.Bootstraper.start(Bootstraper.java:65)
	at org.codehaus.mojo.sonar.SonarMojo.execute(SonarMojo.java:117)
	at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:483)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:678)
	... 17 more
Caused by: org.apache.maven.plugin.MojoExecutionException: Can not analyze the project
	at org.sonar.maven2.BatchMojo.executeBatch(BatchMojo.java:152)
	at org.sonar.maven2.BatchMojo.execute(BatchMojo.java:131)
	at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:483)
	at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:82)
	... 21 more
Caused by: java.lang.IllegalArgumentException: This measure has already been saved: org.sonar.api.measures.Measure@15b571e[id=<null>,metric=org.sonar.api.measures.Metric@1405ea9[key=duplicated_lines_density,name=Duplicated lines (%),type=PERCENT,enabled=true,qualitative=true,direction=-1,domain=Duplication,worstValue=50.0,bestValue=0.0,optimizedBestValue=true,hidden=false],value=0.0,data=<null>,description=<null>,alertStatus=<null>,alertText=<null>,tendency=<null>,diff1=<null>,diff2=<null>,diff3=<null>],resource: CSharpFile(Folder Example.Application//Program.cs)
	at org.sonar.batch.indexer.DefaultSonarIndex.addMeasure(DefaultSonarIndex.java:266)
	at org.sonar.batch.indexer.DefaultSonarIndex.saveMeasure(DefaultSonarIndex.java:257)
	at org.sonar.batch.DefaultDecoratorContext.saveMeasure(DefaultDecoratorContext.java:122)
	at org.sonar.plugins.cpd.decorators.DuplicationDensityDecorator.decorate(DuplicationDensityDecorator.java:63)
	at org.sonar.batch.DecoratorsExecutor.decorateResource(DecoratorsExecutor.java:76)
	at org.sonar.batch.DecoratorsExecutor.decorateResource(DecoratorsExecutor.java:69)
	at org.sonar.batch.DecoratorsExecutor.decorateResource(DecoratorsExecutor.java:69)
	at org.sonar.batch.DecoratorsExecutor.decorateResource(DecoratorsExecutor.java:69)
	at org.sonar.batch.DecoratorsExecutor.execute(DecoratorsExecutor.java:62)
	at org.sonar.batch.ProjectBatch.execute(ProjectBatch.java:53)
	at org.sonar.batch.AggregatorBatch.analyzeProject(AggregatorBatch.java:109)
	at org.sonar.batch.AggregatorBatch.analyzeProjects(AggregatorBatch.java:101)
	at org.sonar.batch.AggregatorBatch.execute(AggregatorBatch.java:85)
	at org.sonar.maven2.BatchMojo.executeBatch(BatchMojo.java:149)
	... 24 more

Let me know if you need more details

Alex




On Fri, May 7, 2010 at 8:54 PM, Olivier Gaudin <[hidden email]> wrote:
Jose, Alexandre,

Could you please let us know which issue you encountered with 2.1. We noticed an issue with the resource viewer.
Since we are going to make a 2.1.1 fix, it is a good time to report compatibility issues.

Thanks

Olivier



On Fri, May 7, 2010 at 10:39 AM, Jose CHILLAN <[hidden email]> wrote:
Hi,

We thought about hosting the project on Codehaus Mojo, but their policy seemed too restrictive (give
the code first, then maybe you will be granted a right to commit on it...) for the time we had to spend
on this project (this is only a "best effort" project developed in a company where I don't work
since end of april).
But this is definitely a good option.
For my part, who has been using the Sonar .Net plugin more than 6 month in production, I can only vote
+1



On 06/05/2010 23:31, Evgeny Mandrikov wrote:
Hi Alexandre,

Unfortunately I doesn't have enough time to test this plugin yet. So
just my two cents: can we make it compatible with Sonar 2.1 or wait
for upcoming maintenance release 2.1.1 ?

And one more question: what do you think about hosting maven part of
this work in Codehaus mojo? I think it's a best place for third-party
maven plugins ;)

On Fri, May 7, 2010 at 12:07 AM, Alexandre Victoor
<[hidden email]>  wrote:
 
Hello all,
This would be the first official release of the dotnet plugins for maven and
sonar.
You will find more information, including installation instructions in the
wiki :
 http://docs.codehaus.org/display/SONAR/.Net+plugin .

The doc of the maven plugins used to build c# projects with maven is
available at his url :
http://maven-dotnet-plugin.appspot.com

Snapshot jars for the maven and sonar plugins are available from the
snapshot repository :
http://snapshots.repository.codehaus.org/org/codehaus/sonar-plugins/dotnet/

As specified in the wiki, the current supported sonar version is 2.0.1 .
I did a quick test with version 2.1 and I was surprised to see failures... I
will post something about that later.
Let me know if you have any question

Vote open for 72 hours.

[ ] +1
[ ] +0
[ ] -1
   


 

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

  http://xircles.codehaus.org/manage_email








--------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email
Reply | Threaded
Open this post in threaded view
|

Re: [sonar-dev] [VOTE] Sonar dotnet plugin 1.0

Olivier Gaudin-2
Akram,

As you mentioned, it works fine when using packaging pom. This looks like a good work around to me.
By the way, why do you use packaging php ? Is that used anywhere in the plugin ?

Olivier


On Wed, May 26, 2010 at 7:49 PM, Akram BEN AISSI <[hidden email]> wrote:
Hello Simon, hello Olivier,

while browsing the mailing list, I saw this comment from Alexandre.
And I am expecting the same weird behaviour with number of unit tests metric.
Like Alexandre, I am using Sonar 2.1.1, do you have any clue on this issue ?

greetings.
Akram


Akram Ben Aïssi
Consultant

 



Simon Brandhof a écrit :
Hi Alexandre,

Which version of Sonar did you use when raising this surefire exception ?

Thank you
Simon Brandhof
SonarSource.org
SonarSource.com
---


On Mon, May 10, 2010 at 12:16 AM, Alexandre Victoor <[hidden email]> wrote:
Hello,
I have fixed the dotnet cpd plugin.
Now I have a similar error with the gallio plugin which does pretty much the same job that the surefire plugin for java projects.
The error is raised from the UnitTestDecorator :

Caused by: java.lang.IllegalArgumentException: This measure has already been saved: org.sonar.api.measures.Measure@441baac1[id=<null>,metric=org.sonar.api.measures.Metric@13684c29[key=tests,name=Unit tests,type=INT,enabled=true,qualitative=false,direction=-1,domain=Tests,worstValue=<null>,bestValue=<null>,optimizedBestValue=<null>,hidden=false],value=21.0,data=<null>,description=<null>,alertStatus=<null>,alertText=<null>,tendency=<null>,diff1=<null>,diff2=<null>,diff3=<null>],resource: org.sonar.api.resources.Project@746787d5[id=1,key=org.codehaus.sonar-plugins.dotnet.example:example,qualifier=TRK]
at org.sonar.batch.indexer.DefaultSonarIndex.addMeasure(DefaultSonarIndex.java:266)
at org.sonar.batch.indexer.DefaultSonarIndex.saveMeasure(DefaultSonarIndex.java:257)
at org.sonar.batch.DefaultDecoratorContext.saveMeasure(DefaultDecoratorContext.java:122)
at org.sonar.plugins.core.sensors.UnitTestDecorator.sumChildren(UnitTestDecorator.java:83)
at org.sonar.plugins.core.sensors.UnitTestDecorator.decorate(UnitTestDecorator.java:56)
at org.sonar.batch.DecoratorsExecutor.decorateResource(DecoratorsExecutor.java:76)
at org.sonar.batch.DecoratorsExecutor.execute(DecoratorsExecutor.java:62)
at org.sonar.batch.ProjectBatch.execute(ProjectBatch.java:53)
at org.sonar.batch.AggregatorBatch.analyzeProject(AggregatorBatch.java:109)
at org.sonar.batch.AggregatorBatch.analyzeProjects(AggregatorBatch.java:101)
at org.sonar.batch.AggregatorBatch.execute(AggregatorBatch.java:85)
at org.sonar.maven2.BatchMojo.executeBatch(BatchMojo.java:149)
... 24 more

This decorator tries to save a measure for metric CoreMetrics.TESTS at the root of the project.
The dotnet gallio plugin does not do that and so I have run the analysis in debug mode.
My conclusions : the problem comes from the surefire plugin. WIth dotnet projects, we do not have any surefire report and the packaging is "sln".
In the surefire plugin the following method is called :

private void insertZeroWhenNoReports(Project pom, SensorContext context) {
    if (!StringUtils.equalsIgnoreCase("pom", pom.getPackaging())) {
      context.saveMeasure(CoreMetrics.TESTS, 0.0);
    }
  }

IMHO the behavior of the surefire plugin should be corrected prior to sonar.2.1.1
Let me know if you need more details
Regards

Alex







On Sat, May 8, 2010 at 12:02 AM, Alexandre Victoor <[hidden email]> wrote:
Thanks Olivier,
I have understand what is wrong. I will fix it monday...
I agree to suspend voting. 
Have a nice week-end

Alex


On Fri, May 7, 2010 at 9:32 PM, Olivier Gaudin <[hidden email]> wrote:
Ok, thank you for this. We have indeed added a verification in Sonar 2.1 to make sure that measures are not saved twice, otherwise you would have them twice in the database. Prior to 2.1, this was not checked this is why you did not realize it.

This needs to be fixed in your plugin. I would recommend you do it prior to voting.

Olivier



On Fri, May 7, 2010 at 9:27 PM, Alexandre Victoor <[hidden email]> wrote:
Hello,
Running mvn sonar:sonar on our "test solution", I get the followings logs :

...
[INFO] FxCop report generated
[INFO]  Execute maven plugin maven-dotnet-plugin done: 1078 ms
[INFO]  Sensor org.sonar.plugin.dotnet.fxcop.FxCopSensor@a05bc3...
[INFO]  Sensor org.sonar.plugin.dotnet.fxcop.FxCopSensor@a05bc3 done: 219 ms
[INFO]  Sensor SurefireSensor...
[INFO]  parsing C:\HOMEWARE\codehaus\maven\dotnet-commons\src\test\resources\solution\Example\target\surefire-reports
[INFO]  Sensor SurefireSensor done: 0 ms
[INFO]  Sensor CpdSensor...
[INFO]  Sensor CpdSensor done: 0 ms
[INFO]  Sensor ProfileSensor...
[INFO]  Sensor ProfileSensor done: 0 ms
[INFO]  Sensor ProjectLinksSensor...
[INFO]  Sensor ProjectLinksSensor done: 16 ms
[INFO]  Sensor VersionEventsSensor...
[INFO]  Sensor VersionEventsSensor done: 0 ms
[INFO]  Sensor Maven dependencies...
[INFO]  Sensor Maven dependencies done: 15 ms
[INFO]  Execute decorators...
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Can not execute Sonar

Embedded error: Can not analyze the project
This measure has already been saved: org.sonar.api.measures.Measure@15b571e[id=<null>,metric=org.sonar.api.measures.Metric@1405ea9[key=duplicated_lines_density,name=Duplicated lines (%),type=PERCENT,enabled=true,qualitative=true,direction=-1,domain=Duplication,worstValue=50.0,bestValue=0.0,optimizedBestValue=true,hidden=false],value=0.0,data=<null>,description=<null>,alertStatus=<null>,alertText=<null>,tendency=<null>,diff1=<null>,diff2=<null>,diff3=<null>],resource: CSharpFile(Folder Example.Application//Program.cs)
[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Can not execute Sonar
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:703)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:553)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:523)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:371)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:268)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:181)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:356)
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:137)
	at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
	at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:41)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
	at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
	at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
	at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.MojoExecutionException: Can not execute Sonar
	at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:87)
	at org.codehaus.mojo.sonar.Bootstraper.start(Bootstraper.java:65)
	at org.codehaus.mojo.sonar.SonarMojo.execute(SonarMojo.java:117)
	at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:483)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:678)
	... 17 more
Caused by: org.apache.maven.plugin.MojoExecutionException: Can not analyze the project
	at org.sonar.maven2.BatchMojo.executeBatch(BatchMojo.java:152)
	at org.sonar.maven2.BatchMojo.execute(BatchMojo.java:131)
	at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:483)
	at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:82)
	... 21 more
Caused by: java.lang.IllegalArgumentException: This measure has already been saved: org.sonar.api.measures.Measure@15b571e[id=<null>,metric=org.sonar.api.measures.Metric@1405ea9[key=duplicated_lines_density,name=Duplicated lines (%),type=PERCENT,enabled=true,qualitative=true,direction=-1,domain=Duplication,worstValue=50.0,bestValue=0.0,optimizedBestValue=true,hidden=false],value=0.0,data=<null>,description=<null>,alertStatus=<null>,alertText=<null>,tendency=<null>,diff1=<null>,diff2=<null>,diff3=<null>],resource: CSharpFile(Folder Example.Application//Program.cs)
	at org.sonar.batch.indexer.DefaultSonarIndex.addMeasure(DefaultSonarIndex.java:266)
	at org.sonar.batch.indexer.DefaultSonarIndex.saveMeasure(DefaultSonarIndex.java:257)
	at org.sonar.batch.DefaultDecoratorContext.saveMeasure(DefaultDecoratorContext.java:122)
	at org.sonar.plugins.cpd.decorators.DuplicationDensityDecorator.decorate(DuplicationDensityDecorator.java:63)
	at org.sonar.batch.DecoratorsExecutor.decorateResource(DecoratorsExecutor.java:76)
	at org.sonar.batch.DecoratorsExecutor.decorateResource(DecoratorsExecutor.java:69)
	at org.sonar.batch.DecoratorsExecutor.decorateResource(DecoratorsExecutor.java:69)
	at org.sonar.batch.DecoratorsExecutor.decorateResource(DecoratorsExecutor.java:69)
	at org.sonar.batch.DecoratorsExecutor.execute(DecoratorsExecutor.java:62)
	at org.sonar.batch.ProjectBatch.execute(ProjectBatch.java:53)
	at org.sonar.batch.AggregatorBatch.analyzeProject(AggregatorBatch.java:109)
	at org.sonar.batch.AggregatorBatch.analyzeProjects(AggregatorBatch.java:101)
	at org.sonar.batch.AggregatorBatch.execute(AggregatorBatch.java:85)
	at org.sonar.maven2.BatchMojo.executeBatch(BatchMojo.java:149)
	... 24 more

Let me know if you need more details

Alex




On Fri, May 7, 2010 at 8:54 PM, Olivier Gaudin <[hidden email]> wrote:
Jose, Alexandre,

Could you please let us know which issue you encountered with 2.1. We noticed an issue with the resource viewer.
Since we are going to make a 2.1.1 fix, it is a good time to report compatibility issues.

Thanks

Olivier



On Fri, May 7, 2010 at 10:39 AM, Jose CHILLAN <[hidden email]> wrote:
Hi,

We thought about hosting the project on Codehaus Mojo, but their policy seemed too restrictive (give
the code first, then maybe you will be granted a right to commit on it...) for the time we had to spend
on this project (this is only a "best effort" project developed in a company where I don't work
since end of april).
But this is definitely a good option.
For my part, who has been using the Sonar .Net plugin more than 6 month in production, I can only vote
+1



On 06/05/2010 23:31, Evgeny Mandrikov wrote:
Hi Alexandre,

Unfortunately I doesn't have enough time to test this plugin yet. So
just my two cents: can we make it compatible with Sonar 2.1 or wait
for upcoming maintenance release 2.1.1 ?

And one more question: what do you think about hosting maven part of
this work in Codehaus mojo? I think it's a best place for third-party
maven plugins ;)

On Fri, May 7, 2010 at 12:07 AM, Alexandre Victoor
<[hidden email]>  wrote:
 
Hello all,
This would be the first official release of the dotnet plugins for maven and
sonar.
You will find more information, including installation instructions in the
wiki :
 http://docs.codehaus.org/display/SONAR/.Net+plugin .

The doc of the maven plugins used to build c# projects with maven is
available at his url :
http://maven-dotnet-plugin.appspot.com

Snapshot jars for the maven and sonar plugins are available from the
snapshot repository :
http://snapshots.repository.codehaus.org/org/codehaus/sonar-plugins/dotnet/

As specified in the wiki, the current supported sonar version is 2.0.1 .
I did a quick test with version 2.1 and I was surprised to see failures... I
will post something about that later.
Let me know if you have any question

Vote open for 72 hours.

[ ] +1
[ ] +0
[ ] -1
   


 

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

  http://xircles.codehaus.org/manage_email








--------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email