[jira] [Commented] (RAT-242) Encoding of XML report

2018-01-25 Thread JIRA

[ 
https://issues.apache.org/jira/browse/RAT-242?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16340241#comment-16340241
 ] 

Matthias Bläsing commented on RAT-242:
--

I had another look at it and the unittests currently run correctly. I suggest 
to close this for now and reopen/contact me if it surfaces again. For the 
record things that could go wrong:
 * the JVM could deny access to the system properties and thus the needed 
latin1 encoding can't be set for the invocation of the test (should raise an 
exception)
 * parallel test runs (threaded in the same VM) would also expose the unittests 
to race conditions (the default encoding is set VM wide)
 * different VM implementations could use different fields/caching strategies 
for the default file encoding (I'd expect an exception then)
 * JVM might not make the field accessible (relevant for JDK 9), should also 
raise an exception

I hoped to get some more insight, but from the look all should be good.

> Encoding of XML report
> --
>
> Key: RAT-242
> URL: https://issues.apache.org/jira/browse/RAT-242
> Project: Apache Rat
>  Issue Type: Bug
>  Components: reports
>Affects Versions: 0.12
> Environment: ubuntu
>Reporter: Eric Barboni
>Priority: Major
> Attachments: rat-242.patch
>
>
> Hi, we encounter an issue with encoding of a xml rat report. 
> We try to parse an xml rat report generated on an iso-8859-1 file system. The 
> xml has no encoding element in the prolog. If you open it with fileinpustream 
> it may fail.
> last comment in this pull request 
> (https://github.com/apache/incubator-netbeans/pull/70)  by Matthias Bläsing  
> suggest forcing to UTF-8.
> encoding  may also be an option in the report task
> Regards



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (RAT-242) Encoding of XML report

2018-01-21 Thread Philipp Ottlinger (JIRA)

[ 
https://issues.apache.org/jira/browse/RAT-242?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16333695#comment-16333695
 ] 

Philipp Ottlinger commented on RAT-242:
---

ASF-Jenkins seems to have problems as well:

[https://builds.apache.org/job/Creadur-Rat/lastBuild/org.apache.rat$apache-rat-plugin/testReport/org.apache.rat.mp/RatCheckMojoTest/testIt4/]

 

I was able to reproduce the failure with an older JDK8_152 on Mac, while Ubuntu 
works fine. Strange.

> Encoding of XML report
> --
>
> Key: RAT-242
> URL: https://issues.apache.org/jira/browse/RAT-242
> Project: Apache Rat
>  Issue Type: Bug
>  Components: reports
>Affects Versions: 0.12
> Environment: ubuntu
>Reporter: Eric Barboni
>Priority: Major
> Attachments: rat-242.patch
>
>
> Hi, we encounter an issue with encoding of a xml rat report. 
> We try to parse an xml rat report generated on an iso-8859-1 file system. The 
> xml has no encoding element in the prolog. If you open it with fileinpustream 
> it may fail.
> last comment in this pull request 
> (https://github.com/apache/incubator-netbeans/pull/70)  by Matthias Bläsing  
> suggest forcing to UTF-8.
> encoding  may also be an option in the report task
> Regards



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (RAT-242) Encoding of XML report

2018-01-14 Thread JIRA

[ 
https://issues.apache.org/jira/browse/RAT-242?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16325667#comment-16325667
 ] 

Matthias Bläsing commented on RAT-242:
--

I tried to reproduce the test failure and totally failed. I switched JDKs, 
Maven versions and system locales and nothing changed. The build runs cleanly. 
I checked the test files and both contain the the right ISO-8859-1 encoding 
umlauts. I suggest to modify the test to output the header-sample content like 
this:

{noformat}
matthias@athena:~/src/creadur-rat-svn$ svn diff
Index: apache-rat-plugin/src/test/java/org/apache/rat/mp/RatCheckMojoTest.java
===
--- apache-rat-plugin/src/test/java/org/apache/rat/mp/RatCheckMojoTest.java 
(Revision 182)
+++ apache-rat-plugin/src/test/java/org/apache/rat/mp/RatCheckMojoTest.java 
(Arbeitskopie)
@@ -238,11 +238,12 @@
 boolean documentParsed = false;
 try {
 Document doc = db.parse(fis);
-boolean byteSequencePresent = 
doc.getElementsByTagName("header-sample")
+String headerSample = doc.getElementsByTagName("header-sample")
 .item(0)
-.getTextContent()
+.getTextContent();
+boolean byteSequencePresent = headerSample
 .contains("\u00E4\u00F6\u00FC\u00C4\u00D6\u00DC\u00DF");
-assertTrue("Report should contain test umlauts", 
byteSequencePresent);
+assertTrue("header-sample should contain test umlauts: " + 
headerSample, byteSequencePresent);
 documentParsed = true;
 } catch (Exception ex) {
 documentParsed = false;
matthias@athena:~/src/creadur-rat-svn$ 
{noformat}

Maybe that reveals something.

> Encoding of XML report
> --
>
> Key: RAT-242
> URL: https://issues.apache.org/jira/browse/RAT-242
> Project: Apache Rat
>  Issue Type: Bug
>  Components: reports
>Affects Versions: 0.12
> Environment: ubuntu
>Reporter: Eric Barboni
> Attachments: rat-242.patch
>
>
> Hi, we encounter an issue with encoding of a xml rat report. 
> We try to parse an xml rat report generated on an iso-8859-1 file system. The 
> xml has no encoding element in the prolog. If you open it with fileinpustream 
> it may fail.
> last comment in this pull request 
> (https://github.com/apache/incubator-netbeans/pull/70)  by Matthias Bläsing  
> suggest forcing to UTF-8.
> encoding  may also be an option in the report task
> Regards



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (RAT-242) Encoding of XML report

2018-01-14 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/RAT-242?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16325516#comment-16325516
 ] 

ASF subversion and git services commented on RAT-242:
-

Commit 1821092 from [~hugo.hirsch] in branch 'rat/trunk'
[ https://svn.apache.org/r1821092 ]

RAT-242: Tweak configuration for ANT task itests

> Encoding of XML report
> --
>
> Key: RAT-242
> URL: https://issues.apache.org/jira/browse/RAT-242
> Project: Apache Rat
>  Issue Type: Bug
>  Components: reports
>Affects Versions: 0.12
> Environment: ubuntu
>Reporter: Eric Barboni
> Attachments: rat-242.patch
>
>
> Hi, we encounter an issue with encoding of a xml rat report. 
> We try to parse an xml rat report generated on an iso-8859-1 file system. The 
> xml has no encoding element in the prolog. If you open it with fileinpustream 
> it may fail.
> last comment in this pull request 
> (https://github.com/apache/incubator-netbeans/pull/70)  by Matthias Bläsing  
> suggest forcing to UTF-8.
> encoding  may also be an option in the report task
> Regards



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (RAT-242) Encoding of XML report

2018-01-14 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/RAT-242?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16325513#comment-16325513
 ] 

ASF subversion and git services commented on RAT-242:
-

Commit 1821091 from [~hugo.hirsch] in branch 'rat/trunk'
[ https://svn.apache.org/r1821091 ]

RAT-242: Add exclusions for RAT itests

> Encoding of XML report
> --
>
> Key: RAT-242
> URL: https://issues.apache.org/jira/browse/RAT-242
> Project: Apache Rat
>  Issue Type: Bug
>  Components: reports
>Affects Versions: 0.12
> Environment: ubuntu
>Reporter: Eric Barboni
> Attachments: rat-242.patch
>
>
> Hi, we encounter an issue with encoding of a xml rat report. 
> We try to parse an xml rat report generated on an iso-8859-1 file system. The 
> xml has no encoding element in the prolog. If you open it with fileinpustream 
> it may fail.
> last comment in this pull request 
> (https://github.com/apache/incubator-netbeans/pull/70)  by Matthias Bläsing  
> suggest forcing to UTF-8.
> encoding  may also be an option in the report task
> Regards



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (RAT-242) Encoding of XML report

2018-01-14 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/RAT-242?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16325506#comment-16325506
 ] 

ASF subversion and git services commented on RAT-242:
-

Commit 1821090 from [~hugo.hirsch] in branch 'rat/trunk'
[ https://svn.apache.org/r1821090 ]

RAT-242: Add exclusion of ITests to rat plugin pom

> Encoding of XML report
> --
>
> Key: RAT-242
> URL: https://issues.apache.org/jira/browse/RAT-242
> Project: Apache Rat
>  Issue Type: Bug
>  Components: reports
>Affects Versions: 0.12
> Environment: ubuntu
>Reporter: Eric Barboni
> Attachments: rat-242.patch
>
>
> Hi, we encounter an issue with encoding of a xml rat report. 
> We try to parse an xml rat report generated on an iso-8859-1 file system. The 
> xml has no encoding element in the prolog. If you open it with fileinpustream 
> it may fail.
> last comment in this pull request 
> (https://github.com/apache/incubator-netbeans/pull/70)  by Matthias Bläsing  
> suggest forcing to UTF-8.
> encoding  may also be an option in the report task
> Regards



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (RAT-242) Encoding of XML report

2018-01-14 Thread Philipp Ottlinger (JIRA)

[ 
https://issues.apache.org/jira/browse/RAT-242?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16325486#comment-16325486
 ] 

Philipp Ottlinger commented on RAT-242:
---

[~mblaesing] thanks for your message - I've adapted the RAT plugin 
configuration and triggered some reruns.
https://builds.apache.org/job/Creadur-Rat-ParentPom/
is the build that is relevant for all subsequent builds.

There sometimes is an issue with inheriting the correct configuration and if 
I'm not too mistaken there has been a bug in 0.12 with file exclusions that is 
fixed in 0.13-SNAPSHOT already.

Please verify and close the ticket if it suits your needs.

> Encoding of XML report
> --
>
> Key: RAT-242
> URL: https://issues.apache.org/jira/browse/RAT-242
> Project: Apache Rat
>  Issue Type: Bug
>  Components: reports
>Affects Versions: 0.12
> Environment: ubuntu
>Reporter: Eric Barboni
> Attachments: rat-242.patch
>
>
> Hi, we encounter an issue with encoding of a xml rat report. 
> We try to parse an xml rat report generated on an iso-8859-1 file system. The 
> xml has no encoding element in the prolog. If you open it with fileinpustream 
> it may fail.
> last comment in this pull request 
> (https://github.com/apache/incubator-netbeans/pull/70)  by Matthias Bläsing  
> suggest forcing to UTF-8.
> encoding  may also be an option in the report task
> Regards



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (RAT-242) Encoding of XML report

2018-01-14 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/RAT-242?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16325478#comment-16325478
 ] 

ASF subversion and git services commented on RAT-242:
-

Commit 1821086 from [~hugo.hirsch] in branch 'rat/trunk'
[ https://svn.apache.org/r1821086 ]

RAT-242: Adapt rat check configuration

Add explicit exclusion for new resource files.

> Encoding of XML report
> --
>
> Key: RAT-242
> URL: https://issues.apache.org/jira/browse/RAT-242
> Project: Apache Rat
>  Issue Type: Bug
>  Components: reports
>Affects Versions: 0.12
> Environment: ubuntu
>Reporter: Eric Barboni
> Attachments: rat-242.patch
>
>
> Hi, we encounter an issue with encoding of a xml rat report. 
> We try to parse an xml rat report generated on an iso-8859-1 file system. The 
> xml has no encoding element in the prolog. If you open it with fileinpustream 
> it may fail.
> last comment in this pull request 
> (https://github.com/apache/incubator-netbeans/pull/70)  by Matthias Bläsing  
> suggest forcing to UTF-8.
> encoding  may also be an option in the report task
> Regards



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (RAT-242) Encoding of XML report

2018-01-13 Thread JIRA

[ 
https://issues.apache.org/jira/browse/RAT-242?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16325182#comment-16325182
 ] 

Matthias Bläsing commented on RAT-242:
--

Philipp thank you for merging the patch. I checked the current state in the 
subversion and found the new unittests failing. I tracked it down to a followup 
commit in revision 1821058, that modifies

apache-rat-tasks/src/test/resources/org/example/iso-8859-1.html

and adds a license header to this file. The license header must not be there, 
as the whole point of this file is to cause the rat test in the unittests to 
fail and report the encoded header.

Your commit message mentions failing jenkis build. Could it be, that there is a 
rat check in place, that now fails, because there are two files in the 
repository that don't hold a valid license:

./apache-rat-plugin/src/test/resources/unit/it4/iso-8859-1.html
./apache-rat-tasks/src/test/resources/org/example/iso-8859-1.html

Could you point me to the jenkins build report, I'd like to have a look at it, 
to finally fix this.

> Encoding of XML report
> --
>
> Key: RAT-242
> URL: https://issues.apache.org/jira/browse/RAT-242
> Project: Apache Rat
>  Issue Type: Bug
>  Components: reports
>Affects Versions: 0.12
> Environment: ubuntu
>Reporter: Eric Barboni
> Attachments: rat-242.patch
>
>
> Hi, we encounter an issue with encoding of a xml rat report. 
> We try to parse an xml rat report generated on an iso-8859-1 file system. The 
> xml has no encoding element in the prolog. If you open it with fileinpustream 
> it may fail.
> last comment in this pull request 
> (https://github.com/apache/incubator-netbeans/pull/70)  by Matthias Bläsing  
> suggest forcing to UTF-8.
> encoding  may also be an option in the report task
> Regards



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


Re: [jira] [Commented] (RAT-242) Encoding of XML report

2018-01-13 Thread P. Ottlinger
Am 13.01.2018 um 11:48 schrieb ASF subversion and git services (JIRA):
> 
> [ 
> https://issues.apache.org/jira/browse/RAT-242?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16325077#comment-16325077
>  ] 
> 
> ASF subversion and git services commented on RAT-242:
> -
> 
> Commit 1821056 from [~hugo.hirsch] in branch 'rat/trunk'
> [ https://svn.apache.org/r1821056 ]
> 
> RAT-242: Add tests and fixes for encoding


I'll take care of the test failures 
the lifecycle of the ANT tests is quite strange as I wasn't able to
reproduce the failures first.

An explicit clean works.

Sorry for the inconvenience

Phil


[jira] [Commented] (RAT-242) Encoding of XML report

2018-01-13 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/RAT-242?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16325077#comment-16325077
 ] 

ASF subversion and git services commented on RAT-242:
-

Commit 1821056 from [~hugo.hirsch] in branch 'rat/trunk'
[ https://svn.apache.org/r1821056 ]

RAT-242: Add tests and fixes for encoding

> Encoding of XML report
> --
>
> Key: RAT-242
> URL: https://issues.apache.org/jira/browse/RAT-242
> Project: Apache Rat
>  Issue Type: Bug
>  Components: reports
>Affects Versions: 0.12
> Environment: ubuntu
>Reporter: Eric Barboni
> Attachments: rat-242.patch
>
>
> Hi, we encounter an issue with encoding of a xml rat report. 
> We try to parse an xml rat report generated on an iso-8859-1 file system. The 
> xml has no encoding element in the prolog. If you open it with fileinpustream 
> it may fail.
> last comment in this pull request 
> (https://github.com/apache/incubator-netbeans/pull/70)  by Matthias Bläsing  
> suggest forcing to UTF-8.
> encoding  may also be an option in the report task
> Regards



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (RAT-242) Encoding of XML report

2018-01-06 Thread JIRA

[ 
https://issues.apache.org/jira/browse/RAT-242?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16314689#comment-16314689
 ] 

Matthias Bläsing commented on RAT-242:
--

Further information: you asked for an apache ICLA. I can confirm, that an ICLA 
is filed.

> Encoding of XML report
> --
>
> Key: RAT-242
> URL: https://issues.apache.org/jira/browse/RAT-242
> Project: Apache Rat
>  Issue Type: Bug
>  Components: reports
>Affects Versions: 0.12
> Environment: ubuntu
>Reporter: Eric Barboni
> Attachments: rat-242.patch
>
>
> Hi, we encounter an issue with encoding of a xml rat report. 
> We try to parse an xml rat report generated on an iso-8859-1 file system. The 
> xml has no encoding element in the prolog. If you open it with fileinpustream 
> it may fail.
> last comment in this pull request 
> (https://github.com/apache/incubator-netbeans/pull/70)  by Matthias Bläsing  
> suggest forcing to UTF-8.
> encoding  may also be an option in the report task
> Regards



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


Re: [jira] [Commented] (RAT-242) Encoding of XML report

2018-01-05 Thread Jochen Wiedmann
+1 to UTF-8 as the default encoding. (Even, if we had another default
in the past.)

And +10 to rewriting the XML stuff to use a proper XML generation
tool, for example java.xml.transform. (This has always been one of the
worst aspects in the Rat code base.)

Jochen


On Thu, Jan 4, 2018 at 10:57 PM, Philipp Ottlinger (JIRA)
 wrote:
>
> [ 
> https://issues.apache.org/jira/browse/RAT-242?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16312090#comment-16312090
>  ]
>
> Philipp Ottlinger commented on RAT-242:
> ---
>
> Pull request concerning the same problem:
> https://github.com/apache/creadur-rat/pull/8
>
>> Encoding of XML report
>> --
>>
>> Key: RAT-242
>> URL: https://issues.apache.org/jira/browse/RAT-242
>> Project: Apache Rat
>>  Issue Type: Bug
>>  Components: reports
>>Affects Versions: 0.12
>> Environment: ubuntu
>>Reporter: Eric Barboni
>>
>> Hi, we encounter an issue with encoding of a xml rat report.
>> We try to parse an xml rat report generated on an iso-8859-1 file system. 
>> The xml has no encoding element in the prolog. If you open it with 
>> fileinpustream it may fail.
>> last comment in this pull request 
>> (https://github.com/apache/incubator-netbeans/pull/70)  by Matthias Bläsing  
>> suggest forcing to UTF-8.
>> encoding  may also be an option in the report task
>> Regards
>
>
>
> --
> This message was sent by Atlassian JIRA
> (v6.4.14#64029)


[jira] [Commented] (RAT-242) Encoding of XML report

2018-01-04 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/RAT-242?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16312139#comment-16312139
 ] 

ASF subversion and git services commented on RAT-242:
-

Commit 1820237 from [~hugo.hirsch] in branch 'rat/trunk'
[ https://svn.apache.org/r1820237 ]

RAT-242: Use UTF-8 as default encoding for written reports

Thanks to Matthias Bläsing
https://github.com/apache/creadur-rat/pull/8

> Encoding of XML report
> --
>
> Key: RAT-242
> URL: https://issues.apache.org/jira/browse/RAT-242
> Project: Apache Rat
>  Issue Type: Bug
>  Components: reports
>Affects Versions: 0.12
> Environment: ubuntu
>Reporter: Eric Barboni
>
> Hi, we encounter an issue with encoding of a xml rat report. 
> We try to parse an xml rat report generated on an iso-8859-1 file system. The 
> xml has no encoding element in the prolog. If you open it with fileinpustream 
> it may fail.
> last comment in this pull request 
> (https://github.com/apache/incubator-netbeans/pull/70)  by Matthias Bläsing  
> suggest forcing to UTF-8.
> encoding  may also be an option in the report task
> Regards



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (RAT-242) Encoding of XML report

2018-01-04 Thread Philipp Ottlinger (JIRA)

[ 
https://issues.apache.org/jira/browse/RAT-242?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16312090#comment-16312090
 ] 

Philipp Ottlinger commented on RAT-242:
---

Pull request concerning the same problem:
https://github.com/apache/creadur-rat/pull/8

> Encoding of XML report
> --
>
> Key: RAT-242
> URL: https://issues.apache.org/jira/browse/RAT-242
> Project: Apache Rat
>  Issue Type: Bug
>  Components: reports
>Affects Versions: 0.12
> Environment: ubuntu
>Reporter: Eric Barboni
>
> Hi, we encounter an issue with encoding of a xml rat report. 
> We try to parse an xml rat report generated on an iso-8859-1 file system. The 
> xml has no encoding element in the prolog. If you open it with fileinpustream 
> it may fail.
> last comment in this pull request 
> (https://github.com/apache/incubator-netbeans/pull/70)  by Matthias Bläsing  
> suggest forcing to UTF-8.
> encoding  may also be an option in the report task
> Regards



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)