modulename cannot contains hyphen "-" in WebAppCreator?!!

304 views
Skip to first unread message

tong123123

unread,
May 18, 2012, 4:26:24 AM5/18/12
to google-we...@googlegroups.com
WebAppCreator -maven -out test2 abc.com.a-1
return error
'abc.com.a-1' does not appear to be a valid fully-qualified java class name.

in fact, I can success copy a gwt application to maven project, but the problem is now we need the artifactid id(and so the folder name) has hyphen "-"!!
in WebAppCreator -maven-out test2 {moduleName}
the moduleName is in fact groupId + artifactid

I try to use other moduleName in WebAppCreator and then use refactor in eclipse to modify the moduleName to have "hyphen", but when build, error
--gwt-maven-plugin:2.4.0:compile (default) @ a-1
auto discovered modules [abc.com.a-1]
[ERROR] "Invalid module name: 'abc.com.a-1'


Thomas Broyer

unread,
May 18, 2012, 5:37:19 AM5/18/12
to google-we...@googlegroups.com
Yes, the module name simply cannot contain hyphens; it must be a valid Java identifier. I don't know the reason behind that choice, but that's how it works. 

Your artifactId can contain hyphens though; there's no relationship between your groupId / artifactId and your module name.
Reply all
Reply to author
Forward
0 new messages