IMavenProjectFacade facade = MavenPlugin.getMavenProjectRegistry().create(project, monitor);
RarPluginConfiguration config = new RarPluginConfiguration(facade);
String contentDir = config.getRarContentDirectory();
IProjectFacetVersion connectorFv = config.getConnectorFacetVersion();
IDataModel rarModelCfg = DataModelFactory.createDataModel(new ConnectorFacetInstallDataModelProvider());
IFolder contentFolder = project.getFolder(contentDir);
if(!facetedProject.hasProjectFacet(WTPProjectsUtil.JCA_FACET)) {
// Configuring content directory, used by WTP to create META-INF/manifest.mf, ra.xml
rarModelCfg.setProperty(IConnectorFacetInstallDataModelProperties.CONFIG_FOLDER, contentDir);
//Don't generate ra.xml by default - Setting will be ignored for JCA 1.6
rarModelCfg.setProperty(IConnectorFacetInstallDataModelProperties.GENERATE_DD, false);
rarModelCfg.setBooleanProperty(IConnectorFacetInstallDataModelProperties.ADD_TO_EAR, false);
removeConflictingFacets(facetedProject, connectorFv, actions);
actions.add(new IFacetedProject.Action(IFacetedProject.Action.Type.INSTALL, connectorFv, rarModelCfg));
} else {
IProjectFacetVersion projectFacetVersion = facetedProject.getProjectFacetVersion(WTPProjectsUtil.JCA_FACET);
if(projectFacetVersion.getVersionString() != null && !projectFacetVersion.getVersionString().equals(projectFacetVersion.getVersionString())){
removeConflictingFacets(facetedProject, connectorFv, actions);
actions.add(new IFacetedProject.Action(IFacetedProject.Action.Type.VERSION_CHANGE, connectorFv, rarModelCfg));
}