Quantcast

Coberura report only

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Coberura report only

Dryahlov, Andrey

Hi,

 

I am working on Avaya and we have a very huge product which has more than 10 000 000 LOC. Avaya has a Sonar server and I have a task to use for my product as well. For now, the only thing which is required for us is to upload cobertura report into it. A cobertura report will be generated from several Java application (merged into one report in XML format). The question is: is it possible to use Sonar only to upload cobertura report without doing any analyzing, parsing and so on? Do I need access to source code for that (we can set up access to source code but the requirement is do not use sources for generating report)?

I tried to find answer in google and looked at Sonar source code but did not find any parameters to disable everything. The only parameters I found is sonar.skipDesign and sonar.skipPackageDesign but setting it to true value did not take effect.

 

And the last problem which I faced is that I don’t know how to set/change working directory for sonar (I meant a folder with .sonar name). By default it was created somewhere near the sources but in my case (we are using Clearcase and dynamic views) the access to this folder is restricted (actually you can not create or modify something in it). Thus I need an option to change working dir to any temp directories. Do you know how to change it?

 

Please answer me if you know what should be defined in ant script (we are using ant script to compile and run sonar). It is not possible to split project to several smaller projects due to historical reasons.

 

Thanks in advance.

Andrey

 

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Coberura report only

Freddy Mallet
Hi Andrey,

See my comment below :

I am working on Avaya and we have a very huge product which has more than 10 000 000 LOC.

The size is not an issue as long as those 10 MLOC are not located in the same huge monolithic project.

Avaya has a Sonar server

Is this Sonar server already used ? 

and I have a task to use for my product as well. For now, the only thing which is required for us is to upload cobertura report into it. A cobertura report will be generated from several Java application (merged into one report in XML format). The question is: is it possible to use Sonar only to upload cobertura report without doing any analyzing, parsing and so on?

No 

Do I need access to source code for that (we can set up access to source code but the requirement is do not use sources for generating report)?

Yes 

I tried to find answer in google and looked at Sonar source code but did not find any parameters to disable everything. The only parameters I found is sonar.skipDesign and sonar.skipPackageDesign but setting it to true value did not take effect.

And indeed this is the only thing that you can deactivate.

But the question is : "why do you want to deactivate everything ?" 

 And the last problem which I faced is that I don’t know how to set/change working directory for sonar (I meant a folder with .sonar name).

Just to better understand your context, which build tool are you using ? Ant, Maven, Gradle, ... ?  

By default it was created somewhere near the sources but in my case (we are using Clearcase and dynamic views) the access to this folder is restricted (actually you can not create or modify something in it). Thus I need an option to change working dir to any temp directories. Do you know how to change it?

In that case, the best option is to not launch the sonar-runner (I guess you're using the sonar-runner and not the Sonar ant task ?) in the root directory of your project but in a dedicated directory structure as the .sonar directory is created where you launch the sonar-runner application.

Kind regards,
Freddy

PS: and please don't send email to both the dev and user mailing list.

 

Please answer me if you know what should be defined in ant script (we are using ant script to compile and run sonar). It is not possible to split project to several smaller projects due to historical reasons.

 

Thanks in advance.

Andrey

 


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: Coberura report only

Dryahlov, Andrey

Thanks for the answer. Please find comments and questions inline in bold

 

From: Freddy Mallet [mailto:[hidden email]]
Sent: Tuesday, September 11, 2012 3:48 PM
To: [hidden email]
Subject: Re: [sonar-user] Coberura report only

 

Hi Andrey,

 

See my comment below :

I am working on Avaya and we have a very huge product which has more than 10 000 000 LOC.

The size is not an issue as long as those 10 MLOC are not located in the same huge monolithic project.

[AD] This is monolithic project. That’s what I meant. And looks like this is a problem. Am I right?

Avaya has a Sonar server

Is this Sonar server already used ? 

[AD] yes, it has a lot of small projects (not more than 200000 LOC)

and I have a task to use for my product as well. For now, the only thing which is required for us is to upload cobertura report into it. A cobertura report will be generated from several Java application (merged into one report in XML format). The question is: is it possible to use Sonar only to upload cobertura report without doing any analyzing, parsing and so on?

No 

[AD] Ok, that’s clear.

Do I need access to source code for that (we can set up access to source code but the requirement is do not use sources for generating report)?

Yes 

[AD] Ok, that’s clear.

I tried to find answer in google and looked at Sonar source code but did not find any parameters to disable everything. The only parameters I found is sonar.skipDesign and sonar.skipPackageDesign but setting it to true value did not take effect.

And indeed this is the only thing that you can deactivate.

[AD] I deactivated these things.

 

But the question is : "why do you want to deactivate everything ?" 

[AD] The main reason why I want to deactivate as much as possible is that I don’t need it. The only goal is to upload a cobertura report and have basic statistic on it. Management needs this info for its management J. As I undertood there a rule configured on sonar server for all projects. I want to add my project but the only way to do that is to finish analyzing process successfully. Currently I can not do that because sone fails with error below. The question is can I skip things like that? Or I have to configure my own rule for my project and assign it? If yes, then how can I do that if I can not finish analyzing successfully?

14:53:19:425 - [sonar:sonar] 14:53:19.420 INFO   o.s.p.s.ScmUrlGuess - Trying to guess scm provider from project layout...

14:53:19:427 - [sonar:sonar] 14:53:19.421 INFO   o.s.p.s.ScmUrlGuess - Didn't find which SCM provider is used. Fallback on configuration

14:53:19:605 - BUILD FAILED

14:53:19:606 - org.sonar.api.utils.SonarException: SCM URL must not be blank. Please check the parameter "sonar.scm.url" or the <scm> section of Maven pom.

 

 And the last problem which I faced is that I don’t know how to set/change working directory for sonar (I meant a folder with .sonar name).

Just to better understand your context, which build tool are you using ? Ant, Maven, Gradle, ... ?  

[AD] I am using ant. I am not using sonar-runner.

By default it was created somewhere near the sources but in my case (we are using Clearcase and dynamic views) the access to this folder is restricted (actually you can not create or modify something in it). Thus I need an option to change working dir to any temp directories. Do you know how to change it?

In that case, the best option is to not launch the sonar-runner (I guess you're using the sonar-runner and not the Sonar ant task ?) in the root directory of your project but in a dedicated directory structure as the .sonar directory is created where you launch the sonar-runner application.

 

Kind regards,

Freddy

 

PS: and please don't send email to both the dev and user mailing list.

[AD] Yes, thanks. I will not do that anymore.

 

Please answer me if you know what should be defined in ant script (we are using ant script to compile and run sonar). It is not possible to split project to several smaller projects due to historical reasons.

 

Thanks in advance.

Andrey

 

 

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: Coberura report only

Holmes, Daniel

Wait, you can upload cobertura report previously generated via the ant task.  I do that as below, you need the sonar.dynamicAnalysis, sonar.cobertura.reportPath, and sonar.core.codeCoveragePlugin properties set.

 

Or am I not understanding the question being asked?

 

        <sonar:sonar

            workDir="${sonar.tmp.dir}"

            key="com.company:${ant.project.name}"

            version="${project.version}">

            <!-- Properties defining Sonar server location and access defined in project build.properties-->

 

            <!-- source directories (required) -->

            <sources path="${src.main.java.dir}"/>

 

           <!-- binaries directories, the compiled Java bytecode (optional) -->

            <binaries path="${package.dir}"/>

 

            <!-- test source directories (optional) -->

            <tests path="${src.test.java.dir}"/>

 

            <!-- path to libraries (optional).  Component jar file dependencies -->

            <libraries refid="build.binary.classpath"/>

 

            <!-- list analysis of properties (optional)

               - see http://docs.codehaus.org/display/SONAR/Advanced+parameters

               - configured to reuse the unit test and coverage reports generated during the build phases

              -->

            <property key="sonar.projectName" value="${ant.project.name}" />

            <property key="sonar.dynamicAnalysis" value="reuseReports" />

            <property key="sonar.surefire.reportsPath" value="${junit.reports.dir}" />

            <property key="sonar.core.codeCoveragePlugin" value="cobertura" />

            <property key="sonar.cobertura.reportPath" value="${cobertura.coverage.file}" />

        </sonar:sonar>

 

Daniel

 

From: Dryahlov, Andrey [mailto:[hidden email]]
Sent: Tuesday, September 11, 2012 7:59 AM
To: [hidden email]
Subject: RE: [sonar-user] Coberura report only

 

Thanks for the answer. Please find comments and questions inline in bold

 

From: Freddy Mallet [mailto:[hidden email]]
Sent: Tuesday, September 11, 2012 3:48 PM
To: [hidden email]
Subject: Re: [sonar-user] Coberura report only

 

Hi Andrey,

 

See my comment below :

I am working on Avaya and we have a very huge product which has more than 10 000 000 LOC.

The size is not an issue as long as those 10 MLOC are not located in the same huge monolithic project.

[AD] This is monolithic project. That’s what I meant. And looks like this is a problem. Am I right?

Avaya has a Sonar server

Is this Sonar server already used ? 

[AD] yes, it has a lot of small projects (not more than 200000 LOC)

and I have a task to use for my product as well. For now, the only thing which is required for us is to upload cobertura report into it. A cobertura report will be generated from several Java application (merged into one report in XML format). The question is: is it possible to use Sonar only to upload cobertura report without doing any analyzing, parsing and so on?

No 

[AD] Ok, that’s clear.

Do I need access to source code for that (we can set up access to source code but the requirement is do not use sources for generating report)?

Yes 

[AD] Ok, that’s clear.

I tried to find answer in google and looked at Sonar source code but did not find any parameters to disable everything. The only parameters I found is sonar.skipDesign and sonar.skipPackageDesign but setting it to true value did not take effect.

And indeed this is the only thing that you can deactivate.

[AD] I deactivated these things.

 

But the question is : "why do you want to deactivate everything ?" 

[AD] The main reason why I want to deactivate as much as possible is that I don’t need it. The only goal is to upload a cobertura report and have basic statistic on it. Management needs this info for its management J. As I undertood there a rule configured on sonar server for all projects. I want to add my project but the only way to do that is to finish analyzing process successfully. Currently I can not do that because sone fails with error below. The question is can I skip things like that? Or I have to configure my own rule for my project and assign it? If yes, then how can I do that if I can not finish analyzing successfully?

14:53:19:425 - [sonar:sonar] 14:53:19.420 INFO   o.s.p.s.ScmUrlGuess - Trying to guess scm provider from project layout...

14:53:19:427 - [sonar:sonar] 14:53:19.421 INFO   o.s.p.s.ScmUrlGuess - Didn't find which SCM provider is used. Fallback on configuration

14:53:19:605 - BUILD FAILED

14:53:19:606 - org.sonar.api.utils.SonarException: SCM URL must not be blank. Please check the parameter "sonar.scm.url" or the <scm> section of Maven pom.

 

 And the last problem which I faced is that I don’t know how to set/change working directory for sonar (I meant a folder with .sonar name).

Just to better understand your context, which build tool are you using ? Ant, Maven, Gradle, ... ?  

[AD] I am using ant. I am not using sonar-runner.

By default it was created somewhere near the sources but in my case (we are using Clearcase and dynamic views) the access to this folder is restricted (actually you can not create or modify something in it). Thus I need an option to change working dir to any temp directories. Do you know how to change it?

In that case, the best option is to not launch the sonar-runner (I guess you're using the sonar-runner and not the Sonar ant task ?) in the root directory of your project but in a dedicated directory structure as the .sonar directory is created where you launch the sonar-runner application.

 

Kind regards,

Freddy

 

PS: and please don't send email to both the dev and user mailing list.

[AD] Yes, thanks. I will not do that anymore.

 

Please answer me if you know what should be defined in ant script (we are using ant script to compile and run sonar). It is not possible to split project to several smaller projects due to historical reasons.

 

Thanks in advance.

Andrey

 

 

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Coberura report only

Freddy Mallet
In reply to this post by Dryahlov, Andrey
Hi Andrey, 

See my comments below :

I am working on Avaya and we have a very huge product which has more than 10 000 000 LOC.

The size is not an issue as long as those 10 MLOC are not located in the same huge monolithic project.

[AD] This is monolithic project. That’s what I meant. And looks like this is a problem. Am I right?


Indeed, in that case this will require a huge amount of RAM to analyse your project. 
But I guess this is the same thing in a java IDE. Don't you have at least some dedicated sub-directories ? (FYI in the upcoming version of the sonar-runer, we'll support multi-modules and so the ability to split your huge monolithic java projects but only if your java source files are not all located in the same directory)

Avaya has a Sonar server

Is this Sonar server already used ? 

[AD] yes, it has a lot of small projects (not more than 200000 LOC)


Sonar with its 60'000 lines of java code is then a very small project ;-) 


But the question is : "why do you want to deactivate everything ?" 

[AD] The main reason why I want to deactivate as much as possible is that I don’t need it. The only goal is to upload a cobertura report and have basic statistic on it. Management needs this info for its management J. As I undertood there a rule configured on sonar server for all projects. I want to add my project but the only way to do that is to finish analyzing process successfully. Currently I can not do that because sone fails with error below. The question is can I skip things like that? Or I have to configure my own rule for my project and assign it? If yes, then how can I do that if I can not finish analyzing successfully?

14:53:19:425 - [sonar:sonar] 14:53:19.420 INFO   o.s.p.s.ScmUrlGuess - Trying to guess scm provider from project layout...

14:53:19:427 - [sonar:sonar] 14:53:19.421 INFO   o.s.p.s.ScmUrlGuess - Didn't find which SCM provider is used. Fallback on configuration

14:53:19:605 - BUILD FAILED

14:53:19:606 - org.sonar.api.utils.SonarException: SCM URL must not be blank. Please check the parameter "sonar.scm.url" or the <scm> section of Maven pom.


You get this error because the Sonar SCM Activity plugin has been installed and activated in your company Sonar server. Please contact your Sonar administrator to get some advises to configure this plugin.
In any case, if you only needs to get the code coverage, I don't think using Sonar is the best and simple solution to reach your goal.

Kind regards,
Freddy
 

 

 And the last problem which I faced is that I don’t know how to set/change working directory for sonar (I meant a folder with .sonar name).

Just to better understand your context, which build tool are you using ? Ant, Maven, Gradle, ... ?  

[AD] I am using ant. I am not using sonar-runner.

By default it was created somewhere near the sources but in my case (we are using Clearcase and dynamic views) the access to this folder is restricted (actually you can not create or modify something in it). Thus I need an option to change working dir to any temp directories. Do you know how to change it?

In that case, the best option is to not launch the sonar-runner (I guess you're using the sonar-runner and not the Sonar ant task ?) in the root directory of your project but in a dedicated directory structure as the .sonar directory is created where you launch the sonar-runner application.

 

Kind regards,

Freddy

 

PS: and please don't send email to both the dev and user mailing list.

[AD] Yes, thanks. I will not do that anymore.

 

Please answer me if you know what should be defined in ant script (we are using ant script to compile and run sonar). It is not possible to split project to several smaller projects due to historical reasons.

 

Thanks in advance.

Andrey

 

 


Loading...