[
http://jira.jboss.com/jira/browse/JBSEAM-1514?page=comments#action_12379679 ]
Dan Allen commented on JBSEAM-1514:
-----------------------------------
This is such a simple fix and I really would like to see it added. There is a very strong
tendency for people to put spaces or hypens in the project name, and if we don't nip
right away, they end up creating a bogus project.
seam-gen should normalize project name
--------------------------------------
Key: JBSEAM-1514
URL:
http://jira.jboss.com/jira/browse/JBSEAM-1514
Project: JBoss Seam
Issue Type: Patch
Components: Tools
Affects Versions: 2.0.0.CR1
Environment: Java HotSpot(TM) Server VM (build 1.5.0_12-b04, mixed mode)
seam CVS HEAD
Reporter: Dan Allen
Fix For: 2.0.1.GA
Attachments: JBSEAM-1514-build.xml-v2.txt, JBSEAM-1514-build_xml-v1.patch,
NormalizeProjectNameTask-v1.java
Original Estimate: 15 minutes
Remaining Estimate: 15 minutes
seam-gen uses the name of the project in a lot of (dangerous) places when generating the
code and configurations. If a project created with seam-gen is going to work correctly,
this name must have "safe" characters (safe for JNDI, safe for value binding
expressions, etc). Currently, if the person using seam-gen enters a space character or a
hyphen in the name (two very standard use cases), then the resulting project will not work
correctly.
I have provided a patch that will normalize this name. It is implemented as an Ant task
that filters the name for spaces and hyphens and replaces them with underscores. It then
does a second pass to eliminate duplicate underscore characters. Granted, doing this
filtering will not honor the exact name for the project that the user provides, but then
again, what is the use if the project is broken.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira