This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 156204 - I18N - maven project with multibyte in project name or path does not get created completely yet shows in explorer
Summary: I18N - maven project with multibyte in project name or path does not get crea...
Status: VERIFIED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Maven (show other bugs)
Version: 6.x
Hardware: Sun All
: P2 blocker (vote)
Assignee: David Simonek
URL:
Keywords: I18N
Depends on:
Blocks:
 
Reported: 2008-12-31 17:53 UTC by Ken Frank
Modified: 2009-06-09 16:01 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
image (180.93 KB, image/gif)
2008-12-31 18:05 UTC, Ken Frank
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ken Frank 2008-12-31 17:53:56 UTC
am on solaris, ja locale.
create a new quickstart maven project - project name has ja characters in it, which means path to it has ja characters
since project name becomes part of path.

1. in explorer, project shows but project name is seen as
<Badly formed Maven project> unknown

a. this message is not from bundle file, please add it

2. expanding the project does not show all files as would be seen if project created without ja chars in proj name


3. pom.xml shows the project name incorrectly with garbage ascii characters, probably since the encoding handling for
reading it not correct - although nb was started in ja locale and maven should be using that encoding itself.

4. some action like clean and build (run is inactive in explorer menu for this project)
shows errors about finding the project location

[ERROR]The following POM validation errors were detected:
[ERROR] - 'artifactId' with value '����Jon��mavenproject2���' does not match a valid id pattern.
[ERROR]Project Id: com.mycompany:����Jon��mavenproject2���:jar:1.0-SNAPSHOT
[ERROR]From file: /home/kenf/NetBeansProjects/と粮Jon粮mavenproject2粤ろ/pom.xml
------------------------------------------------------------------------
For more information, run with the -e flag
------------------------------------------------------------------------
 + Ignoring build failures


===> question here are

a. is it valid for maven projects to have non ascii in project name or path -- for nb java projects it is.
if its valid, then this issue can be valid, otherwise perhaps warning in project wizard or not allowing to proceed
unless ascii only ?

b. can java, jsp, etc files in maven project use non ascii in strings or other data - for nb java projects it is ok.
(that is, its ok with java language)
Comment 1 Ken Frank 2008-12-31 18:05:33 UTC
Created attachment 75386 [details]
image
Comment 2 Ken Frank 2008-12-31 18:06:31 UTC
attached gif shows the incorrect multibyte in pom and output window
Comment 3 Milos Kleint 2009-01-05 14:01:30 UTC
1. will do.

2. result of a failed loading of the project, related to the other issues you see

3. the garbled chars were probably written by the 3rd party tool that generates the project. But that's just a speculation.

4. I'm wondering if execution on the command line (mvn install) performs correctly or not. My suspicion is that due to
the wrong pom.xml write during project generation, the project file (pom.xml file) is broken, therefore the project is
unbuildable. 
to run on command line just paste this to the console (with the proper changes to the -DartifactId=mavenproject146 property)
mvn -DarchetypeVersion=1.0 -Darchetype.interactive=false -DgroupId=com.mycompany
-DarchetypeArtifactId=maven-archetype-quickstart -Dversion=1.0-SNAPSHOT -DarchetypeGroupId=org.apache.maven.archetypes
-Dbasedir=/Users/mkleint/NetBeansProjects -Dpackage=com.mycompany.mavenproject146 -DartifactId=mavenproject146
--batch-mode org.apache.maven.plugins:maven-archetype-plugin:2.0-alpha-3:generate


Disabled run is correct.

4.a I'm not really sure if the multibytes in pom.xml and path are supported by the tool. if the command line execution
works, I'd say it does support it, but I think it probably doesn't. We should then warn people about the use of such
chars indeed. Then it's not only about the creation wizard but any UI that writes to the pom.
as #153108 shows, even an ampersand in the pom.xml file can pose a problem.


4.b. related to the $156203 issue. If the maven plugin that handles the given sources is properly configured, then any
encoding can be used AFAIK.
Comment 4 Ken Frank 2009-01-05 16:26:43 UTC
this makes sense that we can warn user or otherwise implement so no non basic ascii is
allowed in path or project name or pom name, since if its restriction or rule
of maven, then we must follow that.

ken.frank@sun.com
Comment 5 Milos Kleint 2009-02-04 11:11:56 UTC
issue 1. is fixed now, the broken project label comes from bundle now.
Comment 6 David Simonek 2009-02-13 14:41:10 UTC
I checked command line Maven and discovered that it *can't* handle multibyte characters currently.
Therefore, proper fix is to not allow users to enter project name containing multibyte chars during project creation.

fixed: 740c8f636cc5
Comment 7 Quality Engineering 2009-02-18 10:38:31 UTC
Integrated into 'main-golden', will be available in build *200902180201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/740c8f636cc5
User: Dafe Simonek <dsimonek@netbeans.org>
Log: #156204: added check preventing entering of multibyte characters, which are not acceptable for Maven
Comment 8 Jaroslav Pospisil 2009-06-09 16:01:21 UTC
v.