jruaux 2003/01/09 03:13:02
Modified: Eclipse-Plugin/src/java/org/apache/cactus/eclipse/launcher
WarBuilder.java
Log:
Added user web.xml file capability
Revision Changes Path
1.7 +13 -6
jakarta-cactus/Eclipse-Plugin/src/java/org/apache/cactus/eclipse/launcher/WarBuilder.java
Index: WarBuilder.java
===================================================================
RCS file:
/home/cvs/jakarta-cactus/Eclipse-Plugin/src/java/org/apache/cactus/eclipse/launcher/WarBuilder.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- WarBuilder.java 8 Jan 2003 16:51:51 -0000 1.6
+++ WarBuilder.java 9 Jan 2003 11:13:02 -0000 1.7
@@ -133,16 +133,22 @@
jarFilesDir = theJarFilesDir;
IPath projectPath = theJavaProject.getProject().getLocation();
- IPath thePath =
+ IPath classFilesPath =
projectPath.removeLastSegments(1).append(
theJavaProject.getOutputLocation());
- classFilesDir = thePath.toFile();
+ classFilesDir = classFilesPath.toFile();
CactusPlugin thePlugin = CactusPlugin.getDefault();
buildFileLocation =
new File(thePlugin.find(new Path("./ant/build-war.xml")).getPath());
- webXML =
- new File(
- thePlugin.find(new Path("./ant/conf/test/web.xml")).getPath());
+ webXML = projectPath.append("web.xml").toFile();
+ if (!webXML.exists())
+ {
+ webXML =
+ new File(
+ thePlugin
+ .find(new Path("./ant/conf/test/web.xml"))
+ .getPath());
+ }
// copy any web folder situated in the user's project
webFilesDir = projectPath.append("web").toFile();
}
@@ -187,6 +193,7 @@
webFilesDir = new File(tempPath, "web");
webFilesDir.mkdir();
}
+
String webFilesPath = webFilesDir.getAbsolutePath();
arguments.add("-Dwebfiles.dir=" + webFilesPath);
String[] antArguments = (String[]) arguments.toArray(new String[0]);
@@ -199,7 +206,7 @@
// Delete the created Web dir, if any.
// Could not use deleteOnExit on this dir because the VM launched by
// Ant seems to be crashing when shut down by the 'stop' task
- //
+ // TODO: resolve the crashing VM problem
if (!userWebExists)
{
webFilesDir.delete();
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>