sbailliez 2002/08/27 14:20:15
Modified: docs/manual/OptionalTasks Tag: ANT_15_BRANCH ejb.html
src/main/org/apache/tools/ant/taskdefs/optional/ejb Tag:
ANT_15_BRANCH WebsphereDeploymentTool.java
Log:
Remove unused setters and validate for websphere.home
PR: 11833
Reported by: [EMAIL PROTECTED] (Michael Shamberger)
Revision Changes Path
No revision
No revision
1.23.2.10 +3 -2 jakarta-ant/docs/manual/OptionalTasks/ejb.html
Index: ejb.html
===================================================================
RCS file: /home/cvs/jakarta-ant/docs/manual/OptionalTasks/ejb.html,v
retrieving revision 1.23.2.9
retrieving revision 1.23.2.10
diff -u -r1.23.2.9 -r1.23.2.10
--- ejb.html 24 Jun 2002 02:00:34 -0000 1.23.2.9
+++ ejb.html 27 Aug 2002 21:20:14 -0000 1.23.2.10
@@ -1256,7 +1256,7 @@
<p>
For the websphere element to work, you have to provide a complete classpath,
that contains all
classes, that are required to reflect the bean classes. For ejbdeploy to
work, you must also provide
-the classpath of the ejbdeploy tool (look at the examples below).
+the classpath of the ejbdeploy tool and set the <i>websphere.home</i>
property (look at the examples below).
</p>
<table border="1" cellpadding="2" cellspacing="0">
@@ -1342,6 +1342,7 @@
in the descriptor dir:</p>
<pre>
+ <property name="webpshere.home"
value="${was4.home}"/>
<ejbjar srcdir="${build.class}" descriptordir="etc/ejb">
<include name="*-ejb-jar.xml"/>
<websphere dbvendor="DB2UDBOS390_V6"
No revision
No revision
1.11.2.3 +10 -2
jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WebsphereDeploymentTool.java
Index: WebsphereDeploymentTool.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WebsphereDeploymentTool.java,v
retrieving revision 1.11.2.2
retrieving revision 1.11.2.3
diff -u -r1.11.2.2 -r1.11.2.3
--- WebsphereDeploymentTool.java 15 Aug 2002 22:07:03 -0000 1.11.2.2
+++ WebsphereDeploymentTool.java 27 Aug 2002 21:20:15 -0000 1.11.2.3
@@ -184,6 +184,8 @@
/** the scratchdir for the ejbdeploy operation */
private String tempdir = "_ejbdeploy_temp";
+ /** the websphere home set in the property file */
+ private File websphereHome = null;
/** Get the classpath to the websphere classpaths */
public Path createWASClasspath() {
@@ -623,12 +625,13 @@
// Set the Environment variable
Environment.Variable var = new Environment.Variable();
+ File libDir = new File(websphereHome, "lib");
var.setKey("websphere.lib.dir");
-
var.setValue(getTask().getProject().getProperty("websphere.home") + "/lib");
+ var.setValue(libDir.getAbsolutePath());
javaTask.addSysproperty(var);
// Set the working directory
- javaTask.setDir(new
File(getTask().getProject().getProperty("websphere.home")));
+ javaTask.setDir(websphereHome);
// Set the Java class name
javaTask.setTaskName("ejbdeploy");
@@ -699,6 +702,11 @@
*/
public void validateConfigured() throws BuildException {
super.validateConfigured();
+ String home = getTask().getProject().getProperty("websphere.home");
+ if (home == null) {
+ throw new BuildException("Please set the property websphere.home
in your project");
+ }
+ websphereHome = getTask().getProject().resolveFile(home);
}
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>