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-85

Configuration for different report encodings (other than UTF-8)

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: New Feature New Feature
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: 2.4
  • Labels:
    None

Description

The Cobertura patch 1670817 implements the possibility to specify the encoding for the java source code files. This is absolutely necessary if the Java source code uses encoding other than UTF-8. See https://sourceforge.net/tracker/?func=detail&atid=720017&aid=1670817&group_id=130558

It would be nice if everybody would use UTF-8, this is however not always possible; i.e. due to Microsoft's dominance () many people use unconciously the so called ANSI (Windows-1252) unofficial "standard". When writing code (better to say comments) in other languages than english, the Cobertura report output (that utilizes UTF-8) is hardly readable.

Hence, it is highly desirable if somebody would implement asap an appropriate patch for the maven cobertura plugin where with a new configuration option the user can specify the source character set (the default remains UTF-8).

... 
       <configuration>
          <formats>
            <format>...</format>
          </formats>
          <charset>CP1252</charset>
       </configuration>
...
  • Options
    • Sort By Name
    • Sort By Date
    • Ascending
    • Descending
    • Download All

Attachments

  1. Text File
    MCOBERTURA-85.patch
    27/Feb/08 9:52 AM
    3 kB
    Sasha Cvetkovic

Issue Links

is duplicated by

Bug - A problem which impairs or prevents the functions of the product. MCOBERTURA-116 Add encoding parameter in case Java Source is not default

  • Critical - Crashes, loss of data, severe memory leak.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.

New Feature - A new feature of the product, which has yet to be developed. MCOBERTURA-33 Adding the Cobertura Merge task

  • Major - Major loss of function.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Sasha Cvetkovic added a comment - 14/Feb/08 2:40 AM

In order to be consistent with the Cobertura patch it is better to call the new option

Show
Sasha Cvetkovic added a comment - 14/Feb/08 2:40 AM In order to be consistent with the Cobertura patch it is better to call the new option
Hide
Permalink
Sasha Cvetkovic added a comment - 14/Feb/08 2:42 AM

In order to be consistent with the Cobertura patch it is better to call the new option "encoding", i.e.

... 
       <configuration>
          <formats>
            <format>...</format>
          </formats>
          <encoding>CP1252</encoding>
       </configuration>
...
Show
Sasha Cvetkovic added a comment - 14/Feb/08 2:42 AM In order to be consistent with the Cobertura patch it is better to call the new option "encoding", i.e.
... 
       <configuration>
          <formats>
            <format>...</format>
          </formats>
          <encoding>CP1252</encoding>
       </configuration>
...
Hide
Permalink
Sasha Cvetkovic added a comment - 27/Feb/08 9:52 AM

And here is the proposed patch (MCOBERTURA-85.patch) - w/o JUnit Tests (should be quite straightforward).

Notes:

  • Modifications done in the tagged version 2.2
  • CoberturaInstrumentMojo.java (method addCoberturaDependenciesToTestClasspath()) : in the final version (2.3?) one should replace the group identifier "patches" with "net.sourceforge.cobertura".
  • pom.xml must be adapted accordingly (set correct plugin version + set appropriate dependency with the patched/updated cobertura - 2.0?, i.e. the version that implements the encoding switch).
Show
Sasha Cvetkovic added a comment - 27/Feb/08 9:52 AM And here is the proposed patch (MCOBERTURA-85.patch) - w/o JUnit Tests (should be quite straightforward). Notes:
  • Modifications done in the tagged version 2.2
  • CoberturaInstrumentMojo.java (method addCoberturaDependenciesToTestClasspath()) : in the final version (2.3?) one should replace the group identifier "patches" with "net.sourceforge.cobertura".
  • pom.xml must be adapted accordingly (set correct plugin version + set appropriate dependency with the patched/updated cobertura - 2.0?, i.e. the version that implements the encoding switch).
Hide
Permalink
Jörg Hohwiller added a comment - 30/Jul/10 4:26 PM

The proper fix would have been to honor project.build.sourceEncoding:
http://docs.codehaus.org/display/MAVENUSER/POM+Element+for+Source+File+Encoding

Show
Jörg Hohwiller added a comment - 30/Jul/10 4:26 PM The proper fix would have been to honor project.build.sourceEncoding: http://docs.codehaus.org/display/MAVENUSER/POM+Element+for+Source+File+Encoding
Hide
Permalink
Robert Scholte added a comment - 30/Jul/10 4:39 PM

This issue is already closed. Besides, it's already fixed like that: http://fisheye.codehaus.org/browse/mojo/trunk/mojo/cobertura-maven-plugin/src/main/java/org/codehaus/mojo/cobertura/CoberturaReportMojo.java?r=12184#l64

Show
Robert Scholte added a comment - 30/Jul/10 4:39 PM This issue is already closed. Besides, it's already fixed like that: http://fisheye.codehaus.org/browse/mojo/trunk/mojo/cobertura-maven-plugin/src/main/java/org/codehaus/mojo/cobertura/CoberturaReportMojo.java?r=12184#l64

People

  • Assignee:
    David J. M. Karlsen
    Reporter:
    Sasha Cvetkovic
Vote (0)
Watch (1)

Dates

  • Created:
    13/Feb/08 11:17 AM
    Updated:
    23/Apr/11 12:20 PM
    Resolved:
    26/Oct/09 6:40 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.