Author: snjeza
Date: 2010-12-22 10:12:23 -0500 (Wed, 22 Dec 2010)
New Revision: 27668
Modified:
trunk/maven/plugins/org.jboss.tools.maven.cdi/src/org/jboss/tools/maven/cdi/MavenCDIActivator.java
trunk/maven/plugins/org.jboss.tools.maven.cdi/src/org/jboss/tools/maven/cdi/configurators/CDIProjectConfigurator.java
Log:
JBIDE-7944 CDI is not enabled on CDI projects like seam forge
Modified:
trunk/maven/plugins/org.jboss.tools.maven.cdi/src/org/jboss/tools/maven/cdi/MavenCDIActivator.java
===================================================================
---
trunk/maven/plugins/org.jboss.tools.maven.cdi/src/org/jboss/tools/maven/cdi/MavenCDIActivator.java 2010-12-22
14:52:15 UTC (rev 27667)
+++
trunk/maven/plugins/org.jboss.tools.maven.cdi/src/org/jboss/tools/maven/cdi/MavenCDIActivator.java 2010-12-22
15:12:23 UTC (rev 27668)
@@ -66,7 +66,7 @@
public IDataModel createCDIDataModel(IFacetedProject fproj, IProjectFacetVersion
facetVersion) {
IDataModel config = (IDataModel) new CDIFacetInstallDataModelProvider().create();
-
+ config.setBooleanProperty(CDIFacetInstallDataModelProvider.GENERATE_BEANS_XML,false);
return config;
}
Modified:
trunk/maven/plugins/org.jboss.tools.maven.cdi/src/org/jboss/tools/maven/cdi/configurators/CDIProjectConfigurator.java
===================================================================
---
trunk/maven/plugins/org.jboss.tools.maven.cdi/src/org/jboss/tools/maven/cdi/configurators/CDIProjectConfigurator.java 2010-12-22
14:52:15 UTC (rev 27667)
+++
trunk/maven/plugins/org.jboss.tools.maven.cdi/src/org/jboss/tools/maven/cdi/configurators/CDIProjectConfigurator.java 2010-12-22
15:12:23 UTC (rev 27668)
@@ -4,6 +4,7 @@
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.wst.common.componentcore.ModuleCoreNature;
import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
@@ -11,6 +12,7 @@
import org.eclipse.wst.common.project.facet.core.IProjectFacet;
import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
+import org.jboss.tools.cdi.core.CDIUtil;
import org.jboss.tools.maven.cdi.MavenCDIActivator;
import org.jboss.tools.maven.core.IJBossMavenConstants;
import
org.jboss.tools.maven.core.internal.project.facet.MavenFacetInstallDataModelProvider;
@@ -64,8 +66,10 @@
String cdiVersion = getCDIVersion(mavenProject);
if (cdiVersion != null) {
final IFacetedProject fproj = ProjectFacetsManager.create(project);
- if (fproj != null && "war".equals(packaging)) { //$NON-NLS-1$
+ if ( (fproj != null) && ("war".equals(packaging) ||
"ejb".equals(packaging)) ) { //$NON-NLS-1$
installWarFacets(fproj, cdiVersion, monitor);
+ } else {
+ CDIUtil.enableCDI(project, false, new NullProgressMonitor());
}
}
}
Show replies by date