Author: akazakov
Date: 2008-10-17 12:40:54 -0400 (Fri, 17 Oct 2008)
New Revision: 10933
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/AntCopyUtils.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/Seam2FacetInstallDelegate.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/Seam2ProjectCreator.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetAbstractInstallDelegate.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetInstallDelegate.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamProjectCreator.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2731
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/AntCopyUtils.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/AntCopyUtils.java 2008-10-17
16:35:57 UTC (rev 10932)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/AntCopyUtils.java 2008-10-17
16:40:54 UTC (rev 10933)
@@ -189,9 +189,9 @@
}
}
- public static void copyFiles(File source, File dest, FileFilter filter) {
+ public static void copyFiles(File source, File dest, FileFilter filter, boolean
override) {
dest.mkdir();
-
+
File[] listFiles = source.listFiles(filter);
if(listFiles==null) {
throw new
IllegalArgumentException(NLS.bind(SeamCoreMessages.ANT_COPY_UTILS_COULD_NOT_FIND_FOLDER,source));
@@ -199,12 +199,16 @@
for (File file:listFiles) {
if(file.isDirectory())continue;
try {
- FileUtils.getFileUtils().copyFile(file, new File(dest,file.getName()),new
FilterSetCollection(),true);
+ FileUtils.getFileUtils().copyFile(file, new File(dest, file.getName()), new
FilterSetCollection(), override);
} catch (IOException e) {
SeamCorePlugin.getPluginLog().logError(e);
}
}
}
+
+ public static void copyFiles(File source, File dest, FileFilter filter) {
+ copyFiles(source, dest, filter, true);
+ }
public static void copyFiles(String[] files, File dest) {
copyFiles(files,dest, true);
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/Seam2FacetInstallDelegate.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/Seam2FacetInstallDelegate.java 2008-10-17
16:35:57 UTC (rev 10932)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/Seam2FacetInstallDelegate.java 2008-10-17
16:40:54 UTC (rev 10933)
@@ -13,8 +13,6 @@
import java.io.File;
import java.util.Iterator;
-import org.apache.tools.ant.types.FilterSet;
-import org.apache.tools.ant.types.FilterSetCollection;
import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
@@ -36,7 +34,17 @@
// TODO: why not just *one* global filter set to avoid any missing names ? (assert for it
in our unittests!
public class Seam2FacetInstallDelegate extends SeamFacetAbstractInstallDelegate{
- public static AntCopyUtils.FileSet JBOSS_WAR_LIB_FILESET_WAR_CONFIG = new
AntCopyUtils.FileSet()
+ public static final AntCopyUtils.FileSet JBOSS_EAR_CONTENT = new
AntCopyUtils.FileSet()
+ .include("antlr-runtime.jar") //$NON-NLS-1$
+ .include("drools-compiler.*\\.jar") //$NON-NLS-1$
+ .include("drools-core.*\\.jar") //$NON-NLS-1$
+ .include("jboss-seam.jar") //$NON-NLS-1$
+ .include("jboss-el.*.jar") //$NON-NLS-1$
+ .include("mvel.*\\.jar") //$NON-NLS-1$
+ .include("jbpm-jpdl.*\\.jar") //$NON-NLS-1$
+ .include("richfaces-api.*\\.jar"); //$NON-NLS-1$
+
+ public static final AntCopyUtils.FileSet JBOSS_WAR_LIB_FILESET_WAR_CONFIG = new
AntCopyUtils.FileSet()
.include("ajax4jsf.*\\.jar") //$NON-NLS-1$
.include("richfaces.*\\.jar")
.include("antlr-runtime.*\\.jar") //$NON-NLS-1$
@@ -63,7 +71,7 @@
.include("mvel.*\\.jar") //$NON-NLS-1$
.include("jboss-el.jar"); //$NON-NLS-1$
- public static AntCopyUtils.FileSet JBOSS_WAR_LIB_FILESET_EAR_CONFIG = new
AntCopyUtils.FileSet()
+ public static final AntCopyUtils.FileSet JBOSS_WAR_LIB_FILESET_EAR_CONFIG = new
AntCopyUtils.FileSet()
.include("richfaces-impl\\.jar") //$NON-NLS-1$
.include("richfaces-ui\\.jar") //$NON-NLS-1$
.include("commons-beanutils\\.jar") //$NON-NLS-1$
@@ -85,14 +93,7 @@
@Override
protected void doExecuteForEjb(final IProject project, IProjectFacetVersion fv,
IDataModel model, IProgressMonitor monitor) throws CoreException {
- FilterSet jdbcFilterSet = SeamFacetFilterSetFactory.createJdbcFilterSet(model);
- FilterSet projectFilterSet = SeamFacetFilterSetFactory.createProjectFilterSet(model);
- ejbViewFilterSetCollection = new FilterSetCollection();
- ejbViewFilterSetCollection.addFilterSet(jdbcFilterSet);
- ejbViewFilterSetCollection.addFilterSet(projectFilterSet);
-
super.doExecuteForEjb(project, fv, model, monitor);
-
IResource src = getSrcFolder(project);
if(src!=null && seamHomeFolder!=null) {
File srcFile = src.getLocation().toFile();
@@ -125,6 +126,20 @@
/*
* (non-Javadoc)
+ * @see
org.jboss.tools.seam.internal.core.project.facet.SeamFacetAbstractInstallDelegate#fillEarContents()
+ */
+ @Override
+ protected void fillEarContents() {
+ final File droolsLibFolder = new File(seamHomePath, DROOLS_LIB_SEAM_RELATED_PATH);
+ AntCopyUtils.copyFiles(seamHomeFolder, earContentsFolder, new
AntCopyUtils.FileSetFileFilter(new
AntCopyUtils.FileSet(JBOSS_EAR_CONTENT).dir(seamHomeFolder)), false);
+ AntCopyUtils.copyFiles(seamLibFolder, earContentsFolder, new
AntCopyUtils.FileSetFileFilter(new
AntCopyUtils.FileSet(JBOSS_EAR_CONTENT).dir(seamLibFolder)), false);
+ AntCopyUtils.copyFiles(droolsLibFolder, earContentsFolder, new
AntCopyUtils.FileSetFileFilter(new
AntCopyUtils.FileSet(JBOSS_EAR_CONTENT).dir(droolsLibFolder)), false);
+ AntCopyUtils.copyFiles(seamLibFolder, earContentsFolder, new
AntCopyUtils.FileSetFileFilter(new
AntCopyUtils.FileSet(JBOSS_EAR_CONTENT).dir(seamLibFolder)), false);
+ AntCopyUtils.copyFiles(seamGenResFolder, earContentsFolder, new
AntCopyUtils.FileSetFileFilter(new
AntCopyUtils.FileSet(JBOSS_EAR_CONTENT).dir(seamGenResFolder)), false);
+ }
+
+ /*
+ * (non-Javadoc)
* @see
org.jboss.tools.seam.internal.core.project.facet.SeamFacetAbstractInstallDelegate#configureFacesConfigXml(org.eclipse.core.resources.IProject,
org.eclipse.core.runtime.IProgressMonitor, java.lang.String)
*/
@Override
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/Seam2ProjectCreator.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/Seam2ProjectCreator.java 2008-10-17
16:35:57 UTC (rev 10932)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/Seam2ProjectCreator.java 2008-10-17
16:40:54 UTC (rev 10933)
@@ -48,16 +48,6 @@
.exclude(".*/CVS") //$NON-NLS-1$
.exclude(".*/\\.svn"); //$NON-NLS-1$
- private static AntCopyUtils.FileSet JBOSS_EAR_CONTENT = new AntCopyUtils.FileSet()
- .include("antlr-runtime.jar") //$NON-NLS-1$
- .include("drools-compiler.*\\.jar") //$NON-NLS-1$
- .include("drools-core.*\\.jar") //$NON-NLS-1$
- .include("jboss-seam.jar") //$NON-NLS-1$
- .include("jboss-el.*.jar") //$NON-NLS-1$
- .include("mvel.*\\.jar") //$NON-NLS-1$
- .include("jbpm-jpdl.*\\.jar") //$NON-NLS-1$
- .include("richfaces-api.*\\.jar"); //$NON-NLS-1$
-
/**
* @param model Seam facet data model
* @param seamWebProject Seam web project
@@ -186,6 +176,6 @@
}
protected AntCopyUtils.FileSet getJbossEarContent() {
- return JBOSS_EAR_CONTENT;
+ return Seam2FacetInstallDelegate.JBOSS_EAR_CONTENT;
}
}
\ No newline at end of file
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetAbstractInstallDelegate.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetAbstractInstallDelegate.java 2008-10-17
16:35:57 UTC (rev 10932)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetAbstractInstallDelegate.java 2008-10-17
16:40:54 UTC (rev 10933)
@@ -326,19 +326,8 @@
*/
protected void copyFilesToWarProject(IProject project, IProjectFacetVersion fv,
IDataModel model, IProgressMonitor monitor) throws CoreException {
- final FilterSet jdbcFilterSet = SeamFacetFilterSetFactory.createJdbcFilterSet(model);
- final FilterSet projectFilterSet =
SeamFacetFilterSetFactory.createProjectFilterSet(model);
- final FilterSet filtersFilterSet =
SeamFacetFilterSetFactory.createFiltersFilterSet(model);
- // ****************************************************************
- // Copy view folder from seam-gen installation to WebContent folder
- // ****************************************************************
final AntCopyUtils.FileSet viewFileSet = new
AntCopyUtils.FileSet(VIEW_FILESET).dir(seamGenViewSource);
- final FilterSetCollection viewFilterSetCollection = new FilterSetCollection();
- viewFilterSetCollection.addFilterSet(jdbcFilterSet);
- viewFilterSetCollection.addFilterSet(projectFilterSet);
- viewFilterSetCollection.addFilterSet(SeamFacetFilterSetFactory.createHibernateDialectFilterSet(model));
-
AntCopyUtils.copyFilesAndFolders(
seamGenViewSource,
webContentFolder,
@@ -436,6 +425,8 @@
}
}
+ protected File earContentsFolder;
+
/**
*
* @param project
@@ -446,61 +437,50 @@
*/
protected void doExecuteForEar(IProject project, IProjectFacetVersion fv,
IDataModel model, IProgressMonitor monitor) throws CoreException {
-/*
if(seamHomePath==null) {
return;
}
model.setProperty(ISeamFacetDataModelProperties.SEAM_EAR_PROJECT, project.getName());
IVirtualComponent component = ComponentCore.createComponent(project);
IVirtualFolder rootVirtFolder = component.getRootFolder().getFolder(new
Path("/")); //$NON-NLS-1$
- IContainer earContentsContainer = rootVirtFolder.getUnderlyingFolder();
- File earContentsFolder = earContentsFolder.getAbsoluteFile();
+ earContentsFolder = rootVirtFolder.getUnderlyingFolder().getLocation().toFile();
+ File metaInfFolder = new File(earContentsFolder, "META-INF"); //$NON-NLS-1$
+ File applicationXml = new File(metaInfFolder, "application.xml");
File earProjectFolder = project.getLocation().toFile();
- File ejbTemplateDir;
- AntCopyUtils.FileSet excludeCvsSvn;
-
- try {
- ejbTemplateDir = new File(SeamFacetInstallDataModelProvider.getTemplatesFolder(),
"ejb");
- } catch (IOException e) {
- SeamCorePlugin.getPluginLog().logError(e);
- }
- excludeCvsSvn = new
AntCopyUtils.FileSet(SeamFacetAbstractInstallDelegate.CVS_SVN).dir(ejbTemplateDir);
-
FilterSet earFilterSet = new FilterSet();
earFilterSet.addFilter("projectName", project.getName() + ".ear");
//$NON-NLS-1$ //$NON-NLS-2$
AntCopyUtils.copyFileToFolder(
new File(seamGenResFolder, "META-INF/jboss-app.xml"), //$NON-NLS-1$
- new File(earContentsFolder, "META-INF"), //$NON-NLS-1$
- new FilterSetCollection(earFilterSet), false);
+ metaInfFolder, new FilterSetCollection(earFilterSet), false);
+ if(!applicationXml.exists()) {
+ // TODO configure application.xml
+ }
// Copy configuration files from template
try {
AntCopyUtils.copyFilesAndFolders(
new File(SeamFacetInstallDataModelProvider.getTemplatesFolder(), "ear"),
//$NON-NLS-1$
- earProjectFolder, new AntCopyUtils.FileSetFileFilter(excludeCvsSvn),
- new FilterSetCollection(ejbFilterSet), true);
+ earProjectFolder, new FilterSetCollection(ejbFilterSet), false);
} catch (IOException e) {
SeamCorePlugin.getPluginLog().logError(e);
}
- // Fill ear contents
- AntCopyUtils.copyFiles(seamHomeFolder, earContentsFolder, new
AntCopyUtils.FileSetFileFilter(new
AntCopyUtils.FileSet(getJbossEarContent()).dir(seamHomeFolder)));
- AntCopyUtils.copyFiles(seamLibFolder, earContentsFolder, new
AntCopyUtils.FileSetFileFilter(new
AntCopyUtils.FileSet(getJbossEarContent()).dir(seamLibFolder)));
- AntCopyUtils.copyFiles(droolsLibFolder, earContentsFolder, new
AntCopyUtils.FileSetFileFilter(new
AntCopyUtils.FileSet(getJbossEarContent()).dir(droolsLibFolder)));
- AntCopyUtils.copyFiles(seamLibFolder, earContentsFolder, new
AntCopyUtils.FileSetFileFilter(new
AntCopyUtils.FileSet(getJbossEarContent()).dir(seamLibFolder)));
- AntCopyUtils.copyFiles(seamGenResFolder, earContentsFolder, new
AntCopyUtils.FileSetFileFilter(new
AntCopyUtils.FileSet(getJbossEarContent()).dir(seamGenResFolder)));
+ fillEarContents();
File resources = new File(earProjectFolder, "resources");
AntCopyUtils.copyFileToFile(
- dataSourceDsFile,
- new File(resources, seamWebProject.getName() + "-ds.xml"), //$NON-NLS-1$
//$NON-NLS-2$
- viewFilterSetCollection, true);
-*/
+ dataSourceDsFile, new File(resources, project.getName() + "-ds.xml"),
//$NON-NLS-1$
+ viewFilterSetCollection, false);
}
+ /**
+ * Fill ear contents
+ */
+ abstract protected void fillEarContents();
+
protected IResource getSrcFolder(IProject project) throws JavaModelException {
IJavaProject javaProject = EclipseResourceUtil.getJavaProject(project);
@@ -517,8 +497,6 @@
return null;
}
- protected FilterSetCollection ejbViewFilterSetCollection;
-
/**
*
* @param project
@@ -545,11 +523,9 @@
IResource src = getSrcFolder(project);
if(src!=null) {
- if(ejbViewFilterSetCollection==null) {
- ejbViewFilterSetCollection = new FilterSetCollection();
- ejbViewFilterSetCollection.addFilterSet(jdbcFilterSet);
- ejbViewFilterSetCollection.addFilterSet(projectFilterSet);
- }
+ viewFilterSetCollection = new FilterSetCollection();
+ viewFilterSetCollection.addFilterSet(jdbcFilterSet);
+ viewFilterSetCollection.addFilterSet(projectFilterSet);
File srcFile = src.getLocation().toFile();
// Copy sources to EJB project in case of EAR configuration
@@ -561,7 +537,7 @@
File persistentXml = new File(srcFile, "META-INF/persistence.xml");
//$NON-NLS-1$
if(!persistentXml.exists()) {
AntCopyUtils.copyFileToFile(persistenceFile, new File(srcFile,
"META-INF/persistence.xml"), //$NON-NLS-1$
- ejbViewFilterSetCollection, false);
+ viewFilterSetCollection, false);
} else {
// TODO modify persistence.xml
}
@@ -572,18 +548,16 @@
}
AntCopyUtils.FileSet ejbSrcResourcesSet = new
AntCopyUtils.FileSet(JBOOS_EJB_WEB_INF_CLASSES_SET).dir(seamGenResFolder);
- AntCopyUtils.copyFilesAndFolders(seamGenResFolder, srcFile, new
AntCopyUtils.FileSetFileFilter(ejbSrcResourcesSet), ejbViewFilterSetCollection, false);
+ AntCopyUtils.copyFilesAndFolders(seamGenResFolder, srcFile, new
AntCopyUtils.FileSetFileFilter(ejbSrcResourcesSet), viewFilterSetCollection, false);
File ejbJarXml = new File(srcFile, "META-INF/ejb-jar.xml");
if(!ejbJarXml.exists()) {
AntCopyUtils.copyFileToFolder(new File(seamGenResFolder,
"META-INF/ejb-jar.xml"), //$NON-NLS-1$
- new File(srcFile, "META-INF"), ejbViewFilterSetCollection, false);
//$NON-NLS-1$
+ new File(srcFile, "META-INF"), viewFilterSetCollection, false);
//$NON-NLS-1$
} else {
// TODO modify ejb-jar.xml
}
}
- FilterSet ejbFilterSet = new FilterSet();
- ejbFilterSet.addFilter("projectName", ejbProjectFolder.getName());
//$NON-NLS-1$
AntCopyUtils.copyFileToFile(hibernateConsoleLaunchFile, new File(
ejbProjectFolder, ejbProjectFolder.getName() + ".launch"), //$NON-NLS-1$
@@ -600,6 +574,11 @@
}
protected ProjectType projectType;
+ protected FilterSet ejbFilterSet;
+ protected FilterSetCollection viewFilterSetCollection;
+ protected FilterSet jdbcFilterSet;
+ protected FilterSet projectFilterSet;
+ protected FilterSet filtersFilterSet;
/**
*
@@ -611,7 +590,6 @@
*/
public void doExecute(final IProject project, IProjectFacetVersion fv,
Object config, IProgressMonitor monitor) throws CoreException {
- ejbViewFilterSetCollection = null;
final IDataModel model = (IDataModel)config;
IFacetedProject facetedProject = ProjectFacetsManager.create(project);
IProjectFacetVersion ejbVersion =
facetedProject.getProjectFacetVersion(IJ2EEFacetConstants.EJB_FACET);
@@ -631,6 +609,19 @@
model.setProperty(ISeamFacetDataModelProperties.HIBERNATE_HBM2DDL_AUTO,
"create-drop"); //$NON-NLS-1$
}
+ jdbcFilterSet = SeamFacetFilterSetFactory.createJdbcFilterSet(model);
+ projectFilterSet = SeamFacetFilterSetFactory.createProjectFilterSet(model);
+ filtersFilterSet = SeamFacetFilterSetFactory.createFiltersFilterSet(model);
+
+ // ****************************************************************
+ // Copy view folder from seam-gen installation to WebContent folder
+ // ****************************************************************
+ final AntCopyUtils.FileSet viewFileSet = new
AntCopyUtils.FileSet(VIEW_FILESET).dir(seamGenViewSource);
+ viewFilterSetCollection = new FilterSetCollection();
+ viewFilterSetCollection.addFilterSet(jdbcFilterSet);
+ viewFilterSetCollection.addFilterSet(projectFilterSet);
+ viewFilterSetCollection.addFilterSet(SeamFacetFilterSetFactory.createHibernateDialectFilterSet(model));
+
Object runtimeName =
model.getProperty(ISeamFacetDataModelProperties.SEAM_RUNTIME_NAME);
if(runtimeName!=null) {
final SeamRuntime selectedRuntime =
SeamRuntimeManager.getInstance().findRuntimeByName(runtimeName.toString());
@@ -650,6 +641,19 @@
hibernateConsolePropsFile = new File(seamGenHomeFolder,
"hibernatetools/hibernate-console.properties"); //$NON-NLS-1$
//final File hibernateConsolePref = new File(seamGenHomeFolder,
"hibernatetools/.settings/org.hibernate.eclipse.console.prefs"); //$NON-NLS-1$
persistenceFile = new File(seamGenResFolder, "META-INF/persistence-" +
(isWarConfiguration(model) ? DEV_WAR_PROFILE : DEV_EAR_PROFILE) + ".xml");
//$NON-NLS-1$ //$NON-NLS-2$
+
+ ejbFilterSet = new FilterSet();
+ ejbFilterSet.addFilter("projectName", project.getName()); //$NON-NLS-1$
+ String serverRuntimeName = WtpUtils.getServerRuntimeName(project);
+ if(serverRuntimeName!=null) {
+ ejbFilterSet.addFilter("runtimeName", serverRuntimeName); //$NON-NLS-1$
+ }
+ if (model.getProperty(ISeamFacetDataModelProperties.JDBC_DRIVER_JAR_PATH) != null) {
+ File driver = new File(((String[])
model.getProperty(ISeamFacetDataModelProperties.JDBC_DRIVER_JAR_PATH))[0]);
+ ejbFilterSet.addFilter("driverJar", " " + driver.getName() +
"\n"); //$NON-NLS-1$ //$NON-NLS-2$
+ } else {
+ ejbFilterSet.addFilter("driverJar", ""); //$NON-NLS-1$
//$NON-NLS-2$
+ }
} else {
seamHomePath = null;
}
@@ -665,9 +669,11 @@
doExecuteForEar(project, fv, model, monitor);
}
- ClasspathHelper.addClasspathEntries(project, fv);
- createSeamProjectPreferenes(project, model);
- EclipseResourceUtil.addNatureToProject(project, ISeamProject.NATURE_ID);
+ if(projectType != ProjectType.EAR) {
+ ClasspathHelper.addClasspathEntries(project, fv);
+ createSeamProjectPreferenes(project, model);
+ EclipseResourceUtil.addNatureToProject(project, ISeamProject.NATURE_ID);
+ }
project.refreshLocal(IResource.DEPTH_INFINITE, monitor);
}
@@ -749,9 +755,6 @@
*/
protected void createSeamProjectPreferenes(final IProject project,
final IDataModel model) {
- if(projectType == ProjectType.EAR) {
- return;
- }
IScopeContext projectScope = new ProjectScope(project);
IEclipsePreferences prefs = projectScope.getNode(SeamCorePlugin.PLUGIN_ID);
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetInstallDelegate.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetInstallDelegate.java 2008-10-17
16:35:57 UTC (rev 10932)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetInstallDelegate.java 2008-10-17
16:40:54 UTC (rev 10933)
@@ -48,6 +48,20 @@
private static final String ORG_AJAX4JSF_SKIN = "org.ajax4jsf.SKIN";
+ public static final AntCopyUtils.FileSet JBOSS_EAR_CONTENT = new
AntCopyUtils.FileSet()
+ .include("antlr.*\\.jar") //$NON-NLS-1$
+ .include("commons-jci-core.*\\.jar") //$NON-NLS-1$
+ .include("commons-jci-janino.*\\.jar") //$NON-NLS-1$
+ .include("drools-compiler.*\\.jar") //$NON-NLS-1$
+ .include("drools-core.*\\.jar") //$NON-NLS-1$
+ .include("janino.*\\.jar") //$NON-NLS-1$
+ .include("jboss-seam.jar") //$NON-NLS-1$
+ .include("jbpm.*\\.jar") //$NON-NLS-1$
+ .include("security\\.drl") //$NON-NLS-1$
+ .include("stringtemplate.*\\.jar") //$NON-NLS-1$
+ // el-ri needed for JBIDE-939
+ .include("el-ri.*\\.jar"); //$NON-NLS-1$
+
public static final AntCopyUtils.FileSet JBOSS_WAR_LIB_FILESET_WAR_CONFIG = new
AntCopyUtils.FileSet()
.include("ajax4jsf.*\\.jar") //$NON-NLS-1$
.include("richfaces.*\\.jar") //$NON-NLS-1$
@@ -74,7 +88,7 @@
// el-ri needed for JBIDE-939
.include("el-ri.*\\.jar"); //$NON-NLS-1$
- public static AntCopyUtils.FileSet JBOSS_WAR_LIB_FILESET_EAR_CONFIG = new
AntCopyUtils.FileSet()
+ public static final AntCopyUtils.FileSet JBOSS_WAR_LIB_FILESET_EAR_CONFIG = new
AntCopyUtils.FileSet()
.include("ajax4jsf.*\\.jar") //$NON-NLS-1$
.include("richfaces.*\\.jar") //$NON-NLS-1$
.include("commons-beanutils.*\\.jar") //$NON-NLS-1$
@@ -125,6 +139,20 @@
/*
* (non-Javadoc)
+ * @see
org.jboss.tools.seam.internal.core.project.facet.SeamFacetAbstractInstallDelegate#fillEarContents()
+ */
+ @Override
+ protected void fillEarContents() {
+ final File droolsLibFolder = new File(seamHomePath, DROOLS_LIB_SEAM_RELATED_PATH);
+ AntCopyUtils.copyFiles(seamHomeFolder, earContentsFolder, new
AntCopyUtils.FileSetFileFilter(new
AntCopyUtils.FileSet(JBOSS_EAR_CONTENT).dir(seamHomeFolder)), false);
+ AntCopyUtils.copyFiles(seamLibFolder, earContentsFolder, new
AntCopyUtils.FileSetFileFilter(new
AntCopyUtils.FileSet(JBOSS_EAR_CONTENT).dir(seamLibFolder)), false);
+ AntCopyUtils.copyFiles(droolsLibFolder, earContentsFolder, new
AntCopyUtils.FileSetFileFilter(new
AntCopyUtils.FileSet(JBOSS_EAR_CONTENT).dir(droolsLibFolder)), false);
+ AntCopyUtils.copyFiles(seamLibFolder, earContentsFolder, new
AntCopyUtils.FileSetFileFilter(new
AntCopyUtils.FileSet(JBOSS_EAR_CONTENT).dir(seamLibFolder)), false);
+ AntCopyUtils.copyFiles(seamGenResFolder, earContentsFolder, new
AntCopyUtils.FileSetFileFilter(new
AntCopyUtils.FileSet(JBOSS_EAR_CONTENT).dir(seamGenResFolder)), false);
+ }
+
+ /*
+ * (non-Javadoc)
* @see
org.jboss.tools.seam.internal.core.project.facet.SeamFacetAbstractInstallDelegate#configureFacesConfigXml(org.eclipse.core.resources.IProject,
org.eclipse.core.runtime.IProgressMonitor, java.lang.String)
*/
@Override
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamProjectCreator.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamProjectCreator.java 2008-10-17
16:35:57 UTC (rev 10932)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamProjectCreator.java 2008-10-17
16:40:54 UTC (rev 10933)
@@ -63,20 +63,6 @@
.exclude(".*/CVS") //$NON-NLS-1$
.exclude(".*/\\.svn"); //$NON-NLS-1$
- private static AntCopyUtils.FileSet JBOSS_EAR_CONTENT = new AntCopyUtils.FileSet()
- .include("antlr.*\\.jar") //$NON-NLS-1$
- .include("commons-jci-core.*\\.jar") //$NON-NLS-1$
- .include("commons-jci-janino.*\\.jar") //$NON-NLS-1$
- .include("drools-compiler.*\\.jar") //$NON-NLS-1$
- .include("drools-core.*\\.jar") //$NON-NLS-1$
- .include("janino.*\\.jar") //$NON-NLS-1$
- .include("jboss-seam.jar") //$NON-NLS-1$
- .include("jbpm.*\\.jar") //$NON-NLS-1$
- .include("security\\.drl") //$NON-NLS-1$
- .include("stringtemplate.*\\.jar") //$NON-NLS-1$
- // el-ri needed for JBIDE-939
- .include("el-ri.*\\.jar"); //$NON-NLS-1$
-
protected IDataModel model;
protected IProject seamWebProject;
protected SeamRuntime seamRuntime;
@@ -198,7 +184,7 @@
}
protected AntCopyUtils.FileSet getJbossEarContent() {
- return JBOSS_EAR_CONTENT;
+ return SeamFacetInstallDelegate.JBOSS_EAR_CONTENT;
}
/**