Quantcast

Code coverage not showing on Sonar dashboard

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

Code coverage not showing on Sonar dashboard

kavita  mum
Hi,

This issue is in continuation to SONAR-3165.

The Sonar Analysis reports (Jenkins console) show this particular warning:

Cobertura report not found at /var/lib/user/workspace/project/trunk/target/site/cobertura/coverage.xml

Which might be the case as cobertura is not executed as the maven goal. The jobs are executed through Jenkins using maven. The goals executed are:

clean install -Pdev

However, after installing the Jenkins cobertura plugin and executing the following maven goals: clean install cobertura :cobertura  -Pdev , I get the following error and the Build fails.

[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error configuring: org.apache.maven.plugins:maven-war-plugin. Reason: ERROR: Cannot override read-only parameter: classesDirectory in goal: war:manifest

Though the classes directory is not read-only on the system, I am unable to figure out the issue.

Could you please help configure the same so that Sonar is able to read the code coverage statistics and display them on the dashboard ?

The versions used are:
Maven: 2.2.1
Sonar: 2.12
Jenkins: 1.447
Sonar Plugin: 1.7.2
Jenkins Cobertura Plugin: 1.3

Thanks.



Follow Rediff Deal ho jaye! to get exciting offers in your city everyday.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Code coverage not showing on Sonar dashboard

Evgeny Mandrikov
Hi,

Could you provide minimalistic example of project to reproduce this problem?

On Wed, Jan 18, 2012 at 20:08, kavita mum <[hidden email]> wrote:
Hi,

This issue is in continuation to SONAR-3165.

The Sonar Analysis reports (Jenkins console) show this particular warning:

Cobertura report not found at /var/lib/user/workspace/project/trunk/target/site/cobertura/coverage.xml

Which might be the case as cobertura is not executed as the maven goal. The jobs are executed through Jenkins using maven. The goals executed are:

clean install -Pdev

However, after installing the Jenkins cobertura plugin and executing the following maven goals: clean install cobertura :cobertura  -Pdev , I get the following error and the Build fails.

[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error configuring: org.apache.maven.plugins:maven-war-plugin. Reason: ERROR: Cannot override read-only parameter: classesDirectory in goal: war:manifest

Though the classes directory is not read-only on the system, I am unable to figure out the issue.

Could you please help configure the same so that Sonar is able to read the code coverage statistics and display them on the dashboard ?

The versions used are:
Maven: 2.2.1
Sonar: 2.12
Jenkins: 1.447
Sonar Plugin: 1.7.2
Jenkins Cobertura Plugin: 1.3

Thanks.



Follow Rediff Deal ho jaye! to get exciting offers in your city everyday.



--
Best regards,
Evgeny Mandrikov aka Godin <http://godin.net.ru>
http://twitter.com/_godin_
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Code coverage not showing on Sonar dashboard

kavita  mum
In reply to this post by kavita mum
Hi Evgeny,

Thanks for your response.

Considering our environment, we have our code base in SVN, the pom.xml is written so as to produce a 'war' package. A project is created in Jenkins which checksout this SVN repository and builds the pom.xml file using the command clean install -Pdev

The above command works successfully and the build passes and the war as well as tests are executed.

However, when a slight change is made in the command by adding cobertura - clean install cobertura :cobertura  -Pdev this fails with the message:
Error configuring: org.apache.maven.plugins:maven-war-plugin. Reason: ERROR: Cannot override read-only parameter: classesDirectory in goal: war:manifest
Please note that cobertura is not called through the pom.xml i.e. the pom.xml does not contain any maven-cobertura-plugin. Jenkins does have the cobertura plugin installed. Following the instructions for the 'Jenkins cobertura plugin', it states that no modification is required in the pom.xml and 'mvn clean cobertura:cobertura' should work fine from Jenkins. But this doesn't seem to be the case for me.

Please let me know if you require more information to reproduce the issue?

Thanks.


From: Evgeny Mandrikov <[hidden email]>
Sent: Wed, 18 Jan 2012 21:46:56
To: [hidden email]
Subject: Re: [sonar-user] Code coverage not showing on Sonar dashboard
Hi,

Could you provide minimalistic example of project to reproduce this problem?

On Wed, Jan 18, 2012 at 20:08, kavita mum <[hidden email]> wrote:
Hi,

This issue is in continuation to SONAR-3165.

The Sonar Analysis reports (Jenkins console) show this particular warning:

Cobertura report not found at /var/lib/user/workspace/project/trunk/target/site/cobertura/coverage.xml

Which might be the case as cobertura is not executed as the maven goal. The jobs are executed through Jenkins using maven. The goals executed are:

clean install -Pdev

However, after installing the Jenkins cobertura plugin and executing the following maven goals: clean install cobertura :cobertura  -Pdev , I get the following error and the Build fails.

[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error configuring: org.apache.maven.plugins:maven-war-plugin. Reason: ERROR: Cannot override read-only parameter: classesDirectory in goal: war:manifest

Though the classes directory is not read-only on the system, I am unable to figure out the issue.

Could you please help configure the same so that Sonar is able to read the code coverage statistics and display them on the dashboard ?

The versions used are:
Maven: 2.2.1
Sonar: 2.12
Jenkins: 1.447
Sonar Plugin: 1.7.2
Jenkins Cobertura Plugin: 1.3

Thanks.



Follow Rediff Deal ho jaye! to get exciting offers in your city everyday.



--
Best regards,
Evgeny Mandrikov aka Godin <http://godin.net.ru>
http://twitter.com/_godin_


Follow Rediff Deal ho jaye! to get exciting offers in your city everyday.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Code coverage not showing on Sonar dashboard

Evgeny Mandrikov
This brings some valuable information, but unfortunately can't decrease time to reproduce issue and understand what happens under the hood. That's why I asked about source code of minimalistic project in order to reproduce issue - this way it would be much simpler and quicker.

P.S. I guess that you created http://jira.codehaus.org/browse/SONAR-3186 , however we prefer to not create any tickets in Jira before confirmation of problem by using mailing list.

On Thu, Jan 19, 2012 at 13:51, kavita mum <[hidden email]> wrote:
Hi Evgeny,

Thanks for your response.

Considering our environment, we have our code base in SVN, the pom.xml is written so as to produce a 'war' package. A project is created in Jenkins which checksout this SVN repository and builds the pom.xml file using the command clean install -Pdev

The above command works successfully and the build passes and the war as well as tests are executed.

However, when a slight change is made in the command by adding cobertura - clean install cobertura :cobertura  -Pdev this fails with the message:
Error configuring: org.apache.maven.plugins:maven-war-plugin. Reason: ERROR: Cannot override read-only parameter: classesDirectory in goal: war:manifest
Please note that cobertura is not called through the pom.xml i.e. the pom.xml does not contain any maven-cobertura-plugin. Jenkins does have the cobertura plugin installed. Following the instructions for the 'Jenkins cobertura plugin', it states that no modification is required in the pom.xml and 'mvn clean cobertura:cobertura' should work fine from Jenkins. But this doesn't seem to be the case for me.

Please let me know if you require more information to reproduce the issue?

Thanks.


From: Evgeny Mandrikov <[hidden email]>
Sent: Wed, 18 Jan 2012 21:46:56
To: [hidden email]
Subject: Re: [sonar-user] Code coverage not showing on Sonar dashboard

Hi,

Could you provide minimalistic example of project to reproduce this problem?

On Wed, Jan 18, 2012 at 20:08, kavita mum <[hidden email]> wrote:
Hi,

This issue is in continuation to SONAR-3165.

The Sonar Analysis reports (Jenkins console) show this particular warning:

Cobertura report not found at /var/lib/user/workspace/project/trunk/target/site/cobertura/coverage.xml

Which might be the case as cobertura is not executed as the maven goal. The jobs are executed through Jenkins using maven. The goals executed are:

clean install -Pdev

However, after installing the Jenkins cobertura plugin and executing the following maven goals: clean install cobertura :cobertura  -Pdev , I get the following error and the Build fails.

[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error configuring: org.apache.maven.plugins:maven-war-plugin. Reason: ERROR: Cannot override read-only parameter: classesDirectory in goal: war:manifest

Though the classes directory is not read-only on the system, I am unable to figure out the issue.

Could you please help configure the same so that Sonar is able to read the code coverage statistics and display them on the dashboard ?

The versions used are:
Maven: 2.2.1
Sonar: 2.12
Jenkins: 1.447
Sonar Plugin: 1.7.2
Jenkins Cobertura Plugin: 1.3

Thanks.



Follow Rediff Deal ho jaye! to get exciting offers in your city everyday.



--
Best regards,
Evgeny Mandrikov aka Godin <http://godin.net.ru>
http://twitter.com/_godin_


Follow Rediff Deal ho jaye! to get exciting offers in your city everyday.



--
Best regards,
Evgeny Mandrikov aka Godin <http://godin.net.ru>
http://twitter.com/_godin_
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Code coverage not showing on Sonar dashboard

kavita  mum
In reply to this post by kavita mum
I found a similar problem with war:inplace, which was resolved I guess, thus I created a clone of the same. Also, this happens only with the maven war plugin and not the maven jar plugin. Thus, projects packaging jars and executing cobertura:cobertura work well and generate the cobertura report.

We build a multi-module project and due to the length of the source, I could not provide you with the exact pom :)
If you could create a dummy pom, packaging a war file, it would help.


From: "Evgeny Mandrikov"[hidden email]
Sent: Fri, 20 Jan 2012 02:59:44 +0530
To: [hidden email]
Subject: Re: [sonar-user] Code coverage not showing on Sonar dashboard

This brings some valuable information, but unfortunately can't decrease time to reproduce issue and understand what happens under the hood. That's why I asked about source code of minimalistic project in order to reproduce issue - this way it would be much simpler and quicker.

>
P.S. I guess that you created http://jira.codehaus.org/browse/SONAR-3186 , however we prefer to not create any tickets in Jira before confirmation of problem by using mailing list.
>
>
On Thu, Jan 19, 2012 at 13:51, kavita mum <[hidden email]> wrote:
>
Hi Evgeny,
>
>Thanks for your response.
>
>Considering our environment, we have our code base in SVN, the pom.xml is written so as to produce a 'war' package. A project is created in Jenkins which checksout this SVN repository and builds the pom.xml file using the command clean install -Pdev
>
>The above command works successfully and the build passes and the war as well as tests are executed.
>
>However, when a slight change is made in the command by adding cobertura - clean install cobertura :cobertura  -Pdev this fails with the message:
>
Error configuring: org.apache.maven.plugins:maven-war-plugin. Reason: ERROR: Cannot override read-only parameter: classesDirectory in goal: war:manifest
Please note that cobertura is not called through the pom.xml i.e. the pom.xml does not contain any maven-cobertura-plugin. Jenkins does have the cobertura plugin installed. Following the instructions for the 'Jenkins cobertura plugin', it states that no modification is required in the pom.xml and 'mvn clean cobertura:cobertura' should work fine from Jenkins. But this doesn't seem to be the case for me.
>
>Please let me know if you require more information to reproduce the issue?
>
>Thanks.
>
>
>From: Evgeny Mandrikov <[hidden email]>
>Sent: Wed, 18 Jan 2012 21:46:56
>To: [hidden email]
>Subject: Re: [sonar-user] Code coverage not showing on Sonar dashboard

>Hi,

>
Could you provide minimalistic example of project to reproduce this problem?
>
>
On Wed, Jan 18, 2012 at 20:08, kavita mum <[hidden email]> wrote:
>
Hi,
>
>This issue is in continuation to SONAR-3165.
>
>The Sonar Analysis reports (Jenkins console) show this particular warning:
>
>Cobertura report not found at /var/lib/user/workspace/project/trunk/target/site/cobertura/coverage.xml
>
>Which might be the case as cobertura is not executed as the maven goal. The jobs are executed through Jenkins using maven. The goals executed are:
>
>clean install -Pdev
>
>However, after installing the Jenkins cobertura plugin and executing the following maven goals: clean install cobertura :cobertura  -Pdev , I get the following error and the Build fails.
>
>
[ERROR] BUILD ERROR
>
[INFO] ------------------------------------------------------------------------
>[INFO] Error configuring: org.apache.maven.plugins:maven-war-plugin. Reason: ERROR: Cannot override read-only parameter: classesDirectory in goal: war:manifest
>

>Though the classes directory is not read-only on the system, I am unable to figure out the issue.
>
>Could you please help configure the same so that Sonar is able to read the code coverage statistics and display them on the dashboard ?
>
>The versions used are:
>Maven: 2.2.1
>Sonar: 2.12
>Jenkins: 1.447
>Sonar Plugin: 1.7.2
>Jenkins Cobertura Plugin: 1.3
>
>Thanks.
>
>
>
>
Follow Rediff Deal ho jaye! to get exciting offers in your city everyday.

>

>
--
>Best regards,
>Evgeny Mandrikov aka Godin <http://godin.net.ru>
>http://twitter.com/_godin_
>

>
>
Follow Rediff Deal ho jaye! to get exciting offers in your city everyday.

>

>
--
>Best regards,
>Evgeny Mandrikov aka Godin <http://godin.net.ru>
>http://twitter.com/_godin_
>


Follow Rediff Deal ho jaye! to get exciting offers in your city everyday.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Code coverage not showing on Sonar dashboard

Evgeny Mandrikov
Hi,

As you suggested - I tried to reproduce this issue by myself , but each time unsuccessfully :
  • on simple single module project : war + cobertura + sonar
  • on simple multi module project : jar + war + cobertura + sonar
  • on Sonar codebase, which is multi-module with war
  • I even gave a try for Archiva as stated in Jira ticket, but was unable to build this project and don't want to loose my time on it
So sorry, but until you can't provide minimalistic example to reproduce problem - I can't help you.
Moreover - as you said problem occurs even without Sonar, but in combination of maven-war-plugin and cobertura-maven-plugin , so I close Jira ticket as it doesn't relate to Sonar directly.
In the meantime you can try one of the following options :
Good luck !

On Fri, Jan 20, 2012 at 02:07, kavita mum <[hidden email]> wrote:
I found a similar problem with war:inplace, which was resolved I guess, thus I created a clone of the same. Also, this happens only with the maven war plugin and not the maven jar plugin. Thus, projects packaging jars and executing cobertura:cobertura work well and generate the cobertura report.

We build a multi-module project and due to the length of the source, I could not provide you with the exact pom :)
If you could create a dummy pom, packaging a war file, it would help.


From: "Evgeny Mandrikov"[hidden email]
Sent: Fri, 20 Jan 2012 02:59:44 +0530

To: [hidden email]
Subject: Re: [sonar-user] Code coverage not showing on Sonar dashboard

This brings some valuable information, but unfortunately can't decrease time to reproduce issue and understand what happens under the hood. That's why I asked about source code of minimalistic project in order to reproduce issue - this way it would be much simpler and quicker.

>
P.S. I guess that you created http://jira.codehaus.org/browse/SONAR-3186 , however we prefer to not create any tickets in Jira before confirmation of problem by using mailing list.
>
>
On Thu, Jan 19, 2012 at 13:51, kavita mum <[hidden email]> wrote:
>
Hi Evgeny,
>
>Thanks for your response.
>
>Considering our environment, we have our code base in SVN, the pom.xml is written so as to produce a 'war' package. A project is created in Jenkins which checksout this SVN repository and builds the pom.xml file using the command clean install -Pdev
>
>The above command works successfully and the build passes and the war as well as tests are executed.
>
>However, when a slight change is made in the command by adding cobertura - clean install cobertura :cobertura  -Pdev this fails with the message:
>
Error configuring: org.apache.maven.plugins:maven-war-plugin. Reason: ERROR: Cannot override read-only parameter: classesDirectory in goal: war:manifest
Please note that cobertura is not called through the pom.xml i.e. the pom.xml does not contain any maven-cobertura-plugin. Jenkins does have the cobertura plugin installed. Following the instructions for the 'Jenkins cobertura plugin', it states that no modification is required in the pom.xml and 'mvn clean cobertura:cobertura' should work fine from Jenkins. But this doesn't seem to be the case for me.
>
>Please let me know if you require more information to reproduce the issue?
>
>Thanks.
>
>
>From: Evgeny Mandrikov <[hidden email]>
>Sent: Wed, 18 Jan 2012 21:46:56
>To: [hidden email]
>Subject: Re: [sonar-user] Code coverage not showing on Sonar dashboard

>Hi,

>
Could you provide minimalistic example of project to reproduce this problem?
>
>
On Wed, Jan 18, 2012 at 20:08, kavita mum <[hidden email]> wrote:
>
Hi,
>
>This issue is in continuation to SONAR-3165.
>
>The Sonar Analysis reports (Jenkins console) show this particular warning:
>
>Cobertura report not found at /var/lib/user/workspace/project/trunk/target/site/cobertura/coverage.xml
>
>Which might be the case as cobertura is not executed as the maven goal. The jobs are executed through Jenkins using maven. The goals executed are:
>
>clean install -Pdev
>
>However, after installing the Jenkins cobertura plugin and executing the following maven goals: clean install cobertura :cobertura  -Pdev , I get the following error and the Build fails.
>
>
[ERROR] BUILD ERROR
>
[INFO] ------------------------------------------------------------------------
>[INFO] Error configuring: org.apache.maven.plugins:maven-war-plugin. Reason: ERROR: Cannot override read-only parameter: classesDirectory in goal: war:manifest
>

>Though the classes directory is not read-only on the system, I am unable to figure out the issue.
>
>Could you please help configure the same so that Sonar is able to read the code coverage statistics and display them on the dashboard ?
>
>The versions used are:
>Maven: 2.2.1
>Sonar: 2.12
>Jenkins: 1.447
>Sonar Plugin: 1.7.2
>Jenkins Cobertura Plugin: 1.3
>
>Thanks.
>
>
>
>
Follow Rediff Deal ho jaye! to get exciting offers in your city everyday.

>

>
--
>Best regards,
>Evgeny Mandrikov aka Godin <http://godin.net.ru>
>http://twitter.com/_godin_
>

>
>
Follow Rediff Deal ho jaye! to get exciting offers in your city everyday.

>

>
--
>Best regards,
>Evgeny Mandrikov aka Godin <http://godin.net.ru>
>http://twitter.com/_godin_
>


Follow Rediff Deal ho jaye! to get exciting offers in your city everyday.



--
Best regards,
Evgeny Mandrikov aka Godin <http://godin.net.ru>
http://twitter.com/_godin_
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Code coverage not showing on Sonar dashboard

kavita  mum
In reply to this post by kavita mum
Thank you!
Appreciate your efforts and inputs.
I shall try using the Jacoco plugin.



From: Evgeny Mandrikov <[hidden email]>
Sent: Fri, 20 Jan 2012 20:29:24
To: [hidden email]
Subject: Re: [sonar-user] Code coverage not showing on Sonar dashboard
Hi,

As you suggested - I tried to reproduce this issue by myself , but each time unsuccessfully :
  • on simple single module project : war + cobertura + sonar
  • on simple multi module project : jar + war + cobertura + sonar
  • on Sonar codebase, which is multi-module with war
  • I even gave a try for Archiva as stated in Jira ticket, but was unable to build this project and don't want to loose my time on it
So sorry, but until you can't provide minimalistic example to reproduce problem - I can't help you.
Moreover - as you said problem occurs even without Sonar, but in combination of maven-war-plugin and cobertura-maven-plugin , so I close Jira ticket as it doesn't relate to Sonar directly.
In the meantime you can try one of the following options :
Good luck !

On Fri, Jan 20, 2012 at 02:07, kavita mum <[hidden email]> wrote:
I found a similar problem with war:inplace, which was resolved I guess, thus I created a clone of the same. Also, this happens only with the maven war plugin and not the maven jar plugin. Thus, projects packaging jars and executing cobertura:cobertura work well and generate the cobertura report.

We build a multi-module project and due to the length of the source, I could not provide you with the exact pom :)
If you could create a dummy pom, packaging a war file, it would help.


From: "Evgeny Mandrikov"[hidden email]
Sent: Fri, 20 Jan 2012 02:59:44 +0530

To: [hidden email]
Subject: Re: [sonar-user] Code coverage not showing on Sonar dashboard

This brings some valuable information, but unfortunately can't decrease time to reproduce issue and understand what happens under the hood. That's why I asked about source code of minimalistic project in order to reproduce issue - this way it would be much simpler and quicker.

>
P.S. I guess that you created http://jira.codehaus.org/browse/SONAR-3186 , however we prefer to not create any tickets in Jira before confirmation of problem by using mailing list.
>
>
On Thu, Jan 19, 2012 at 13:51, kavita mum <[hidden email]> wrote:
>
Hi Evgeny,
>
>Thanks for your response.
>
>Considering our environment, we have our code base in SVN, the pom.xml is written so as to produce a 'war' package. A project is created in Jenkins which checksout this SVN repository and builds the pom.xml file using the command clean install -Pdev
>
>The above command works successfully and the build passes and the war as well as tests are executed.
>
>However, when a slight change is made in the command by adding cobertura - clean install cobertura :cobertura  -Pdev this fails with the message:
>
Error configuring: org.apache.maven.plugins:maven-war-plugin. Reason: ERROR: Cannot override read-only parameter: classesDirectory in goal: war:manifest
Please note that cobertura is not called through the pom.xml i.e. the pom.xml does not contain any maven-cobertura-plugin. Jenkins does have the cobertura plugin installed. Following the instructions for the 'Jenkins cobertura plugin', it states that no modification is required in the pom.xml and 'mvn clean cobertura:cobertura' should work fine from Jenkins. But this doesn't seem to be the case for me.
>
>Please let me know if you require more information to reproduce the issue?
>
>Thanks.
>
>
>From: Evgeny Mandrikov <[hidden email]>
>Sent: Wed, 18 Jan 2012 21:46:56
>To: [hidden email]
>Subject: Re: [sonar-user] Code coverage not showing on Sonar dashboard

>Hi,

>
Could you provide minimalistic example of project to reproduce this problem?
>
>
On Wed, Jan 18, 2012 at 20:08, kavita mum <[hidden email]> wrote:
>
Hi,
>
>This issue is in continuation to SONAR-3165.
>
>The Sonar Analysis reports (Jenkins console) show this particular warning:
>
>Cobertura report not found at /var/lib/user/workspace/project/trunk/target/site/cobertura/coverage.xml
>
>Which might be the case as cobertura is not executed as the maven goal. The jobs are executed through Jenkins using maven. The goals executed are:
>
>clean install -Pdev
>
>However, after installing the Jenkins cobertura plugin and executing the following maven goals: clean install cobertura :cobertura  -Pdev , I get the following error and the Build fails.
>
>
[ERROR] BUILD ERROR
>
[INFO] ------------------------------------------------------------------------
>[INFO] Error configuring: org.apache.maven.plugins:maven-war-plugin. Reason: ERROR: Cannot override read-only parameter: classesDirectory in goal: war:manifest
>

>Though the classes directory is not read-only on the system, I am unable to figure out the issue.
>
>Could you please help configure the same so that Sonar is able to read the code coverage statistics and display them on the dashboard ?
>
>The versions used are:
>Maven: 2.2.1
>Sonar: 2.12
>Jenkins: 1.447
>Sonar Plugin: 1.7.2
>Jenkins Cobertura Plugin: 1.3
>
>Thanks.
>
>
>
>
Follow Rediff Deal ho jaye! to get exciting offers in your city everyday.

>

>
--
>Best regards,
>Evgeny Mandrikov aka Godin <http://godin.net.ru>
>http://twitter.com/_godin_
>

>
>
Follow Rediff Deal ho jaye! to get exciting offers in your city everyday.

>

>
--
>Best regards,
>Evgeny Mandrikov aka Godin <http://godin.net.ru>
>http://twitter.com/_godin_
>


Follow Rediff Deal ho jaye! to get exciting offers in your city everyday.



--
Best regards,
Evgeny Mandrikov aka Godin <http://godin.net.ru>
http://twitter.com/_godin_


Follow Rediff Deal ho jaye! to get exciting offers in your city everyday.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Code coverage not showing on Sonar dashboard

kavita  mum
In reply to this post by kavita mum
I tried using the Jacoco plugin too. It gave the same error. Any code coverage plugins that I use with Maven, all seem to give the same error.



From: Evgeny Mandrikov <[hidden email]>
Sent: Fri, 20 Jan 2012 20:29:24
To: [hidden email]
Subject: Re: [sonar-user] Code coverage not showing on Sonar dashboard
Hi,

As you suggested - I tried to reproduce this issue by myself , but each time unsuccessfully :
  • on simple single module project : war + cobertura + sonar
  • on simple multi module project : jar + war + cobertura + sonar
  • on Sonar codebase, which is multi-module with war
  • I even gave a try for Archiva as stated in Jira ticket, but was unable to build this project and don't want to loose my time on it
So sorry, but until you can't provide minimalistic example to reproduce problem - I can't help you.
Moreover - as you said problem occurs even without Sonar, but in combination of maven-war-plugin and cobertura-maven-plugin , so I close Jira ticket as it doesn't relate to Sonar directly.
In the meantime you can try one of the following options :
Good luck !

On Fri, Jan 20, 2012 at 02:07, kavita mum <[hidden email]> wrote:
I found a similar problem with war:inplace, which was resolved I guess, thus I created a clone of the same. Also, this happens only with the maven war plugin and not the maven jar plugin. Thus, projects packaging jars and executing cobertura:cobertura work well and generate the cobertura report.

We build a multi-module project and due to the length of the source, I could not provide you with the exact pom :)
If you could create a dummy pom, packaging a war file, it would help.


From: "Evgeny Mandrikov"[hidden email]
Sent: Fri, 20 Jan 2012 02:59:44 +0530

To: [hidden email]
Subject: Re: [sonar-user] Code coverage not showing on Sonar dashboard

This brings some valuable information, but unfortunately can't decrease time to reproduce issue and understand what happens under the hood. That's why I asked about source code of minimalistic project in order to reproduce issue - this way it would be much simpler and quicker.

>
P.S. I guess that you created http://jira.codehaus.org/browse/SONAR-3186 , however we prefer to not create any tickets in Jira before confirmation of problem by using mailing list.
>
>
On Thu, Jan 19, 2012 at 13:51, kavita mum <[hidden email]> wrote:
>
Hi Evgeny,
>
>Thanks for your response.
>
>Considering our environment, we have our code base in SVN, the pom.xml is written so as to produce a 'war' package. A project is created in Jenkins which checksout this SVN repository and builds the pom.xml file using the command clean install -Pdev
>
>The above command works successfully and the build passes and the war as well as tests are executed.
>
>However, when a slight change is made in the command by adding cobertura - clean install cobertura :cobertura  -Pdev this fails with the message:
>
Error configuring: org.apache.maven.plugins:maven-war-plugin. Reason: ERROR: Cannot override read-only parameter: classesDirectory in goal: war:manifest
Please note that cobertura is not called through the pom.xml i.e. the pom.xml does not contain any maven-cobertura-plugin. Jenkins does have the cobertura plugin installed. Following the instructions for the 'Jenkins cobertura plugin', it states that no modification is required in the pom.xml and 'mvn clean cobertura:cobertura' should work fine from Jenkins. But this doesn't seem to be the case for me.
>
>Please let me know if you require more information to reproduce the issue?
>
>Thanks.
>
>
>From: Evgeny Mandrikov <[hidden email]>
>Sent: Wed, 18 Jan 2012 21:46:56
>To: [hidden email]
>Subject: Re: [sonar-user] Code coverage not showing on Sonar dashboard

>Hi,

>
Could you provide minimalistic example of project to reproduce this problem?
>
>
On Wed, Jan 18, 2012 at 20:08, kavita mum <[hidden email]> wrote:
>
Hi,
>
>This issue is in continuation to SONAR-3165.
>
>The Sonar Analysis reports (Jenkins console) show this particular warning:
>
>Cobertura report not found at /var/lib/user/workspace/project/trunk/target/site/cobertura/coverage.xml
>
>Which might be the case as cobertura is not executed as the maven goal. The jobs are executed through Jenkins using maven. The goals executed are:
>
>clean install -Pdev
>
>However, after installing the Jenkins cobertura plugin and executing the following maven goals: clean install cobertura :cobertura  -Pdev , I get the following error and the Build fails.
>
>
[ERROR] BUILD ERROR
>
[INFO] ------------------------------------------------------------------------
>[INFO] Error configuring: org.apache.maven.plugins:maven-war-plugin. Reason: ERROR: Cannot override read-only parameter: classesDirectory in goal: war:manifest
>

>Though the classes directory is not read-only on the system, I am unable to figure out the issue.
>
>Could you please help configure the same so that Sonar is able to read the code coverage statistics and display them on the dashboard ?
>
>The versions used are:
>Maven: 2.2.1
>Sonar: 2.12
>Jenkins: 1.447
>Sonar Plugin: 1.7.2
>Jenkins Cobertura Plugin: 1.3
>
>Thanks.
>
>
>
>
Follow Rediff Deal ho jaye! to get exciting offers in your city everyday.

>

>
--
>Best regards,
>Evgeny Mandrikov aka Godin <http://godin.net.ru>
>http://twitter.com/_godin_
>

>
>
Follow Rediff Deal ho jaye! to get exciting offers in your city everyday.

>

>
--
>Best regards,
>Evgeny Mandrikov aka Godin <http://godin.net.ru>
>http://twitter.com/_godin_
>


Follow Rediff Deal ho jaye! to get exciting offers in your city everyday.



--
Best regards,
Evgeny Mandrikov aka Godin <http://godin.net.ru>
http://twitter.com/_godin_


Follow Rediff Deal ho jaye! to get exciting offers in your city everyday.


Follow Rediff Deal ho jaye! to get exciting offers in your city everyday.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Code coverage not showing on Sonar dashboard

Evgeny Mandrikov
Let me repeat again : until we can't reproduce this, we can't help you. Could you please spend some of your time to provide pom.xml ( extract from your project ) which can demonstrate problem ?

On Mon, Jan 23, 2012 at 18:27, kavita mum <[hidden email]> wrote:
I tried using the Jacoco plugin too. It gave the same error. Any code coverage plugins that I use with Maven, all seem to give the same error.




From: Evgeny Mandrikov <[hidden email]>
Sent: Fri, 20 Jan 2012 20:29:24
To: [hidden email]
Subject: Re: [sonar-user] Code coverage not showing on Sonar dashboard
Hi,

As you suggested - I tried to reproduce this issue by myself , but each time unsuccessfully :
  • on simple single module project : war + cobertura + sonar
  • on simple multi module project : jar + war + cobertura + sonar
  • on Sonar codebase, which is multi-module with war
  • I even gave a try for Archiva as stated in Jira ticket, but was unable to build this project and don't want to loose my time on it
So sorry, but until you can't provide minimalistic example to reproduce problem - I can't help you.
Moreover - as you said problem occurs even without Sonar, but in combination of maven-war-plugin and cobertura-maven-plugin , so I close Jira ticket as it doesn't relate to Sonar directly.
In the meantime you can try one of the following options :
Good luck !

On Fri, Jan 20, 2012 at 02:07, kavita mum <[hidden email]> wrote:
I found a similar problem with war:inplace, which was resolved I guess, thus I created a clone of the same. Also, this happens only with the maven war plugin and not the maven jar plugin. Thus, projects packaging jars and executing cobertura:cobertura work well and generate the cobertura report.

We build a multi-module project and due to the length of the source, I could not provide you with the exact pom :)
If you could create a dummy pom, packaging a war file, it would help.


From: "Evgeny Mandrikov"[hidden email]
Sent: Fri, 20 Jan 2012 02:59:44 +0530

To: [hidden email]
Subject: Re: [sonar-user] Code coverage not showing on Sonar dashboard

This brings some valuable information, but unfortunately can't decrease time to reproduce issue and understand what happens under the hood. That's why I asked about source code of minimalistic project in order to reproduce issue - this way it would be much simpler and quicker.

>
P.S. I guess that you created http://jira.codehaus.org/browse/SONAR-3186 , however we prefer to not create any tickets in Jira before confirmation of problem by using mailing list.
>
>
On Thu, Jan 19, 2012 at 13:51, kavita mum <[hidden email]> wrote:
>
Hi Evgeny,
>
>Thanks for your response.
>
>Considering our environment, we have our code base in SVN, the pom.xml is written so as to produce a 'war' package. A project is created in Jenkins which checksout this SVN repository and builds the pom.xml file using the command clean install -Pdev
>
>The above command works successfully and the build passes and the war as well as tests are executed.
>
>However, when a slight change is made in the command by adding cobertura - clean install cobertura :cobertura  -Pdev this fails with the message:
>
Error configuring: org.apache.maven.plugins:maven-war-plugin. Reason: ERROR: Cannot override read-only parameter: classesDirectory in goal: war:manifest
Please note that cobertura is not called through the pom.xml i.e. the pom.xml does not contain any maven-cobertura-plugin. Jenkins does have the cobertura plugin installed. Following the instructions for the 'Jenkins cobertura plugin', it states that no modification is required in the pom.xml and 'mvn clean cobertura:cobertura' should work fine from Jenkins. But this doesn't seem to be the case for me.
>
>Please let me know if you require more information to reproduce the issue?
>
>Thanks.
>
>
>From: Evgeny Mandrikov <[hidden email]>
>Sent: Wed, 18 Jan 2012 21:46:56
>To: [hidden email]
>Subject: Re: [sonar-user] Code coverage not showing on Sonar dashboard

>Hi,

>
Could you provide minimalistic example of project to reproduce this problem?
>
>
On Wed, Jan 18, 2012 at 20:08, kavita mum <[hidden email]> wrote:
>
Hi,
>
>This issue is in continuation to SONAR-3165.
>
>The Sonar Analysis reports (Jenkins console) show this particular warning:
>
>Cobertura report not found at /var/lib/user/workspace/project/trunk/target/site/cobertura/coverage.xml
>
>Which might be the case as cobertura is not executed as the maven goal. The jobs are executed through Jenkins using maven. The goals executed are:
>
>clean install -Pdev
>
>However, after installing the Jenkins cobertura plugin and executing the following maven goals: clean install cobertura :cobertura  -Pdev , I get the following error and the Build fails.
>
>
[ERROR] BUILD ERROR
>
[INFO] ------------------------------------------------------------------------
>[INFO] Error configuring: org.apache.maven.plugins:maven-war-plugin. Reason: ERROR: Cannot override read-only parameter: classesDirectory in goal: war:manifest
>

>Though the classes directory is not read-only on the system, I am unable to figure out the issue.
>
>Could you please help configure the same so that Sonar is able to read the code coverage statistics and display them on the dashboard ?
>
>The versions used are:
>Maven: 2.2.1
>Sonar: 2.12
>Jenkins: 1.447
>Sonar Plugin: 1.7.2
>Jenkins Cobertura Plugin: 1.3
>
>Thanks.
>
>
>
>
Follow Rediff Deal ho jaye! to get exciting offers in your city everyday.

>

>
--
>Best regards,
>Evgeny Mandrikov aka Godin <http://godin.net.ru>
>http://twitter.com/_godin_
>

>
>
Follow Rediff Deal ho jaye! to get exciting offers in your city everyday.

>

>
--
>Best regards,
>Evgeny Mandrikov aka Godin <http://godin.net.ru>
>http://twitter.com/_godin_
>


Follow Rediff Deal ho jaye! to get exciting offers in your city everyday.



--
Best regards,
Evgeny Mandrikov aka Godin <http://godin.net.ru>
http://twitter.com/_godin_


Follow Rediff Deal ho jaye! to get exciting offers in your city everyday.


Follow Rediff Deal ho jaye! to get exciting offers in your city everyday.



--
Best regards,
Evgeny Mandrikov aka Godin <http://godin.net.ru>
http://twitter.com/_godin_
Loading...