jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • Maven 2.x Cobertura Plugin
  • MCOBERTURA-63

empty index.html when site is staged.

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 2.0, 2.1, 2.2
  • Fix Version/s: 2.2
  • Labels:
    None
  • Environment:
    winXP, linux
    maven 2.0.4,2.0.5

Description

When cobertura report is used together with "site:stage", the report only contains an empty index.html file.
I tried it with all versions of covertura-maven-plugin I could get including the latest from trunk.
For more details please consider MSITE-138 (includes test-project to prove the bug).

I expected this to be the same as MSITE-120 which also was the fix for MJXR-20.
Anyhow I saw in the latest version from trunk, that you use this:

/**

  • The output directory for the report.
    *
  • @parameter default-value="${project.reporting.outputDirectory}/cobertura"
    * @required
    */
    private File outputDirectory;

    Anyhow the stuff does NOT go to ${project.reporting.outputDirectory} but to ${project.build.directory}.
    I compared your work with the latest JXR where the analog problem has been fixed and the only difference I found was that they use maven-reporting-impl:2.0.2 instead of 2.0 which is used by cobertura.
    So I hacked your pom and saw that I had to fix various parts in the code so the stuff still compiles. Then I discovered that a testcase failed. After I fixed all this I discovered that my work was in vain - the problem is still there!

For me this looks like a bug in the maven internals (plugin-plugin, or so) that is NOT properly injection the outputDirectory. I still have no clue what is different to javadoc and jxr here...

Good luck

  • Options
    • Sort By Name
    • Sort By Date
    • Ascending
    • Descending
    • Download All

Attachments

  1. Text File
    MCOBERTURA-63.patch
    16/Feb/07 5:32 AM
    1 kB
    Vincent Siveton

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Vincent Siveton added a comment - 16/Feb/07 5:32 AM

Added setReportOutputDirectory() to be able to run in the stage goal.

Show
Vincent Siveton added a comment - 16/Feb/07 5:32 AM Added setReportOutputDirectory() to be able to run in the stage goal.
Hide
Permalink
Jörg Hohwiller added a comment - 04/Apr/07 3:31 AM

The Patch was submitted almost two month ago. It works fine and fixes the problem. Thanks to Vincent!
Could you apply it to HEAD?

Show
Jörg Hohwiller added a comment - 04/Apr/07 3:31 AM The Patch was submitted almost two month ago. It works fine and fixes the problem. Thanks to Vincent! Could you apply it to HEAD?
Hide
Permalink
Jörg Hohwiller added a comment - 02/Jun/07 6:32 AM

Is this plugin dead?
Should I apply the patch for you?

Show
Jörg Hohwiller added a comment - 02/Jun/07 6:32 AM Is this plugin dead? Should I apply the patch for you?
Hide
Permalink
Dennis Lundberg added a comment - 23/Jul/07 9:15 AM

I have reworked the site to follow the plugin documentation guidelines. The site now includes an index.apt file, so this issue is no longer relevant.

Show
Dennis Lundberg added a comment - 23/Jul/07 9:15 AM I have reworked the site to follow the plugin documentation guidelines. The site now includes an index.apt file, so this issue is no longer relevant.
Hide
Permalink
Jörg Hohwiller added a comment - 23/Jul/07 9:29 AM

Are we talking about the same toppic?
I am not talking about the index.html of your plugin documentation and do not talk about any *.apt files.
What I was talking about is that the complete report produced by the cobertura plugin was going to the wrong directory if the plugin was used together with site:stage. The patch fixed this issue. Is this fixed in the latest version? I have not tested it because the latest version does NOT work at all for me because it reports 100% coverage in any case.

Show
Jörg Hohwiller added a comment - 23/Jul/07 9:29 AM Are we talking about the same toppic? I am not talking about the index.html of your plugin documentation and do not talk about any *.apt files. What I was talking about is that the complete report produced by the cobertura plugin was going to the wrong directory if the plugin was used together with site:stage. The patch fixed this issue. Is this fixed in the latest version? I have not tested it because the latest version does NOT work at all for me because it reports 100% coverage in any case.
Hide
Permalink
Dennis Lundberg added a comment - 23/Jul/07 9:33 AM

My bad. I misread the issue.

Show
Dennis Lundberg added a comment - 23/Jul/07 9:33 AM My bad. I misread the issue.
Hide
Permalink
Dennis Lundberg added a comment - 23/Jul/07 10:52 AM

I've tried this patch and it indeed seems to solve the issue.
I have one question about the patch though. Why is this part needed:

!reportOutputDirectory.getAbsolutePath().endsWith( "cobertura" )
Show
Dennis Lundberg added a comment - 23/Jul/07 10:52 AM I've tried this patch and it indeed seems to solve the issue. I have one question about the patch though. Why is this part needed:
!reportOutputDirectory.getAbsolutePath().endsWith( "cobertura" )
Hide
Permalink
Dennis Lundberg added a comment - 17/Aug/07 6:33 PM

Jörg, do you have an answer for the question in my last comment?

Show
Dennis Lundberg added a comment - 17/Aug/07 6:33 PM Jörg, do you have an answer for the question in my last comment?
Hide
Permalink
Jörg Hohwiller added a comment - 20/Aug/07 1:50 AM

I do not know. I guess that it has nothing to do with this issue itself.
The patch was supplied by Vincent Siveton, maybe he can help.

Show
Jörg Hohwiller added a comment - 20/Aug/07 1:50 AM I do not know. I guess that it has nothing to do with this issue itself. The patch was supplied by Vincent Siveton, maybe he can help.
Hide
Permalink
Dennis Lundberg added a comment - 20/Aug/07 2:13 PM

Sorry Jörg, I thought the patch was yours...

Show
Dennis Lundberg added a comment - 20/Aug/07 2:13 PM Sorry Jörg, I thought the patch was yours...
Hide
Permalink
Ryan Lea added a comment - 26/Aug/07 7:49 PM

Hi guys,

Just wondering when this is likely to be included in the release?

Sounds like the patch does work, not sure what's holding things up.

This partuicular issue would make a great difference to the development environment I'm working in, especially when we're really trying to push the benefits of testing.

Cheers

Ryan

Show
Ryan Lea added a comment - 26/Aug/07 7:49 PM Hi guys, Just wondering when this is likely to be included in the release? Sounds like the patch does work, not sure what's holding things up. This partuicular issue would make a great difference to the development environment I'm working in, especially when we're really trying to push the benefits of testing. Cheers Ryan
Hide
Permalink
Vincent Siveton added a comment - 28/Aug/07 5:40 AM

(Late but mainly for Dennis)

I don't really remember why I putted this condition, I guess that it was just a copy/paste from other plugins: since CoberturaReportMojo doesn't extend a Mojo, this condition doesn't seem really useful.

Show
Vincent Siveton added a comment - 28/Aug/07 5:40 AM (Late but mainly for Dennis) I don't really remember why I putted this condition, I guess that it was just a copy/paste from other plugins: since CoberturaReportMojo doesn't extend a Mojo, this condition doesn't seem really useful.
Hide
Permalink
Dennis Lundberg added a comment - 28/Aug/07 12:00 PM

Patch applied, thank you.

Show
Dennis Lundberg added a comment - 28/Aug/07 12:00 PM Patch applied, thank you.
Hide
Permalink
Tim Foster added a comment - 19/Sep/07 2:08 PM

I upgraded to the 2.2-SNAPSHOT version of the maven-cobertura-plugin as well as 1.9 of Cobertura but am still experiencing this problem. Any suggestions?

Show
Tim Foster added a comment - 19/Sep/07 2:08 PM I upgraded to the 2.2-SNAPSHOT version of the maven-cobertura-plugin as well as 1.9 of Cobertura but am still experiencing this problem. Any suggestions?
Hide
Permalink
Dennis Lundberg added a comment - 19/Sep/07 3:17 PM

The latest snapshot was published before this patch was applied.

Show
Dennis Lundberg added a comment - 19/Sep/07 3:17 PM The latest snapshot was published before this patch was applied.
Hide
Permalink
Tim Foster added a comment - 20/Sep/07 9:18 AM

I downloaded the latest (i.e., 2.2-SNAPSHOT) sources and attempted to apply the patch. Got the following error:

(Stripping trailing CRs from patch.)
patching file src/main/java/org/codehaus/mojo/cobertura/CoberturaReportMojo.java
Hunk #1 FAILED at 236.
Hunk #2 succeeded at 256 (offset -19 lines).
1 out of 2 hunks FAILED – saving rejects to file src/main/java/org/codehaus/mojo/cobertura/CoberturaReportMojo.java.rej

Is there a particular version to which this patch applies, or should it work with the latest?

Show
Tim Foster added a comment - 20/Sep/07 9:18 AM I downloaded the latest (i.e., 2.2-SNAPSHOT) sources and attempted to apply the patch. Got the following error: (Stripping trailing CRs from patch.) patching file src/main/java/org/codehaus/mojo/cobertura/CoberturaReportMojo.java Hunk #1 FAILED at 236. Hunk #2 succeeded at 256 (offset -19 lines). 1 out of 2 hunks FAILED – saving rejects to file src/main/java/org/codehaus/mojo/cobertura/CoberturaReportMojo.java.rej Is there a particular version to which this patch applies, or should it work with the latest?
Hide
Permalink
Jörg Hohwiller added a comment - 20/Sep/07 9:33 AM

The patch was already applied to the trunk as you can read in the comments above. The previous problem was that this was after the latest SNAPSHOT was build. So you do not need to apply the patch.

Show
Jörg Hohwiller added a comment - 20/Sep/07 9:33 AM The patch was already applied to the trunk as you can read in the comments above. The previous problem was that this was after the latest SNAPSHOT was build. So you do not need to apply the patch.
Hide
Permalink
Jörg Hohwiller added a comment - 12/Nov/07 3:13 PM

I just got an update to the latest plugins and the problem came back again.
I now have 2.2-20070724.184523-2

Show
Jörg Hohwiller added a comment - 12/Nov/07 3:13 PM I just got an update to the latest plugins and the problem came back again. I now have 2.2-20070724.184523-2
Hide
Permalink
Jörg Hohwiller added a comment - 12/Nov/07 3:18 PM

jep, that version of cobertura-maven-plugin has the same bug that was already fixed before.
The generated output goes to target/site/cobertura/* while in the stagingDirectory specified with site:stage only an empty index.html is created.
I am struggeling with this bug in at least 3 different maven-plugins for over 1,5 years now. Please fix this again! Thanks!

Show
Jörg Hohwiller added a comment - 12/Nov/07 3:18 PM jep, that version of cobertura-maven-plugin has the same bug that was already fixed before. The generated output goes to target/site/cobertura/* while in the stagingDirectory specified with site:stage only an empty index.html is created. I am struggeling with this bug in at least 3 different maven-plugins for over 1,5 years now. Please fix this again! Thanks!
Hide
Permalink
Dennis Lundberg added a comment - 12/Nov/07 3:37 PM

As I mentioned in an earlier comment:
The latest snapshot was published before the patch was applied.

I would deploy a new SNAPSHOT myself, but I'm suffering from test failures. You'll need to build your own SNAPSHOT until a new SNAPSHOT has been deployed.

Show
Dennis Lundberg added a comment - 12/Nov/07 3:37 PM As I mentioned in an earlier comment: The latest snapshot was published before the patch was applied. I would deploy a new SNAPSHOT myself, but I'm suffering from test failures. You'll need to build your own SNAPSHOT until a new SNAPSHOT has been deployed.
Hide
Permalink
MTStorm added a comment - 28/Sep/09 3:16 PM

Please reopen, I use 2.2 and 2.3 and the problem still remains...
My settings are
Apache Maven 2.2.1 (r801777; 2009-08-06 21:16:01+0200)
Java version: 1.6.0_06
Java home: D:\java\jdk1.6.0_06\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 2003" version: "5.2" arch: "amd64" Family: "windows" (XP 64)

Show
MTStorm added a comment - 28/Sep/09 3:16 PM Please reopen, I use 2.2 and 2.3 and the problem still remains... My settings are Apache Maven 2.2.1 (r801777; 2009-08-06 21:16:01+0200) Java version: 1.6.0_06 Java home: D:\java\jdk1.6.0_06\jre Default locale: en_US, platform encoding: Cp1252 OS name: "windows 2003" version: "5.2" arch: "amd64" Family: "windows" (XP 64)
Hide
Permalink
Dennis Lundberg added a comment - 29/Sep/09 12:18 PM

MTStrom, please open a new issue with a test project that highlights the issues you have.

Show
Dennis Lundberg added a comment - 29/Sep/09 12:18 PM MTStrom, please open a new issue with a test project that highlights the issues you have.
Hide
Permalink
MTStorm added a comment - 05/May/10 10:45 AM

Ok bit late will open a new isueue. I have test it also with 2.4 and yet the problem remains. Will open a new one.

Show
MTStorm added a comment - 05/May/10 10:45 AM Ok bit late will open a new isueue. I have test it also with 2.4 and yet the problem remains. Will open a new one.

People

  • Assignee:
    Dennis Lundberg
    Reporter:
    Jörg Hohwiller
Vote (4)
Watch (4)

Dates

  • Created:
    15/Feb/07 5:25 PM
    Updated:
    05/May/10 10:45 AM
    Resolved:
    28/Aug/07 12:00 PM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.