Author: dgolovin
Date: 2007-09-04 16:33:52 -0400 (Tue, 04 Sep 2007)
New Revision: 3447
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/SeamFacetInstallDelegete.java
Log:
http://jira.jboss.org/jira/browse/JBIDE-853
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 2007-09-04
16:55:26 UTC (rev 3446)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/AntCopyUtils.java 2007-09-04
20:33:52 UTC (rev 3447)
@@ -86,7 +86,7 @@
public boolean isIncluded(String file) {
int i = dir.getAbsolutePath().length()+1;
String relatedPath = file.substring(i);
- if(new File(file).isDirectory())return true;
+ //if(new File(file).isDirectory())return true;
for (Pattern pattern : include) {
if(pattern.matcher(relatedPath.replace('\\', '/')).matches() ) {
return !isExcluded(relatedPath);
@@ -147,7 +147,6 @@
destinationFolder.mkdirs();
FileUtils.getFileUtils().copyFile(file, new
File(destinationFolder,file.getName()),filterSetCollection,override);
} catch (IOException e) {
- e.printStackTrace();
SeamCorePlugin.getPluginLog().logError(e);
}
}
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetInstallDelegete.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetInstallDelegete.java 2007-09-04
16:55:26 UTC (rev 3446)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetInstallDelegete.java 2007-09-04
20:33:52 UTC (rev 3447)
@@ -148,12 +148,21 @@
.include("index\\.html")
.include("layout")
.include("layout/.*")
+ .include("stylesheet")
.include("stylesheet/.*")
.include("img/.*")
.include("img")
- .exclude(".*/.*\\.ftl");
+ .exclude(".*/.*\\.ftl")
+ .exclude(".*/CVS")
+ .exclude(".*/\\.svn");
+ public static AntCopyUtils.FileSet CVS_SVN = new AntCopyUtils.FileSet()
+ .include(".*")
+ .exclude(".*/CVS")
+ .exclude(".*/\\.svn");
+
public static AntCopyUtils.FileSet JBOOS_WAR_WEBINF_SET = new AntCopyUtils.FileSet()
+ .include("WEB-INF")
.include("WEB-INF/web\\.xml")
.include("WEB-INF/pages\\.xml")
.include("WEB-INF/jboss-web\\.xml")
@@ -385,13 +394,13 @@
IProject ejb =
WtpUtils.createEclipseProject(model.getProperty(ISeamFacetDataModelProperties.SEAM_PROJECT_NAME)+"-ejb",
monitor); try {
FilterSet filterSet = new FilterSet();
filterSet.addFilter("projectName", project.getName());
- filterSet.addFilter("runtimeName",
WtpUtils.getServerRuntimeName(project));
+ filterSet.addFilter("runtimeName",
WtpUtils.getServerRuntimeName(project));
-
+ AntCopyUtils.FileSet excludeCvsSvn = new
AntCopyUtils.FileSet(CVS_SVN).dir(seamGenResFolder);
AntCopyUtils.copyFilesAndFolders(
new File(SeamFacetInstallDataModelProvider.getTemplatesFolder(),"ejb"),
- ejb.getLocation().toFile(),
+ ejb.getLocation().toFile(), new AntCopyUtils.FileSetFileFilter(excludeCvsSvn),
new FilterSetCollection(filterSet), true);
//
*******************************************************************************************
@@ -443,7 +452,7 @@
// Copy configuration files from template
AntCopyUtils.copyFilesAndFolders(
new File(SeamFacetInstallDataModelProvider.getTemplatesFolder(),"ear"),
- ear.getLocation().toFile(),
+ ear.getLocation().toFile(), new AntCopyUtils.FileSetFileFilter(excludeCvsSvn),
new FilterSetCollection(filterSet), true);
// Fill ear contents