Maven Surefire
  1. Maven Surefire
  2. SUREFIRE-616

surefire-report doesn't create target/site/css

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
      None
    • Environment:
      Maven 2.2.1, Java 1.6.0_17, OS/X 10.6.3

      Description

      I've just try " mvn surefire-report:report-only" and I get what said in the subject. It creates site surefire-report.html, but not the css/*.css files that are imported by such html. The result is quite ugly to see.

        Issue Links

          Activity

          Hide
          Frederic Daoud added a comment -

          Having the same issue with org.apache.maven.plugins, maven-surefire-plugin, version 2.5 and org.testng, testng, version 5.12.1.

          Show
          Frederic Daoud added a comment - Having the same issue with org.apache.maven.plugins, maven-surefire-plugin, version 2.5 and org.testng, testng, version 5.12.1.
          Hide
          Oleg Mikheev added a comment -

          maven 2.2.1, maven-surefire-report-plugin 2.6 - same issue

          Show
          Oleg Mikheev added a comment - maven 2.2.1, maven-surefire-report-plugin 2.6 - same issue
          Hide
          Borja Santos added a comment -

          Same issue here

          Apache Maven 2.2.1 (r801777; 2009-08-06 21:16:01+0200)
          Java version: 1.6.0_14
          maven-surefire-plugin, version 2.6

          Show
          Borja Santos added a comment - Same issue here Apache Maven 2.2.1 (r801777; 2009-08-06 21:16:01+0200) Java version: 1.6.0_14 maven-surefire-plugin, version 2.6
          Hide
          Borja Santos added a comment -

          I think I found a temporary workaround...

          If you generate the whole site with 'mvn site' once, css and all that stuff will be generated. Then, when refreshing reports through surefire-report, it will find all the files it needs (unless you do a 'mvn clean', of course).

          Hope it helps.

          Show
          Borja Santos added a comment - I think I found a temporary workaround... If you generate the whole site with 'mvn site' once, css and all that stuff will be generated. Then, when refreshing reports through surefire-report, it will find all the files it needs (unless you do a 'mvn clean', of course). Hope it helps.
          Hide
          Ravi Shriram Mundhe added a comment -

          try this
          add version "2.4.2" for "org.apache.maven.plugins"

          Show
          Ravi Shriram Mundhe added a comment - try this add version "2.4.2" for "org.apache.maven.plugins"
          Hide
          Flemming Jønsson added a comment -

          @Borja - I can confirm that after running mvn site the "mvn surefire-report:report-only" - will generate a report where styling is working.

          After running mvn site I get $HOME/.maven/cache/maven-xdoc-plugin-1.8 which has this folder '/plugin-resources/css/' which in turn contains maven-base.css and maven-theme.css - after that the styling works for my junit html reports generated by maven-surefire-report-plugin version 2.9. If I delete the .maven folder I will have to do mvn site again before the html junit surefire-report styling works.

          I had the same problem with 2.4.2 - it did not work for me before I had run 'mvn site'

          I have tried looking for dependency groupId/artifactId for maven-xdoc-plugin, but I cannot seem to find it so I can depend on it. Anyone know what to write to get this working without having to run mvn site?

          Show
          Flemming Jønsson added a comment - @Borja - I can confirm that after running mvn site the "mvn surefire-report:report-only" - will generate a report where styling is working. After running mvn site I get $HOME/.maven/cache/maven-xdoc-plugin-1.8 which has this folder '/plugin-resources/css/' which in turn contains maven-base.css and maven-theme.css - after that the styling works for my junit html reports generated by maven-surefire-report-plugin version 2.9. If I delete the .maven folder I will have to do mvn site again before the html junit surefire-report styling works. I had the same problem with 2.4.2 - it did not work for me before I had run 'mvn site' I have tried looking for dependency groupId/artifactId for maven-xdoc-plugin, but I cannot seem to find it so I can depend on it. Anyone know what to write to get this working without having to run mvn site?
          Hide
          Tyler Patterson added a comment -

          Just voted for this issue, I'm hitting the same problem.

          My environment:

          • Window 7, x64
          • Maven 2.2.1
          • Java 1.6.0_24

          Associated plugins and versions:

          • Surefire Plugin 2.11
          • Surefire Report Plugin 2.11
          • Site Plugin 3.0

          According to the latest Surefire Report usage doc ( http://maven.apache.org/plugins/maven-surefire-report-plugin/usage.html ), the standalone goal is now surefire-report:report but that fails to create the necessary css and images.

          Would be really nice if users could avoid running site and just generate the surefire html report directly (without broken images and css).

          Show
          Tyler Patterson added a comment - Just voted for this issue, I'm hitting the same problem. My environment: Window 7, x64 Maven 2.2.1 Java 1.6.0_24 Associated plugins and versions: Surefire Plugin 2.11 Surefire Report Plugin 2.11 Site Plugin 3.0 According to the latest Surefire Report usage doc ( http://maven.apache.org/plugins/maven-surefire-report-plugin/usage.html ), the standalone goal is now surefire-report:report but that fails to create the necessary css and images. Would be really nice if users could avoid running site and just generate the surefire html report directly (without broken images and css).
          Hide
          Marcel Stör added a comment -

          It doesn't look like the project team considers that many people want an HTML report without creating a Maven site. It's been 4 years since this was first reported

          So, as so often...Ant to the rescue: http://stackoverflow.com/a/2847475/131929

          Show
          Marcel Stör added a comment - It doesn't look like the project team considers that many people want an HTML report without creating a Maven site. It's been 4 years since this was first reported So, as so often...Ant to the rescue: http://stackoverflow.com/a/2847475/131929
          Hide
          Andreas Gudian added a comment -

          Indeed, I myself almost never use the report goal when running tests standalone. But that's also in part due to the funny layout and the missing style sheet...
          The report goal could use a some love here and there, and as usual: we're open for good ideas, especially when accomodated by good patches / pull requests.

          Show
          Andreas Gudian added a comment - Indeed, I myself almost never use the report goal when running tests standalone. But that's also in part due to the funny layout and the missing style sheet... The report goal could use a some love here and there, and as usual: we're open for good ideas, especially when accomodated by good patches / pull requests.
          Hide
          Michael Osipov added a comment -

          Andreas, I wouldn't fix this issue for this particular plugin because other plugins suffer from this issue or similar ones too. We need a generic approach.

          Show
          Michael Osipov added a comment - Andreas, I wouldn't fix this issue for this particular plugin because other plugins suffer from this issue or similar ones too. We need a generic approach.
          Hide
          Marcel Stör added a comment -

          other plugins suffer from this issue or similar ones too

          Can you back this up with examples?

          Show
          Marcel Stör added a comment - other plugins suffer from this issue or similar ones too Can you back this up with examples?
          Hide
          Michael Osipov added a comment - - edited

          MCHECKSTYLE-126. The general problem is that when a report is gerenerated outside of the site phase, strange things can happen.

          Show
          Michael Osipov added a comment - - edited MCHECKSTYLE-126 . The general problem is that when a report is gerenerated outside of the site phase, strange things can happen.
          Hide
          Tibor Digana added a comment -

          I always used the report within the site phase, so I could not see this problem.
          Michael Osipov
          Michael Osipov
          You are experienced guy with site generation. Can you tell us what the generic approach should be and how to fix it?

          Show
          Tibor Digana added a comment - I always used the report within the site phase, so I could not see this problem. Michael Osipov Michael Osipov You are experienced guy with site generation. Can you tell us what the generic approach should be and how to fix it?

            People

            • Assignee:
              Unassigned
              Reporter:
              Marco Brandizi
            • Votes:
              15 Vote for this issue
              Watchers:
              19 Start watching this issue

              Dates

              • Created:
                Updated:

                Development