Result:
The prompt will not validate your value and tell you
Default value [infinispan-forge-test] is not a valid match for the given prompt type [JAVA_PACKAGE]
IMHO javaSourceFacet should return a valid base package. If using the group-id does not provide a valid package, it should mangle it to become valid or return an empty base package
1.) EXEC: create a new project:
new -project --named infinispan-forge-test
2.) EXEC: in your code now do
DirectoryResource basePackage = project.getFacet(JavaSourceFacet.class).getBasePackageResource();
3.) ASSERT: what you get back is a resource at <project source dir>/infinispan-forge-test which is not valid.
4.) EXEC: feed that to the prompt:
prompt.promptCommon(target package : ", PromptType.JAVA_PACKAGE, basePackage.toString())
Result:
The prompt will not validate your value and tell you
Default value [infinispan-forge-test] is not a valid match for the given prompt type [JAVA_PACKAGE]
IMHO javaSourceFacet should return a valid base package. If using the group-id does not provide a valid package, it should mangle it to become valid or return an empty base package