use of com.microsoft.azure.maven.webapp.handlers.WebAppPomHandler in project azure-maven-plugins by microsoft.
the class ConfigMojo method doExecute.
@Override
protected void doExecute() throws AzureExecutionException {
if (!(Utils.isJarPackagingProject(this.project.getPackaging()) || Utils.isEarPackagingProject(this.project.getPackaging()) || Utils.isWarPackagingProject(this.project.getPackaging()))) {
throw new UnsupportedOperationException(String.format("The project (%s) with packaging %s is not supported for azure app service.", this.project.getName(), this.project.getPackaging()));
}
queryer = QueryFactory.getQueryer(settings);
try {
pomHandler = new WebAppPomHandler(project.getFile().getAbsolutePath());
final WebAppConfiguration configuration = pomHandler.getConfiguration() == null ? null : getWebAppConfiguration();
if (!isV2Configuration(configuration)) {
Log.warn(CONFIG_ONLY_SUPPORT_V2);
} else {
config(configuration);
}
} catch (DocumentException | MojoFailureException | IOException | IllegalAccessException e) {
throw new AzureExecutionException(e.getMessage(), e);
} finally {
queryer.close();
}
}
Aggregations