IVirtualComponent component = ComponentCore.createComponent(project, true);
//MNGECLIPSE-2279 get the context root from the final name of the project, or artifactId by default.
String contextRoot = getContextRoot(mavenProject, config.getWarName());
IProjectFacetVersion webFv = config.getWebFacetVersion(project);
IDataModel webModelCfg = getWebModelConfig(warSourceDirectory, contextRoot);
if(!facetedProject.hasProjectFacet(WebFacetUtils.WEB_FACET)) {
removeConflictingFacets(facetedProject, webFv, actions);
actions.add(new IFacetedProject.Action(IFacetedProject.Action.Type.INSTALL, webFv, webModelCfg));
} else {
IProjectFacetVersion projectFacetVersion = facetedProject.getProjectFacetVersion(WebFacetUtils.WEB_FACET);
if(webFv.getVersionString() != null && !webFv.getVersionString().equals(projectFacetVersion.getVersionString())){
actions.add(new IFacetedProject.Action(IFacetedProject.Action.Type.VERSION_CHANGE, webFv, webModelCfg));
}
}
String customWebXml = config.getCustomWebXml(project);