jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • mevenide
  • MEVENIDE-449

Mevenide plugin stumbels upon non ASCII characters in the path to the .m2 directory

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: NB_2.2
  • Fix Version/s: NB_2.3
  • Component/s: mevenide2-netbeans
  • Labels:
    None
  • Environment:
    NetBeans 5.5 Beta2 and newest Mevenide modules from the Mevenide Update Center

Description

Hello,

I have a German Windows XP installation and my domain user name is Wellhöfer. Therefore the path to my .m2 directory is:

C:\Dokumente und Einstellungen\Wellhöfer\.m2

I correctly set the path under Tools->Options->Miscellaneous->Maven2->"Local Repository", but unfortunately the Mevenide module stumbles upon the ö in the path. The next time I open the options panel I see that this is the used path:

C:\Dokumente und Einstellungen\Wellhöfer\.m2

  • Options
    • Sort By Name
    • Sort By Date
    • Ascending
    • Descending
    • Download All

Attachments

  1. XML File
    settings.xml
    09/Oct/06 7:21 AM
    0.4 kB
    Joe Cool
  2. XML File
    settings.xml
    09/Oct/06 7:15 AM
    0.4 kB
    Joe Cool

Issue Links

depends upon

Improvement - An improvement or enhancement to an existing feature or task. MNG-2255 Use a external XML Pull parser instead of plexus one

  • Critical - Crashes, loss of data, severe memory leak.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.
is related to

Bug - A problem which impairs or prevents the functions of the product. MNG-2593 Maven 2 stumbels upon non ASCII characters in the value of a <localRepository> value in the $HOME/.m2/settings.xml

  • Blocker - Blocks development and/or testing work, production could not run
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.
relates to

Bug - A problem which impairs or prevents the functions of the product. PLXUTILS-11 MXParser can't handle the encoding declaration in XML declaration

  • Major - Major loss of function.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Milos Kleint added a comment - 01/Oct/06 7:25 AM

what is your system locale?
(to be found in netbeans About box (menu item Help/About)

Show
Milos Kleint added a comment - 01/Oct/06 7:25 AM what is your system locale? (to be found in netbeans About box (menu item Help/About)
Hide
Permalink
Joe Cool added a comment - 01/Oct/06 1:39 PM

my locale is de_DE (nb).

Show
Joe Cool added a comment - 01/Oct/06 1:39 PM my locale is de_DE (nb).
Hide
Permalink
Milos Kleint added a comment - 04/Oct/06 2:47 PM

changed the code to always write in UTF-8 when doing automatic updates to pom.xml or settings.xml files. That should help, but I have just an english version on all my machines.
Also have no idea in what encoding would netbeans editor save the file if edited manually.

Show
Milos Kleint added a comment - 04/Oct/06 2:47 PM changed the code to always write in UTF-8 when doing automatic updates to pom.xml or settings.xml files. That should help, but I have just an english version on all my machines. Also have no idea in what encoding would netbeans editor save the file if edited manually.
Hide
Permalink
Joe Cool added a comment - 04/Oct/06 3:27 PM

Do I miss something? Each XML document defines the encoding that has to be used. You should use this encoding.

Show
Joe Cool added a comment - 04/Oct/06 3:27 PM Do I miss something? Each XML document defines the encoding that has to be used. You should use this encoding.
Hide
Permalink
Milos Kleint added a comment - 05/Oct/06 2:00 AM

I'm using jdom for writing the documents. My idea was that it was not properly writing the document because it was usign the default encoding. However after reading http://jdom.org/docs/faq.html#a0330 it seems it's doing the opposite and the code before and after the change does exactly the same. It seems that the sax parser gets the encoding right, but never passes that information to the jdom's xml outputter that does the writing. So a correct solution seems to be to read the file in memory, get the <?xml> header's encoding attribute if available and set to to the jdom outputtter.. correct?

Show
Milos Kleint added a comment - 05/Oct/06 2:00 AM I'm using jdom for writing the documents. My idea was that it was not properly writing the document because it was usign the default encoding. However after reading http://jdom.org/docs/faq.html#a0330 it seems it's doing the opposite and the code before and after the change does exactly the same. It seems that the sax parser gets the encoding right, but never passes that information to the jdom's xml outputter that does the writing. So a correct solution seems to be to read the file in memory, get the <?xml> header's encoding attribute if available and set to to the jdom outputtter.. correct?
Hide
Permalink
Joe Cool added a comment - 06/Oct/06 2:04 AM

I just detected that the mvn command line client also makes the same mistake. When my "C:\Dokumente und Einstellungen\Wellhöfer\.m2\settings.xml" file contains the line

<localRepository>C:\Dokumente und Einstellungen\Wellhöfer\.m2</localRepository>

and I start to build your mevenide code with "mvn install nbm:cluster" in a dos command box, the mvn client starts to download a lot of artifacts. But it does not but the downloaded artifacts under "C:\Dokumente und Einstellungen\Wellhöfer\.m2", it creates a folder "C:\Dokumente und Einstellungen\Wellhöfer\.m2" and puts the artifacts into this folder.

When I remove the line

<localRepository>C:\Dokumente und Einstellungen\Wellhöfer\.m2</localRepository>

from settings.xml the artifacts are put into the correct directory.

IMHO this is a prove that the issue is not in mevenide. Can you point me to the correct maven plugin that makes the mistale? I will then file a bug for this plugin.

Show
Joe Cool added a comment - 06/Oct/06 2:04 AM I just detected that the mvn command line client also makes the same mistake. When my "C:\Dokumente und Einstellungen\Wellhöfer\.m2\settings.xml" file contains the line <localRepository>C:\Dokumente und Einstellungen\Wellhöfer\.m2</localRepository> and I start to build your mevenide code with "mvn install nbm:cluster" in a dos command box, the mvn client starts to download a lot of artifacts. But it does not but the downloaded artifacts under "C:\Dokumente und Einstellungen\Wellhöfer\.m2", it creates a folder "C:\Dokumente und Einstellungen\Wellhöfer\.m2" and puts the artifacts into this folder. When I remove the line <localRepository>C:\Dokumente und Einstellungen\Wellhöfer\.m2</localRepository> from settings.xml the artifacts are put into the correct directory. IMHO this is a prove that the issue is not in mevenide. Can you point me to the correct maven plugin that makes the mistale? I will then file a bug for this plugin.
Hide
Permalink
Joe Cool added a comment - 06/Oct/06 8:31 AM

I filed http://jira.codehaus.org/browse/MNG-2593 for Maven2.

Show
Joe Cool added a comment - 06/Oct/06 8:31 AM I filed http://jira.codehaus.org/browse/MNG-2593 for Maven2.
Hide
Permalink
Milos Kleint added a comment - 06/Oct/06 10:48 AM

Bernhard, can you please attach your correct settings file? I mean one that doensn't have the characters messed up.. thanks.

Show
Milos Kleint added a comment - 06/Oct/06 10:48 AM Bernhard, can you please attach your correct settings file? I mean one that doensn't have the characters messed up.. thanks.
Hide
Permalink
Milos Kleint added a comment - 06/Oct/06 12:30 PM

I have committed another patch. This time, when writing I get the encoding from model. From my experiments, it seems to work fine if the xml file has the <?xml version="1.0" encoding="ISO-8859-1"?> header. if no such header is present, UTF-8 is assumed.
It also seemed to me that the file gets read correctly by maven..

Show
Milos Kleint added a comment - 06/Oct/06 12:30 PM I have committed another patch. This time, when writing I get the encoding from model. From my experiments, it seems to work fine if the xml file has the <?xml version="1.0" encoding="ISO-8859-1"?> header. if no such header is present, UTF-8 is assumed. It also seemed to me that the file gets read correctly by maven..
Hide
Permalink
Joe Cool added a comment - 09/Oct/06 7:15 AM

The settings.xml without the local repo element.

Show
Joe Cool added a comment - 09/Oct/06 7:15 AM The settings.xml without the local repo element.
Hide
Permalink
Joe Cool added a comment - 09/Oct/06 7:21 AM

The settings.xml file with the <localRepository> element.

Show
Joe Cool added a comment - 09/Oct/06 7:21 AM The settings.xml file with the <localRepository> element.
Hide
Permalink
Milos Kleint added a comment - 13/Oct/06 6:31 AM

possibly related to http://jira.codehaus.org/browse/PLX-214

Show
Milos Kleint added a comment - 13/Oct/06 6:31 AM possibly related to http://jira.codehaus.org/browse/PLX-214
Hide
Permalink
Milos Kleint added a comment - 13/Oct/06 6:33 AM

and MNG-2255

Show
Milos Kleint added a comment - 13/Oct/06 6:33 AM and MNG-2255
Hide
Permalink
Milos Kleint added a comment - 13/Oct/06 6:35 AM

the mevenide part (writing in correct encoding) is done. The problem is now on the reading part of maven I suppose (as I understood the related issues). closing as fixed.

Show
Milos Kleint added a comment - 13/Oct/06 6:35 AM the mevenide part (writing in correct encoding) is done. The problem is now on the reading part of maven I suppose (as I understood the related issues). closing as fixed.

People

  • Assignee:
    Milos Kleint
    Reporter:
    Joe Cool
Vote (0)
Watch (1)

Dates

  • Created:
    01/Sep/06 9:41 AM
    Updated:
    13/Oct/06 6:35 AM
    Resolved:
    13/Oct/06 6:35 AM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.