Mojo's JavaNCSS Maven Plugin
  1. Mojo's JavaNCSS Maven Plugin
  2. MJNCSS-31

add an "encoding" parameter for source files and use ${project.build.sourceEncoding} as default value

    Details

    • Type: New Feature New Feature
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0
    • Labels:
      None
    • Number of attachments :
      0

      Issue Links

        Activity

        Hide
        Herve Boutemy added a comment -

        like explained in MJNCSS-15, encoding support in javancss itself is needed first

        Show
        Herve Boutemy added a comment - like explained in MJNCSS-15 , encoding support in javancss itself is needed first
        Hide
        Jean-Laurent de Morlhon added a comment -

        This will make the forceEncoding option redundant, or I miss something ?

        see http://mojo.codehaus.org/javancss-maven-plugin/report-mojo.html#forceEncoding

        Show
        Jean-Laurent de Morlhon added a comment - This will make the forceEncoding option redundant, or I miss something ? see http://mojo.codehaus.org/javancss-maven-plugin/report-mojo.html#forceEncoding
        Hide
        Herve Boutemy added a comment -

        forceEncoding option will be replaced by sourceEncoding (or simply encoding if you prefer)
        forceEncoding should never have existed: XML files provide their encoding inside the stream, then you don't need to force anything if the XML stream is valid (which is not the case actually)

        Show
        Herve Boutemy added a comment - forceEncoding option will be replaced by sourceEncoding (or simply encoding if you prefer) forceEncoding should never have existed: XML files provide their encoding inside the stream, then you don't need to force anything if the XML stream is valid (which is not the case actually)
        Hide
        Benjamin Bentmann added a comment - - edited

        This will make the forceEncoding option redundant, or I miss something ?

        If the employed SAXReader is really not capable of detecting the file encoding from the XML declaration, the plugin should simply use WriterFactory.newXmlReader() from plexus-utils and pass the reader to SAXReader.read(Reader).

        I agree with Hervé, the parameter forceEncoding should be removed. Deleting mojo parameters shouldn't cause any harm with backward-compat, IIRC Maven silently ignore configuration elements from the POM for which no corresponding setter/field exists on the mojo.

        Show
        Benjamin Bentmann added a comment - - edited This will make the forceEncoding option redundant, or I miss something ? If the employed SAXReader is really not capable of detecting the file encoding from the XML declaration, the plugin should simply use WriterFactory.newXmlReader() from plexus-utils and pass the reader to SAXReader.read(Reader) . I agree with Hervé, the parameter forceEncoding should be removed. Deleting mojo parameters shouldn't cause any harm with backward-compat, IIRC Maven silently ignore configuration elements from the POM for which no corresponding setter/field exists on the mojo.
        Hide
        Jean-Laurent de Morlhon added a comment -

        Thanks !

        Let's see what the guys at javancss will do.

        Show
        Jean-Laurent de Morlhon added a comment - Thanks ! Let's see what the guys at javancss will do.
        Hide
        Herve Boutemy added a comment -

        FYI, project created on Codehaus

        Show
        Herve Boutemy added a comment - FYI, project created on Codehaus
        Hide
        Herve Boutemy added a comment -

        done in r9784

        Show
        Herve Boutemy added a comment - done in r9784

          People

          • Assignee:
            Herve Boutemy
            Reporter:
            Herve Boutemy
          • Votes:
            2 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: