The JavaEEModuleInformer specifies this requirement for getModulePath():
/**
- Obtain the relative path of the deployment unit within the JavaEE application
- or base deployment directory.
- The deployment unit is either a JavaEE module or a component of the JavaEE module.
- If the JavaEE module is part of a JavaEE application return the relative
- path within the JavaEE application otherwise it is considered a stand alone deployment
- and return the relative path within the base deployment directory.
- Note that the relative path includes the module name, for example 'lib/bar.jar'.
- @param deployment the deployment unit of the module or a component
- @return the relative path of the JavaEE module
*/
String getModulePath(DeploymentUnit deploymentUnit);
However the current implementation in SimpleJavaEEModuleInformer has this:
public String getModulePath(DeploymentUnit unit)
{ return unit.getRelativePath(); }This incorrectly returns an empty string for a toplevel non-ear deployment (for ex: a standalone .war deployment).