Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 159066 - space is evil in project name or artifactId.
space is evil in project name or artifactId.
Status: VERIFIED FIXED
Product: javaee
Classification: Unclassified
Component: Maven
6.x
All All
: P2 (vote)
: 6.x
Assigned To: David Simonek
issues@platform
:
Depends on: 165781
Blocks: 152418
  Show dependency treegraph
 
Reported: 2009-02-24 15:14 UTC by Jaroslav Pospisil
Modified: 2009-06-09 13:25 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jaroslav Pospisil 2009-02-24 15:14:13 UTC
Create new Maven Web Application and change its name to Maven Project. It's created as <Badly formed Maven project>.
It's unacceptable,we should either add context control to stop user from creating project with space in name or help
somehow to fix the name problem automatically,to create valid project even in this case.
Comment 1 Milos Kleint 2009-03-19 10:54:30 UTC
the rename project dialog and complete renaming logic is not accessible from  maven support codebase, aq fix would
require a big rewrite of the project operations infrastructure and UI. -> next
Comment 2 Milos Kleint 2009-03-19 10:55:20 UTC
a possible solution for 6.7 would include removing all or some of the the project manipulating actions. like rename,
move, delete, copy.
Comment 3 Jaroslav Pospisil 2009-05-14 14:31:48 UTC
NOTICE: If you create Maven Web Application with "Maven Project" project name, build completely fails. Leaving target
milestone on next,but raising priority to P2.
Comment 4 Milos Kleint 2009-05-15 09:23:45 UTC
I see. I've confused the issue with rename project dialog, but it's about the project creation wizard

dafe, can you just kick out the space from the wizards, like you did with multibyte characters? Thanks.
Comment 5 David Simonek 2009-05-15 09:47:47 UTC
sure
Comment 6 Jaroslav Pospisil 2009-05-20 16:33:51 UTC
I don'think this is restricted to new project wizard - there's different problems also when renaming project or changing
its name through properties and the problem is quite serious.I suggest to add context control to all this three cases,at
least for spaces, which are doing most damage.
Comment 7 Jaroslav Pospisil 2009-05-20 16:36:59 UTC
*** Issue 152418 has been marked as a duplicate of this issue. ***
Comment 8 Jesse Glick 2009-05-21 14:31:48 UTC
The <name> can contain spaces. I guess the problem is the <artifactId>? IMHO this should never be changed simply as a
result of using Rename Project; you should have to change it explicitly in project properties, where the maven module
can exercise full control.
Comment 9 David Simonek 2009-05-21 15:11:35 UTC
Yes jesse, problem is in artifactId and groupId, these coordinates can't contain spaces, some characters breaking xml
syntax and also multibyte chars like chinese. I'm going to check all these in project creation wizards and maven project
properties and I'll try to change Project/Rename... to not change artifactId.
Comment 10 David Simonek 2009-05-21 15:45:49 UTC
Well, I found that Project/Rename... doesn't touch artifactId and changes just name, which is OK.

fixed: c0fcccad02d1
Comment 11 Jesse Glick 2009-05-21 20:23:28 UTC
BTW I tried to rename a (POM) project today. Worked poorly:


1. The suffix " (pom)" was included in the dialog. Not knowing what to do, I left it in when typing in the new name,
which resulted in <name>New Name (pom)</name> in pom.xml and "New Name (pom) (pom)" in the Projects tab. Had to Rename
again, deleting " (pom) (pom)" from the resulting dialog.

Anyway I have to say I have always strongly disliked the inclusion of the packaging string in the project's display
name. You should rather pick an icon according to well-known packaging types (Java Cup for 'jar', world for 'war',
etc.), with a default Maven icon for unknown packaging types or 'pom' packaging, and leave the packaging type (along
with disk location etc.) in the tooltip.


2. An Output Window tab "Deleting Project" appeared. Rather alarming. No output shown in it and bold title never
disappeared. Correct change made on disk but Projects tab showed two copies of the project, with old and new titles. May
have been side effects of an uncaught exception which I hear was recently fixed.
Comment 12 Quality Engineering 2009-05-22 07:23:28 UTC
Integrated into 'main-golden', will be available in build *200905220201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/c0fcccad02d1
User: Dafe Simonek <dsimonek@netbeans.org>
Log: #159066: Refuse artifactId or groupId which contain not allowed characters
Comment 13 Jaroslav Pospisil 2009-06-09 13:25:18 UTC
v.


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo