Maven 1.x XDoc Plugin
  1. Maven 1.x XDoc Plugin
  2. MPXDOC-154

system locale setting makes test cases fail.

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.9.1
    • Fix Version/s: 1.9.2
    • Labels:
      None
    • 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
    • Number of attachments :
      1

      Description

      [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

        Activity

        Hide
        Lukas Theussl added a comment -

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

        Show
        Lukas Theussl added a comment - I tried with a few projects of mine and I can't reproduce this. Can you attach a test case?
        Hide
        Henning Schmiedehausen added a comment -

        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.

        Show
        Henning Schmiedehausen added a comment - 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.
        Hide
        Lukas Theussl added a comment -

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

        Show
        Lukas Theussl added a comment - Sorry, I hadn't noticed you were in the xdoc plugin. I can reproduce it. Thanks!
        Hide
        Lukas Theussl added a comment -

        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)

        Show
        Lukas Theussl added a comment - 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)
        Hide
        Vincent Siveton added a comment -

        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

        Show
        Vincent Siveton added a comment - 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
        Hide
        Lukas Theussl added a comment -

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

        Show
        Lukas Theussl added a comment - Patch created after input from the dev list. With thanks to Juan F. Codagnone and Vincent Siveton.

          People

          • Assignee:
            Arnaud Heritier
            Reporter:
            Henning Schmiedehausen
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: