jruaux 2003/01/30 06:16:57
Modified: Eclipse-Plugin/src/java/org/apache/cactus/eclipse/launcher
WarBuilder.java
Log:
Now uses the Ant petal
Revision Changes Path
1.13 +25 -35
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.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- WarBuilder.java 17 Jan 2003 15:22:38 -0000 1.12
+++ WarBuilder.java 30 Jan 2003 14:16:57 -0000 1.13
@@ -82,19 +82,15 @@
/**
* the directory where to find classes
*/
- private File classFilesDir;
+ private File userClassFilesDir;
/**
* the web.xml file
*/
- private File webXML;
+ private File userWebXML;
/**
* directory where to find jars for the webapp
*/
- private File jarFilesDir;
- /**
- * directory where to find Cactus framework web files
- */
- private File webFilesDir;
+ private File userJarFilesDir;
/**
* directory where to find user's web files
*/
@@ -120,10 +116,10 @@
File theWebFilesDir)
{
this.buildFileLocation = theBuildFileLocation;
- this.classFilesDir = theClassFilesDir;
- this.webXML = theWebXML;
- this.jarFilesDir = theJarFilesDir;
- this.webFilesDir = theWebFilesDir;
+ this.userClassFilesDir = theClassFilesDir;
+ this.userWebXML = theWebXML;
+ this.userJarFilesDir = theJarFilesDir;
+ this.userWebFilesDir = theWebFilesDir;
}
/**
@@ -134,27 +130,16 @@
public WarBuilder(IJavaProject theJavaProject)
throws JavaModelException
{
+ CactusPlugin thePlugin = CactusPlugin.getDefault();
+ buildFileLocation =
+ new File(thePlugin.find(new Path("./ant/build-war.xml")).getPath());
IPath projectPath = theJavaProject.getProject().getLocation();
IPath classFilesPath =
projectPath.removeLastSegments(1).append(
theJavaProject.getOutputLocation());
- classFilesDir = classFilesPath.toFile();
- CactusPlugin thePlugin = CactusPlugin.getDefault();
- buildFileLocation =
- new File(thePlugin.find(new Path("./ant/build-war.xml")).getPath());
- webXML = projectPath.append("web.xml").toFile();
- if (!webXML.exists())
- {
- webXML =
- new File(
- thePlugin
- .find(new Path("./ant/conf/test/web.xml"))
- .getPath());
- }
- jarFilesDir =
- new File(thePlugin.find(new Path("./lib/share/")).getPath());
- webFilesDir =
- new File(thePlugin.find(new Path("./web/")).getPath());
+ userClassFilesDir = classFilesPath.toFile();
+ userWebXML = projectPath.append("web.xml").toFile();
+ userJarFilesDir = projectPath.append("lib").toFile();
// copy any web folder situated in the user's project
userWebFilesDir = projectPath.append("web").toFile();
}
@@ -180,21 +165,26 @@
e);
}
Vector arguments = new Vector();
- String jarFilesPath = jarFilesDir.getAbsolutePath();
+
+ String jarFilesPath = userJarFilesDir.getAbsolutePath();
arguments.add("-Djars.dir=" + jarFilesPath);
- String webXMLPath = webXML.getAbsolutePath();
+
+ String webXMLPath = userWebXML.getAbsolutePath();
arguments.add("-Dwebxml.path=" + webXMLPath);
- String classFilesPath = classFilesDir.getAbsolutePath();
+
+ String classFilesPath = userClassFilesDir.getAbsolutePath();
arguments.add("-Dclasses.dir=" + classFilesPath);
+
String warFilePath = testWar.getAbsolutePath();
arguments.add("-Dwar.path=" + warFilePath);
- String webFilesPath = webFilesDir.getAbsolutePath();
- arguments.add("-Dwebfiles.dir=" + webFilesPath);
+
+ //String webFilesPath = webFilesDir.getAbsolutePath();
+ //arguments.add("-Dwebfiles.dir=" + webFilesPath);
if (userWebFilesDir.exists())
{
- String userWebFilesPath = userWebFilesDir.getAbsolutePath();
- arguments.add("-Duser.webfiles.dir=" + userWebFilesPath);
+ String webFilesPath = userWebFilesDir.getAbsolutePath();
+ arguments.add("-Dwebfiles.dir=" + webFilesPath);
}
String[] antArguments = (String[]) arguments.toArray(new String[0]);
AntRunner runner = new AntRunner();
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]