IFacetedProject fProject = ProjectFacetsManager.create(component.getProject());
if (fProject != null) {
IProjectFacetVersion earVersion = fProject.getProjectFacetVersion(IJ2EEFacetConstants.ENTERPRISE_APPLICATION_FACET);
if (!IJ2EEFacetConstants.ENTERPRISE_APPLICATION_13.equals(earVersion)) {
String version;
boolean isJavaEE = earVersion.compareTo(IJ2EEFacetConstants.ENTERPRISE_APPLICATION_50) >= 0;
if (isJavaEE) {
// maven-ear-plugin needs version 5 instead of 5.0
version = earVersion.getVersionString().substring(0, 1);//Yuck!
if (!hasApplicationXml){
configure(earPlugin, GENERATE_APPLICATION_XML, "false"); //$NON-NLS-1$