You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by "Henning Schmiedehausen (JIRA)" <ji...@codehaus.org> on 2005/08/04 13:00:57 UTC

[jira] Created: (MPXDOC-154) system locale setting makes test cases fail.

system locale setting makes test cases fail.
--------------------------------------------

         Key: MPXDOC-154
         URL: http://jira.codehaus.org/browse/MPXDOC-154
     Project: maven-xdoc-plugin
        Type: Bug
    Versions: 1.9.1    
 Environment: java version "1.4.2_08"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_08-b03)
Java HotSpot(TM) Client VM (build 1.4.2_08-b03, mixed mode)
Fedora Core 3 x86
 Reporter: Henning Schmiedehausen
 Assigned to: Arnaud Heritier 


[henning@forge maven-xdoc-plugin-1.9.1]$ echo $LANG
en_US
[henning@forge maven-xdoc-plugin-1.9.1]$ rm -rf target ; maven -q test
[...]
test:test:
    [junit] Running org.apache.maven.xdoc.util.LocaleUtilTest
    [junit] Tests run: 7, Failures: 0, Errors: 0, Time elapsed: 1.854 sec <--------- !!!!!!!!!!!!!!!!!!!
    [junit] Running org.apache.maven.NavBeanTest
    [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 1.567 sec

[henning@forge maven-xdoc-plugin-1.9.1]$ export LANG=en_US.UTF-8 (this is the default on all recent Linux systems)
[henning@forge maven-xdoc-plugin-1.9.1]$ rm -rf target; maven -q test:test
[...]
test:test:
    [junit] Running org.apache.maven.xdoc.util.LocaleUtilTest
    [junit] Tests run: 7, Failures: 1, Errors: 0, Time elapsed: 1.843 sec
    [junit] [ERROR] TEST org.apache.maven.xdoc.util.LocaleUtilTest FAILED  <-------- !!!!!!!!!!!!!!!!!!
    [junit] Running org.apache.maven.NavBeanTest
    [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 1.506 sec

Same behaviour for plugins/trunk/xdoc

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Commented: (MPXDOC-154) system locale setting makes test cases fail.

Posted by "Lukas Theussl (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MPXDOC-154?page=comments#action_45577 ] 

Lukas Theussl commented on MPXDOC-154:
--------------------------------------

I don't know if this is a different issue or not. From a clean checkout:

export LANG=en_US
maven test ---> SUCCESS
export LANG=en_US.UTF-8
maven test ---> SUCCESS !!!
maven clean
maven test ---> FAILED !!!
export LANG=en_US
maven test ---> FAILED !!!
maven clean
maven test ---> SUCCESS !!!

ie it depends on whether you clean up between the test runs or not. ??? Can you confirm that? 
Anybody got an idea what could be going on?
(I'm running java 1.4.2 on FC3)


> system locale setting makes test cases fail.
> --------------------------------------------
>
>          Key: MPXDOC-154
>          URL: http://jira.codehaus.org/browse/MPXDOC-154
>      Project: maven-xdoc-plugin
>         Type: Bug
>     Versions: 1.9.1
>  Environment: java version "1.4.2_08"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_08-b03)
> Java HotSpot(TM) Client VM (build 1.4.2_08-b03, mixed mode)
> Fedora Core 3 x86
>     Reporter: Henning Schmiedehausen

>
>
> [henning@forge maven-xdoc-plugin-1.9.1]$ echo $LANG
> en_US
> [henning@forge maven-xdoc-plugin-1.9.1]$ rm -rf target ; maven -q test
> [...]
> test:test:
>     [junit] Running org.apache.maven.xdoc.util.LocaleUtilTest
>     [junit] Tests run: 7, Failures: 0, Errors: 0, Time elapsed: 1.854 sec <--------- !!!!!!!!!!!!!!!!!!!
>     [junit] Running org.apache.maven.NavBeanTest
>     [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 1.567 sec
> [henning@forge maven-xdoc-plugin-1.9.1]$ export LANG=en_US.UTF-8 (this is the default on all recent Linux systems)
> [henning@forge maven-xdoc-plugin-1.9.1]$ rm -rf target; maven -q test:test
> [...]
> test:test:
>     [junit] Running org.apache.maven.xdoc.util.LocaleUtilTest
>     [junit] Tests run: 7, Failures: 1, Errors: 0, Time elapsed: 1.843 sec
>     [junit] [ERROR] TEST org.apache.maven.xdoc.util.LocaleUtilTest FAILED  <-------- !!!!!!!!!!!!!!!!!!
>     [junit] Running org.apache.maven.NavBeanTest
>     [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 1.506 sec
> Same behaviour for plugins/trunk/xdoc

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Commented: (MPXDOC-154) system locale setting makes test cases fail.

Posted by "Henning Schmiedehausen (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MPXDOC-154?page=comments#action_45373 ] 

Henning Schmiedehausen commented on MPXDOC-154:
-----------------------------------------------

Type the following instructions into a Linux command line:

svn checkout http://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk/plugin-parent
svn checkout http://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk/xdoc maven-xdoc-plugin
cd maven-xdoc-plugin
export LANG=en_US
rm -rf target
maven -q test > /tmp/result1
export LANG=en_US.UTF-8
rm -rf target
maven -q test > /tmp/result2
diff -u /tmp/result1 /tmp/result2

The maven-xdoc-plugin _IS_ the test case. Not "some projects of yours". The bug is in the test cases. Not in the plugin.


> system locale setting makes test cases fail.
> --------------------------------------------
>
>          Key: MPXDOC-154
>          URL: http://jira.codehaus.org/browse/MPXDOC-154
>      Project: maven-xdoc-plugin
>         Type: Bug
>     Versions: 1.9.1
>  Environment: java version "1.4.2_08"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_08-b03)
> Java HotSpot(TM) Client VM (build 1.4.2_08-b03, mixed mode)
> Fedora Core 3 x86
>     Reporter: Henning Schmiedehausen

>
>
> [henning@forge maven-xdoc-plugin-1.9.1]$ echo $LANG
> en_US
> [henning@forge maven-xdoc-plugin-1.9.1]$ rm -rf target ; maven -q test
> [...]
> test:test:
>     [junit] Running org.apache.maven.xdoc.util.LocaleUtilTest
>     [junit] Tests run: 7, Failures: 0, Errors: 0, Time elapsed: 1.854 sec <--------- !!!!!!!!!!!!!!!!!!!
>     [junit] Running org.apache.maven.NavBeanTest
>     [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 1.567 sec
> [henning@forge maven-xdoc-plugin-1.9.1]$ export LANG=en_US.UTF-8 (this is the default on all recent Linux systems)
> [henning@forge maven-xdoc-plugin-1.9.1]$ rm -rf target; maven -q test:test
> [...]
> test:test:
>     [junit] Running org.apache.maven.xdoc.util.LocaleUtilTest
>     [junit] Tests run: 7, Failures: 1, Errors: 0, Time elapsed: 1.843 sec
>     [junit] [ERROR] TEST org.apache.maven.xdoc.util.LocaleUtilTest FAILED  <-------- !!!!!!!!!!!!!!!!!!
>     [junit] Running org.apache.maven.NavBeanTest
>     [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 1.506 sec
> Same behaviour for plugins/trunk/xdoc

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Commented: (MPXDOC-154) system locale setting makes test cases fail.

Posted by "Lukas Theussl (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MPXDOC-154?page=comments#action_45374 ] 

Lukas Theussl commented on MPXDOC-154:
--------------------------------------

Sorry, I hadn't noticed you were in the xdoc plugin. I can reproduce it. Thanks!

> system locale setting makes test cases fail.
> --------------------------------------------
>
>          Key: MPXDOC-154
>          URL: http://jira.codehaus.org/browse/MPXDOC-154
>      Project: maven-xdoc-plugin
>         Type: Bug
>     Versions: 1.9.1
>  Environment: java version "1.4.2_08"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_08-b03)
> Java HotSpot(TM) Client VM (build 1.4.2_08-b03, mixed mode)
> Fedora Core 3 x86
>     Reporter: Henning Schmiedehausen

>
>
> [henning@forge maven-xdoc-plugin-1.9.1]$ echo $LANG
> en_US
> [henning@forge maven-xdoc-plugin-1.9.1]$ rm -rf target ; maven -q test
> [...]
> test:test:
>     [junit] Running org.apache.maven.xdoc.util.LocaleUtilTest
>     [junit] Tests run: 7, Failures: 0, Errors: 0, Time elapsed: 1.854 sec <--------- !!!!!!!!!!!!!!!!!!!
>     [junit] Running org.apache.maven.NavBeanTest
>     [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 1.567 sec
> [henning@forge maven-xdoc-plugin-1.9.1]$ export LANG=en_US.UTF-8 (this is the default on all recent Linux systems)
> [henning@forge maven-xdoc-plugin-1.9.1]$ rm -rf target; maven -q test:test
> [...]
> test:test:
>     [junit] Running org.apache.maven.xdoc.util.LocaleUtilTest
>     [junit] Tests run: 7, Failures: 1, Errors: 0, Time elapsed: 1.843 sec
>     [junit] [ERROR] TEST org.apache.maven.xdoc.util.LocaleUtilTest FAILED  <-------- !!!!!!!!!!!!!!!!!!
>     [junit] Running org.apache.maven.NavBeanTest
>     [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 1.506 sec
> Same behaviour for plugins/trunk/xdoc

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Updated: (MPXDOC-154) system locale setting makes test cases fail.

Posted by "Lukas Theussl (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MPXDOC-154?page=all ]

Lukas Theussl updated MPXDOC-154:
---------------------------------

    Attachment: MPXDOC-154.patch

Patch created after input from the dev list.
With thanks to Juan F. Codagnone and Vincent Siveton.

> system locale setting makes test cases fail.
> --------------------------------------------
>
>          Key: MPXDOC-154
>          URL: http://jira.codehaus.org/browse/MPXDOC-154
>      Project: maven-xdoc-plugin
>         Type: Bug
>     Versions: 1.9.1
>  Environment: java version "1.4.2_08"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_08-b03)
> Java HotSpot(TM) Client VM (build 1.4.2_08-b03, mixed mode)
> Fedora Core 3 x86
>     Reporter: Henning Schmiedehausen
>      Fix For: 1.9.2
>  Attachments: MPXDOC-154.patch
>
>
> [henning@forge maven-xdoc-plugin-1.9.1]$ echo $LANG
> en_US
> [henning@forge maven-xdoc-plugin-1.9.1]$ rm -rf target ; maven -q test
> [...]
> test:test:
>     [junit] Running org.apache.maven.xdoc.util.LocaleUtilTest
>     [junit] Tests run: 7, Failures: 0, Errors: 0, Time elapsed: 1.854 sec <--------- !!!!!!!!!!!!!!!!!!!
>     [junit] Running org.apache.maven.NavBeanTest
>     [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 1.567 sec
> [henning@forge maven-xdoc-plugin-1.9.1]$ export LANG=en_US.UTF-8 (this is the default on all recent Linux systems)
> [henning@forge maven-xdoc-plugin-1.9.1]$ rm -rf target; maven -q test:test
> [...]
> test:test:
>     [junit] Running org.apache.maven.xdoc.util.LocaleUtilTest
>     [junit] Tests run: 7, Failures: 1, Errors: 0, Time elapsed: 1.843 sec
>     [junit] [ERROR] TEST org.apache.maven.xdoc.util.LocaleUtilTest FAILED  <-------- !!!!!!!!!!!!!!!!!!
>     [junit] Running org.apache.maven.NavBeanTest
>     [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 1.506 sec
> Same behaviour for plugins/trunk/xdoc

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Updated: (MPXDOC-154) system locale setting makes test cases fail.

Posted by "Arnaud Heritier (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MPXDOC-154?page=all ]

Arnaud Heritier updated MPXDOC-154:
-----------------------------------

    Assign To:     (was: Arnaud Heritier)

> system locale setting makes test cases fail.
> --------------------------------------------
>
>          Key: MPXDOC-154
>          URL: http://jira.codehaus.org/browse/MPXDOC-154
>      Project: maven-xdoc-plugin
>         Type: Bug
>     Versions: 1.9.1
>  Environment: java version "1.4.2_08"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_08-b03)
> Java HotSpot(TM) Client VM (build 1.4.2_08-b03, mixed mode)
> Fedora Core 3 x86
>     Reporter: Henning Schmiedehausen

>
>
> [henning@forge maven-xdoc-plugin-1.9.1]$ echo $LANG
> en_US
> [henning@forge maven-xdoc-plugin-1.9.1]$ rm -rf target ; maven -q test
> [...]
> test:test:
>     [junit] Running org.apache.maven.xdoc.util.LocaleUtilTest
>     [junit] Tests run: 7, Failures: 0, Errors: 0, Time elapsed: 1.854 sec <--------- !!!!!!!!!!!!!!!!!!!
>     [junit] Running org.apache.maven.NavBeanTest
>     [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 1.567 sec
> [henning@forge maven-xdoc-plugin-1.9.1]$ export LANG=en_US.UTF-8 (this is the default on all recent Linux systems)
> [henning@forge maven-xdoc-plugin-1.9.1]$ rm -rf target; maven -q test:test
> [...]
> test:test:
>     [junit] Running org.apache.maven.xdoc.util.LocaleUtilTest
>     [junit] Tests run: 7, Failures: 1, Errors: 0, Time elapsed: 1.843 sec
>     [junit] [ERROR] TEST org.apache.maven.xdoc.util.LocaleUtilTest FAILED  <-------- !!!!!!!!!!!!!!!!!!
>     [junit] Running org.apache.maven.NavBeanTest
>     [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 1.506 sec
> Same behaviour for plugins/trunk/xdoc

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Closed: (MPXDOC-154) system locale setting makes test cases fail.

Posted by "Arnaud Heritier (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MPXDOC-154?page=all ]
     
Arnaud Heritier closed MPXDOC-154:
----------------------------------

    Resolution: Fixed

> system locale setting makes test cases fail.
> --------------------------------------------
>
>          Key: MPXDOC-154
>          URL: http://jira.codehaus.org/browse/MPXDOC-154
>      Project: maven-xdoc-plugin
>         Type: Bug
>     Versions: 1.9.1
>  Environment: java version "1.4.2_08"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_08-b03)
> Java HotSpot(TM) Client VM (build 1.4.2_08-b03, mixed mode)
> Fedora Core 3 x86
>     Reporter: Henning Schmiedehausen
>     Assignee: Arnaud Heritier
>      Fix For: 1.9.2
>  Attachments: MPXDOC-154.patch
>
>
> [henning@forge maven-xdoc-plugin-1.9.1]$ echo $LANG
> en_US
> [henning@forge maven-xdoc-plugin-1.9.1]$ rm -rf target ; maven -q test
> [...]
> test:test:
>     [junit] Running org.apache.maven.xdoc.util.LocaleUtilTest
>     [junit] Tests run: 7, Failures: 0, Errors: 0, Time elapsed: 1.854 sec <--------- !!!!!!!!!!!!!!!!!!!
>     [junit] Running org.apache.maven.NavBeanTest
>     [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 1.567 sec
> [henning@forge maven-xdoc-plugin-1.9.1]$ export LANG=en_US.UTF-8 (this is the default on all recent Linux systems)
> [henning@forge maven-xdoc-plugin-1.9.1]$ rm -rf target; maven -q test:test
> [...]
> test:test:
>     [junit] Running org.apache.maven.xdoc.util.LocaleUtilTest
>     [junit] Tests run: 7, Failures: 1, Errors: 0, Time elapsed: 1.843 sec
>     [junit] [ERROR] TEST org.apache.maven.xdoc.util.LocaleUtilTest FAILED  <-------- !!!!!!!!!!!!!!!!!!
>     [junit] Running org.apache.maven.NavBeanTest
>     [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 1.506 sec
> Same behaviour for plugins/trunk/xdoc

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: [jira] Commented: (MPXDOC-154) system locale setting makes test cases fail.

Posted by "Henning P. Schmiedehausen" <hp...@intermeta.de>.
Vincent Siveton <vi...@gmail.com> writes:

+1 for this. I'd prefer to set the encoding to ISO-8859-1 or US-ASCII
because IMHO it reflects the reality better.

	Regards
		Henning


>Hi guys,

>I am running java on Mandrake 10.1 (fr_CA).

>Personally, I prefer Juan solution. 

>On my system, by adding the following parameter, the build fails :
>+++ project.properties
>+maven.compile.encoding=UTF-8
>=> Failed

>So, I propose here a mixed solution to be safe [1]:
>+++ src/test/org/apache/maven/xdoc/util/LocaleUtilTest.java
>-    assertEquals(result, "Fran�ais");
>+    assertEquals(result, "Fran\u00e7ais");

>+++ project.properties
>+maven.compile.encoding=UTF-8
>=> Success

>Thoughts?

>Cheers,

>Vincent

>[1] Let's see http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/javac.html#options
>"-encoding encoding 
>Set the source file encoding name, such as EUCJIS/SJIS. If -encoding
>is not specified, the platform default converter is used. "



>2005/9/2, Juan F. Codagnone <ju...@users.sourceforge.net>:
>> 
>> On Thursday 01 September 2005 21:25, Lukas Theussl wrote:
>> ...
>> > Can you guys confirm that this still works for you?
>> 
>> yeap, that fixes the problem. The other solution that works, is telling the
>> compiler that these java classes are written en latin1:
>> 
>> Index: project.properties
>> ===================================================================
>> --- project.properties  (revision 266297)
>> +++ project.properties  (working copy)
>> @@ -18,3 +18,4 @@
>>  # P R O J E C T  P R O P E R T I E S
>>  # -------------------------------------------------------------------
>>  maven.junit.fork=yes
>> +maven.compile.encoding=ISO-8859-1
>> 
>> 
>> Regards,
>>     Juan.
>> 
>> pd. first post!
>> 
>> --
>> Buenos Aires, Argentina                          8�C with winds at 24 km/h SSW
>> 
>> 
>>

>---------------------------------------------------------------------
>To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>For additional commands, e-mail: dev-help@maven.apache.org


-- 
Dipl.-Inf. (Univ.) Henning P. Schmiedehausen          INTERMETA GmbH
hps@intermeta.de        +49 9131 50 654 0   http://www.intermeta.de/

RedHat Certified Engineer -- Jakarta Turbine Development  -- hero for hire
   Linux, Java, perl, Solaris -- Consulting, Training, Development

		      4 - 8 - 15 - 16 - 23 - 42

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: [jira] Commented: (MPXDOC-154) system locale setting makes test cases fail.

Posted by Vincent Siveton <vi...@gmail.com>.
Hi guys,

I am running java on Mandrake 10.1 (fr_CA).

Personally, I prefer Juan solution. 

On my system, by adding the following parameter, the build fails :
+++ project.properties
+maven.compile.encoding=UTF-8
=> Failed

So, I propose here a mixed solution to be safe [1]:
+++ src/test/org/apache/maven/xdoc/util/LocaleUtilTest.java
-    assertEquals(result, "Français");
+    assertEquals(result, "Fran\u00e7ais");

+++ project.properties
+maven.compile.encoding=UTF-8
=> Success

Thoughts?

Cheers,

Vincent

[1] Let's see http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/javac.html#options
"-encoding encoding 
Set the source file encoding name, such as EUCJIS/SJIS. If -encoding
is not specified, the platform default converter is used. "



2005/9/2, Juan F. Codagnone <ju...@users.sourceforge.net>:
> 
> On Thursday 01 September 2005 21:25, Lukas Theussl wrote:
> ...
> > Can you guys confirm that this still works for you?
> 
> yeap, that fixes the problem. The other solution that works, is telling the
> compiler that these java classes are written en latin1:
> 
> Index: project.properties
> ===================================================================
> --- project.properties  (revision 266297)
> +++ project.properties  (working copy)
> @@ -18,3 +18,4 @@
>  # P R O J E C T  P R O P E R T I E S
>  # -------------------------------------------------------------------
>  maven.junit.fork=yes
> +maven.compile.encoding=ISO-8859-1
> 
> 
> Regards,
>     Juan.
> 
> pd. first post!
> 
> --
> Buenos Aires, Argentina                          8°C with winds at 24 km/h SSW
> 
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: [jira] Commented: (MPXDOC-154) system locale setting makes test cases fail.

Posted by "Juan F. Codagnone" <ju...@users.sourceforge.net>.
On Thursday 01 September 2005 21:25, Lukas Theussl wrote:
...
> Can you guys confirm that this still works for you?

yeap, that fixes the problem. The other solution that works, is telling the 
compiler that these java classes are written en latin1:

Index: project.properties
===================================================================
--- project.properties  (revision 266297)
+++ project.properties  (working copy)
@@ -18,3 +18,4 @@
 # P R O J E C T  P R O P E R T I E S
 # -------------------------------------------------------------------
 maven.junit.fork=yes
+maven.compile.encoding=ISO-8859-1


Regards,
     Juan.

pd. first post!

-- 
Buenos Aires, Argentina                          8°C with winds at 24 km/h SSW

Re: [jira] Commented: (MPXDOC-154) system locale setting makes test

Posted by "Henning P. Schmiedehausen" <hp...@intermeta.de>.
Lukas Theussl <th...@triumf.ca> writes:

>    String expect = "Fran�ais";

IMHO you are barking at the wrong tree.

As long as you have non-US-ASCII characters in the Java source code,
all bets are off. The compiler interprets the contents of the source
file according to its own language preferences. man javac(1), look for
"-encoding".

Just work around this by adding

maven.compile.encoding = ISO-8859-1

to the project.properties. Trying to second guess the platform
encoding will lead you nowhere.

Without this line, the tests still fail. Using UTF-8 locale, Java tries
to interpret the c-cedille as Unicode and the match fails.

You will still put a "gotcha" in. If someone opens the source code
file with an unicode based editor, the character will be unreadable
and if he changes it to a correct UTF-8 c-cedille (can you spell
emacs?), then the tests will fail _again_. So replace the c-cedille
with a \xxx sequence. Can't tell you the right value from the top of
my head, though.

This is what we got for not making UTF-8 compatible to ISO-8859-1. 

	Regards
		Henning

>    String result = LocaleUtil.displayName(locale, locale);
>    try { // Convert from Unicode to UTF-8
>        String string = "Fran\u00e7ais";
>        byte[] utf8 = string.getBytes("UTF-8");
>        expect = new String(utf8, "UTF-8");
>    } catch (UnsupportedEncodingException e) {
>    }
>    assertEquals(result, expect);
>  }

>Can you guys confirm that this still works for you?

>- Lukas

>---------------------------------------------------------------------
>To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>For additional commands, e-mail: dev-help@maven.apache.org

-- 
Dipl.-Inf. (Univ.) Henning P. Schmiedehausen          INTERMETA GmbH
hps@intermeta.de        +49 9131 50 654 0   http://www.intermeta.de/

RedHat Certified Engineer -- Jakarta Turbine Development  -- hero for hire
   Linux, Java, perl, Solaris -- Consulting, Training, Development

		      4 - 8 - 15 - 16 - 23 - 42

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: [jira] Commented: (MPXDOC-154) system locale setting makes test cases fail.

Posted by Lukas Theussl <th...@triumf.ca>.
I seem to have solved the problem by replacing the cedilla by its 
unicode representation. Here's the testDisplayName() method in 
LocaleUtilTest.java:

  public void testDisplayName() {
    Locale locale = new Locale("fr");
    String expect = "Français";
    String result = LocaleUtil.displayName(locale, locale);
    try { // Convert from Unicode to UTF-8
        String string = "Fran\u00e7ais";
        byte[] utf8 = string.getBytes("UTF-8");
        expect = new String(utf8, "UTF-8");
    } catch (UnsupportedEncodingException e) {
    }
    assertEquals(result, expect);
  }

Can you guys confirm that this still works for you?

- Lukas

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: [jira] Commented: (MPXDOC-154) system locale setting makes test cases fail.

Posted by Lukas Theussl <th...@triumf.ca>.
You mean you can't reproduce Henning's original case either? I just 
tried again, the problem is still the same. Which locale are you in, en_US?

The problem comes from the testDisplayName() method in 
LocaleUtilTest.java. The cedilla in "Français" is sometimes correct and 
sometimes not.
Maybe an OS issue or a Java issue?

- Lukas

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Commented: (MPXDOC-154) system locale setting makes test cases fail.

Posted by "Vincent Siveton (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MPXDOC-154?page=comments#action_45653 ] 

Vincent Siveton commented on MPXDOC-154:
----------------------------------------

Lukas,
I tried your test suites on Mandrake 10.1 (with java 1.4.2_04-b05) and all commands were successful.
I can't reproduce the test case failure on my system.

HTH

> system locale setting makes test cases fail.
> --------------------------------------------
>
>          Key: MPXDOC-154
>          URL: http://jira.codehaus.org/browse/MPXDOC-154
>      Project: maven-xdoc-plugin
>         Type: Bug
>     Versions: 1.9.1
>  Environment: java version "1.4.2_08"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_08-b03)
> Java HotSpot(TM) Client VM (build 1.4.2_08-b03, mixed mode)
> Fedora Core 3 x86
>     Reporter: Henning Schmiedehausen

>
>
> [henning@forge maven-xdoc-plugin-1.9.1]$ echo $LANG
> en_US
> [henning@forge maven-xdoc-plugin-1.9.1]$ rm -rf target ; maven -q test
> [...]
> test:test:
>     [junit] Running org.apache.maven.xdoc.util.LocaleUtilTest
>     [junit] Tests run: 7, Failures: 0, Errors: 0, Time elapsed: 1.854 sec <--------- !!!!!!!!!!!!!!!!!!!
>     [junit] Running org.apache.maven.NavBeanTest
>     [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 1.567 sec
> [henning@forge maven-xdoc-plugin-1.9.1]$ export LANG=en_US.UTF-8 (this is the default on all recent Linux systems)
> [henning@forge maven-xdoc-plugin-1.9.1]$ rm -rf target; maven -q test:test
> [...]
> test:test:
>     [junit] Running org.apache.maven.xdoc.util.LocaleUtilTest
>     [junit] Tests run: 7, Failures: 1, Errors: 0, Time elapsed: 1.843 sec
>     [junit] [ERROR] TEST org.apache.maven.xdoc.util.LocaleUtilTest FAILED  <-------- !!!!!!!!!!!!!!!!!!
>     [junit] Running org.apache.maven.NavBeanTest
>     [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 1.506 sec
> Same behaviour for plugins/trunk/xdoc

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Updated: (MPXDOC-154) system locale setting makes test cases fail.

Posted by "Lukas Theussl (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MPXDOC-154?page=all ]

Lukas Theussl updated MPXDOC-154:
---------------------------------

    Fix Version: 1.9.2

> system locale setting makes test cases fail.
> --------------------------------------------
>
>          Key: MPXDOC-154
>          URL: http://jira.codehaus.org/browse/MPXDOC-154
>      Project: maven-xdoc-plugin
>         Type: Bug
>     Versions: 1.9.1
>  Environment: java version "1.4.2_08"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_08-b03)
> Java HotSpot(TM) Client VM (build 1.4.2_08-b03, mixed mode)
> Fedora Core 3 x86
>     Reporter: Henning Schmiedehausen
>      Fix For: 1.9.2

>
>
> [henning@forge maven-xdoc-plugin-1.9.1]$ echo $LANG
> en_US
> [henning@forge maven-xdoc-plugin-1.9.1]$ rm -rf target ; maven -q test
> [...]
> test:test:
>     [junit] Running org.apache.maven.xdoc.util.LocaleUtilTest
>     [junit] Tests run: 7, Failures: 0, Errors: 0, Time elapsed: 1.854 sec <--------- !!!!!!!!!!!!!!!!!!!
>     [junit] Running org.apache.maven.NavBeanTest
>     [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 1.567 sec
> [henning@forge maven-xdoc-plugin-1.9.1]$ export LANG=en_US.UTF-8 (this is the default on all recent Linux systems)
> [henning@forge maven-xdoc-plugin-1.9.1]$ rm -rf target; maven -q test:test
> [...]
> test:test:
>     [junit] Running org.apache.maven.xdoc.util.LocaleUtilTest
>     [junit] Tests run: 7, Failures: 1, Errors: 0, Time elapsed: 1.843 sec
>     [junit] [ERROR] TEST org.apache.maven.xdoc.util.LocaleUtilTest FAILED  <-------- !!!!!!!!!!!!!!!!!!
>     [junit] Running org.apache.maven.NavBeanTest
>     [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 1.506 sec
> Same behaviour for plugins/trunk/xdoc

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Commented: (MPXDOC-154) system locale setting makes test cases fail.

Posted by "Lukas Theussl (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MPXDOC-154?page=comments#action_45364 ] 

Lukas Theussl commented on MPXDOC-154:
--------------------------------------

I tried with a few projects of mine and I can't reproduce this. Can you attach a test case?

> system locale setting makes test cases fail.
> --------------------------------------------
>
>          Key: MPXDOC-154
>          URL: http://jira.codehaus.org/browse/MPXDOC-154
>      Project: maven-xdoc-plugin
>         Type: Bug
>     Versions: 1.9.1
>  Environment: java version "1.4.2_08"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_08-b03)
> Java HotSpot(TM) Client VM (build 1.4.2_08-b03, mixed mode)
> Fedora Core 3 x86
>     Reporter: Henning Schmiedehausen

>
>
> [henning@forge maven-xdoc-plugin-1.9.1]$ echo $LANG
> en_US
> [henning@forge maven-xdoc-plugin-1.9.1]$ rm -rf target ; maven -q test
> [...]
> test:test:
>     [junit] Running org.apache.maven.xdoc.util.LocaleUtilTest
>     [junit] Tests run: 7, Failures: 0, Errors: 0, Time elapsed: 1.854 sec <--------- !!!!!!!!!!!!!!!!!!!
>     [junit] Running org.apache.maven.NavBeanTest
>     [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 1.567 sec
> [henning@forge maven-xdoc-plugin-1.9.1]$ export LANG=en_US.UTF-8 (this is the default on all recent Linux systems)
> [henning@forge maven-xdoc-plugin-1.9.1]$ rm -rf target; maven -q test:test
> [...]
> test:test:
>     [junit] Running org.apache.maven.xdoc.util.LocaleUtilTest
>     [junit] Tests run: 7, Failures: 1, Errors: 0, Time elapsed: 1.843 sec
>     [junit] [ERROR] TEST org.apache.maven.xdoc.util.LocaleUtilTest FAILED  <-------- !!!!!!!!!!!!!!!!!!
>     [junit] Running org.apache.maven.NavBeanTest
>     [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 1.506 sec
> Same behaviour for plugins/trunk/xdoc

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org