You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2016/10/12 23:30:20 UTC

[jira] [Commented] (KAFKA-4025) build fails on windows due to rat target output encoding

    [ https://issues.apache.org/jira/browse/KAFKA-4025?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15570214#comment-15570214 ] 

ASF GitHub Bot commented on KAFKA-4025:
---------------------------------------

Github user asfgit closed the pull request at:

    https://github.com/apache/kafka/pull/1710


> build fails on windows due to rat target output encoding
> --------------------------------------------------------
>
>                 Key: KAFKA-4025
>                 URL: https://issues.apache.org/jira/browse/KAFKA-4025
>             Project: Kafka
>          Issue Type: Bug
>         Environment: windows 7, either regular command prompt or git bash
>            Reporter: radai rosenblatt
>            Priority: Minor
>             Fix For: 0.10.1.1
>
>         Attachments: windows build debug output.txt
>
>
> kafka runs a rat report during the build, using [the rat ant report task|http://creadur.apache.org/rat/apache-rat-tasks/report.html], which has no output encoding parameter.
> this means that the resulting xml report is produced using the system-default encoding, which is OS-dependent:
> the rat ant task code instantiates the output writer like so ([org.apache.rat.anttasks.Report.java|http://svn.apache.org/repos/asf/creadur/rat/tags/apache-rat-project-0.11/apache-rat-tasks/src/main/java/org/apache/rat/anttasks/Report.java] line 196):
> {noformat}
> out = new PrintWriter(new FileWriter(reportFile));{noformat}
> which eventually leads to {{Charset.defaultCharset()}} that relies on the file.encoding system property. this causes an issue if the default encoding isnt UTF-8 (which it isnt on windows) as the code called by printUnknownFiles() in rat.gradle defaults to UTF-8 when reading the report xml, causing the build to fail with:
> {noformat}
> com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException: Invalid byte 1 of 1-byte UTF-8 sequence.{noformat}
> (see complete output of {{gradlew --debug --stacktrace rat}} in attached file)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)