Red Hat Bugzilla – Bug 1011563
New Project dialog allows whitespaces, business-central cannot handle them
Last modified: 2016-07-31 21:08:24 EDT
Description of problem:
You can include whitespaces in the project group id, artifact id, and version. If you do, even by mistake, it lets you finish the project creation and then presents you with an error pop-up. Field with a whitespace might even be ignored (the value wouldn't be in the pom.xml, not even it's part).
'Unable to complete your request. The following exception occurred: Bad artifact coordinates grp:test2:pom: 10.0, expected format is :[:[:]]:.'
The error pop-up appears whenever you switch to the project, try to build it..
Version-Release number of selected component (if applicable):
BPMS 6.0 ER3
The Maven pom XSLT just says GroupID, ArtifactID and Version are Strings. This however appears to be too relaxed. Could you please add some common-sense validation to the New Project Wizard. Thanks.
Now it's checking against this regex: "^[a-zA-Z0-9\\.\\-_]+$"
Just one minor copy&paste glitch - the version isn't matched against that regex. See GAVWizardPage.isComplete() - boolean validVersion = ... !gav.getArtifactId().matches("^[a-zA-Z0-9\\.\\-_]+$")
This will be addressed with https://bugzilla.redhat.com/show_bug.cgi?id=1006506