Author: dgolovin
Date: 2008-04-08 19:40:20 -0400 (Tue, 08 Apr 2008)
New Revision: 7438
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/SeamFacetInstallDelegate.java
Log:
http://jira.jboss.org/jira/browse/JBIDE-2013
fix problems in case of custom paths to java and webapp root folders:
location for seam.properties
path to dev hot deployment directory
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-04-08
21:29:49 UTC (rev 7437)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/Seam2FacetInstallDelegate.java 2008-04-08
23:40:20 UTC (rev 7438)
@@ -165,7 +165,7 @@
public static AntCopyUtils.FileSet JBOOS_WAR_WEB_INF_CLASSES_SET = new
AntCopyUtils.FileSet()
.include("import\\.sql") //$NON-NLS-1$
.include("security\\.drl") //$NON-NLS-1$
- .include("seam\\.properties") //$NON-NLS-1$
+ //.include("seam\\.properties") //$NON-NLS-1$
.include("messages_en\\.properties"); //$NON-NLS-1$
public static AntCopyUtils.FileSet JBOOS_EJB_WEB_INF_CLASSES_SET = new
AntCopyUtils.FileSet()
@@ -297,27 +297,27 @@
//
********************************************************************************************
// Copy seam project indicator
//
********************************************************************************************
- AntCopyUtils.copyFileToFolder(new File(seamGenResFolder,"seam.properties"),
srcFolder, true); //$NON-NLS-1$
final IContainer source = srcRootFolder.getUnderlyingFolder();
IPath actionSrcPath = new
Path(source.getFullPath().removeFirstSegments(1)+"/action"); //$NON-NLS-1$
IPath modelSrcPath = new
Path(source.getFullPath().removeFirstSegments(1)+"/model"); //$NON-NLS-1$
srcRootFolder.delete(IVirtualFolder.FORCE, monitor);
- WtpUtils.createSourceFolder(project, actionSrcPath,
source.getFullPath().removeFirstSegments(1), new
Path(webRootFolder.getLocation().lastSegment()+"/WEB-INF/dev")); //$NON-NLS-1$
+ WtpUtils.createSourceFolder(project, actionSrcPath,
source.getFullPath().removeFirstSegments(1),
webRootFolder.getFullPath().removeFirstSegments(1).append("WEB-INF/dev"));
//$NON-NLS-1$
WtpUtils.createSourceFolder(project, modelSrcPath,
source.getFullPath().removeFirstSegments(1), null);
srcRootFolder.createLink(actionSrcPath, 0, null);
srcRootFolder.createLink(modelSrcPath, 0, null);
+ File actionsSrc = new File(project.getLocation().toFile(),
source.getFullPath().removeFirstSegments(1) + "/action/");
+
+ AntCopyUtils.copyFileToFolder(new File(seamGenResFolder, "seam.properties"),
actionsSrc, true); //$NON-NLS-1$
+
AntCopyUtils.copyFileToFile(
new File(seamGenHomeFolder,"src/Authenticator.java"), //$NON-NLS-1$
- new
File(project.getLocation().toFile(),source.getFullPath().removeFirstSegments(1)+"/action/"
+
model.getProperty(ISeamFacetDataModelProperties.SESSION_BEAN_PACKAGE_NAME).toString().replace('.',
'/')+"/"+"Authenticator.java"), //$NON-NLS-1$ //$NON-NLS-2$
//$NON-NLS-3$
+ new File(actionsSrc,
model.getProperty(ISeamFacetDataModelProperties.SESSION_BEAN_PACKAGE_NAME).toString().replace('.',
'/')+"/"+"Authenticator.java"), //$NON-NLS-1$ //$NON-NLS-2$
//$NON-NLS-3$
new FilterSetCollection(filtersFilterSet), true);
- // Needed to make sure /dev is picked up by test, so need seam.properties.
- AntCopyUtils.copyFileToFolder(new File(seamGenResFolder,"seam.properties"),
new
File(project.getLocation().toFile(),source.getFullPath().lastSegment()+"/action"),
true); //$NON-NLS-1$
-
AntCopyUtils.copyFileToFile(
persistenceFile,
new File(srcFolder,"META-INF/persistence.xml"), //$NON-NLS-1$
@@ -398,11 +398,6 @@
seamGenResFolder,new File(ejb,"ejbModule"),new
AntCopyUtils.FileSetFileFilter(ejbSrcResourcesSet), viewFilterSetCollection, true);
//$NON-NLS-1$
//
********************************************************************************************
- // Copy seam project indicator
- //
********************************************************************************************
- AntCopyUtils.copyFileToFolder(new File(seamGenResFolder,"seam.properties"),
new File(ejb,"ejbModule/"), true); //$NON-NLS-1$ //$NON-NLS-2$
-
- //
********************************************************************************************
// Copy security.drl to source folder
//
********************************************************************************************
AntCopyUtils.copyFileToFolder(new File(seamGenResFolder,"security.drl"),
new File(ejb,"ejbModule/"), true); //$NON-NLS-1$ //$NON-NLS-2$
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-04-08
21:29:49 UTC (rev 7437)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetInstallDelegate.java 2008-04-08
23:40:20 UTC (rev 7438)
@@ -207,7 +207,7 @@
public static AntCopyUtils.FileSet JBOOS_WAR_WEB_INF_CLASSES_SET = new
AntCopyUtils.FileSet()
.include("import\\.sql") //$NON-NLS-1$
.include("security\\.drl") //$NON-NLS-1$
- .include("seam\\.properties") //$NON-NLS-1$
+ //.include("seam\\.properties") //$NON-NLS-1$
.include("messages_en\\.properties"); //$NON-NLS-1$
/**
@@ -359,7 +359,7 @@
//
********************************************************************************************
// Copy seam project indicator
//
********************************************************************************************
- AntCopyUtils.copyFileToFolder(new File(seamGenResFolder, "seam.properties"),
srcFolder, true); //$NON-NLS-1$
+
final IContainer source = srcRootFolder.getUnderlyingFolder();
IPath actionSrcPath = new Path(source.getFullPath().removeFirstSegments(1) +
"/action"); //$NON-NLS-1$
@@ -372,9 +372,13 @@
srcRootFolder.createLink(actionSrcPath, 0, null);
srcRootFolder.createLink(modelSrcPath, 0, null);
+ File actionsSrc = new File(project.getLocation().toFile(),
source.getFullPath().removeFirstSegments(1) + "/action/");
+
+ AntCopyUtils.copyFileToFolder(new File(seamGenResFolder, "seam.properties"),
actionsSrc, true); //$NON-NLS-1$
+
AntCopyUtils.copyFileToFile(
new File(seamGenHomeFolder, "src/Authenticator.java"), //$NON-NLS-1$
- new File(project.getLocation().toFile(), source.getFullPath().removeFirstSegments(1)
+ "/action/" +
model.getProperty(ISeamFacetDataModelProperties.SESSION_BEAN_PACKAGE_NAME).toString().replace('.',
'/') + "/" + "Authenticator.java"), //$NON-NLS-1$
//$NON-NLS-2$ //$NON-NLS-3$
+ new
File(actionsSrc,model.getProperty(ISeamFacetDataModelProperties.SESSION_BEAN_PACKAGE_NAME).toString().replace('.',
'/') + "/" + "Authenticator.java"), //$NON-NLS-1$
//$NON-NLS-2$ //$NON-NLS-3$
new FilterSetCollection(filtersFilterSet), true);
AntCopyUtils.copyFileToFile(
@@ -449,11 +453,6 @@
AntCopyUtils.copyFilesAndFolders(
seamGenResFolder, new File(ejb, "ejbModule"), new
AntCopyUtils.FileSetFileFilter(ejbSrcResourcesSet), viewFilterSetCollection, true);
//$NON-NLS-1$
- //
********************************************************************************************
- // Copy seam project indicator
- //
********************************************************************************************
- AntCopyUtils.copyFileToFolder(new File(seamGenResFolder,
"seam.properties"), new File(ejb, "ejbModule/"), true); //$NON-NLS-1$
//$NON-NLS-2$
-
AntCopyUtils.copyFileToFolder(
new File(seamGenResFolder, "META-INF/ejb-jar.xml"), //$NON-NLS-1$
new File(ejb, "ejbModule/META-INF/"), //$NON-NLS-1$