}
LOG.debug("Beginning processing submodules in "+moduleDescriptor);
for (Iterator i = subModules.iterator(); i.hasNext();)
{
SubModuleDescriptor smd = (SubModuleDescriptor) i.next();
Resource descriptorResource = smd.getDescriptor();
String path = descriptorResource.getPath();
int classpathPos = path.indexOf(CLASSPATH);
if (classpathPos>=0) {
// java's current directory is prepended to "classpath://" so that needs to be stripped off as well
// i.e. Users/patmoore/projects/amplafi-foundation/target/test-classes/classpath://amplafi-mock.tapestry4.xml
path = path.substring(classpathPos + CLASSPATH.length());
List<Resource> descriptorResources = getDescriptorResources(path, _resolver);
if ( descriptorResources== null || descriptorResources.isEmpty()) {
_errorHandler.error(
LOG, "classpathCannotFindsubModule:"+ path,
smd.getLocation(),
null);
continue;
} else if ( descriptorResources.size() > 1) {
_errorHandler.error(LOG, "WARNING:"+path+" multiple locations found "+descriptorResources, smd.getLocation(), null);
}
descriptorResource = descriptorResources.get(0);
}
if (descriptorResource.getResourceURL() == null)
{
_errorHandler.error(
LOG,
"subModuleDoesNotExist:" + descriptorResource,
smd.getLocation(),
null);
continue;
}
LOG.debug("processing submodule "+descriptorResource);
processResource(descriptorResource);