use of org.mule.runtime.deployment.model.api.InstallException in project mule by mulesoft.
the class DefaultMuleApplication method install.
@Override
public void install() {
withContextClassLoader(null, () -> {
if (logger.isInfoEnabled()) {
logger.info(miniSplash(format("New app '%s'", descriptor.getName())));
}
});
// set even though it might be redundant, just in case the app is been redeployed
updateStatusFor(NotInLifecyclePhase.PHASE_NAME);
try {
for (String configFile : this.descriptor.getConfigResources()) {
URL configFileUrl = getArtifactClassLoader().getClassLoader().getResource(configFile);
if (configFileUrl == null) {
String message = format("Config for app '%s' not found: %s", getArtifactName(), configFile);
throw new InstallException(createStaticMessage(message));
}
}
} catch (Exception e) {
setStatusToFailed();
throw e;
}
}
Aggregations