use of org.eclipse.jst.j2ee.application.internal.operations.EARComponentExportDataModelProvider in project azure-tools-for-java by Microsoft.
the class WAExportWarEar method exportEarComponent.
/**
* This method export dependent enterprise application project as ear
* with their dependent libraries if any.
* @param projName
* @param destPath
* @throws ExecutionException
*/
public static void exportEarComponent(String projName, String destPath) throws ExecutionException {
IDataModel earModel = DataModelFactory.createDataModel(new EARComponentExportDataModelProvider());
earModel.setProperty(IEARComponentExportDataModelProperties.PROJECT_NAME, projName);
earModel.setProperty(IEARComponentExportDataModelProperties.ARCHIVE_DESTINATION, destPath);
earModel.setProperty(IEARComponentExportDataModelProperties.OVERWRITE_EXISTING, true);
try {
earModel.getDefaultOperation().execute(null, null);
} catch (org.eclipse.core.commands.ExecutionException e) {
errorMessage = String.format("%s%s%s%s%s", Messages.crtErrMsg, " ", "EAR", " of project: ", projName);
Activator.getDefault().log(errorMessage, e);
}
}
Aggregations