The attached patches will add a failonerror attribute to all of the
<serverdeploy> vendor-specific elements. This attribute is set to
"true" by default. If set to "false", the build will only log a warning
message if the <serverdeploy> task fails.
ahdt-patch.txt fixes AbstractHotDeploymentTool.java
ghdt-patch.txt fixes GenericHotDeploymentTool.java
whdt-patch.txt fixes WeblogicHotDeploymentTool.java
docs-patch.txt fixes the documentation for <serverdeploy>
Kyle Adams
Java Developer
Gordon Food Service
--- WeblogicHotDeploymentTool.java.bak Wed Nov 13 10:49:24 2002
+++ WeblogicHotDeploymentTool.java Wed Nov 13 20:11:24 2002
@@ -67,6 +67,7 @@
* and runs the weblogic.deploy tool in a seperate JVM.
*
* @author Christopher A. Longo - [EMAIL PROTECTED]
+ * @author Kyle Adams - [EMAIL PROTECTED]
*
* @see org.apache.tools.ant.taskdefs.optional.j2ee.HotDeploymentTool
* @see org.apache.tools.ant.taskdefs.optional.j2ee.AbstractHotDeploymentTool
@@ -99,7 +100,7 @@
public void deploy() {
Java java = (Java) getTask().getProject().createTask("java");
java.setFork(true);
- java.setFailonerror(true);
+ java.setFailonerror(getFailOnError());
java.setClasspath(getClasspath());
java.setClassname(WEBLOGIC_DEPLOY_CLASS_NAME);
--- GenericHotDeploymentTool.java.bak Wed Nov 13 10:49:34 2002
+++ GenericHotDeploymentTool.java Wed Nov 13 20:12:57 2002
@@ -64,6 +64,7 @@
* class name, jvm args, and arguments.
*
* @author Christopher A. Longo - [EMAIL PROTECTED]
+ * @author Kyle Adams - [EMAIL PROTECTED]
*
* @see org.apache.tools.ant.taskdefs.optional.j2ee.HotDeploymentTool
* @see org.apache.tools.ant.taskdefs.optional.j2ee.AbstractHotDeploymentTool
@@ -132,7 +133,7 @@
java.setClassname(className);
java.setClasspath(getClasspath());
java.setFork(true);
- java.setFailonerror(true);
+ java.setFailonerror(getFailOnError());
java.execute();
}
--- AbstractHotDeploymentTool.java.bak Wed Nov 13 10:49:26 2002
+++ AbstractHotDeploymentTool.java Wed Nov 13 20:11:00 2002
@@ -76,6 +76,7 @@
* run class, exec a native executable, run Java code...
*
* @author Christopher A. Longo - [EMAIL PROTECTED]
+ * @author Kyle Adams - [EMAIL PROTECTED]
*
* @see org.apache.tools.ant.taskdefs.optional.j2ee.HotDeploymentTool
* @see org.apache.tools.ant.taskdefs.optional.j2ee.ServerDeploy
@@ -96,6 +97,9 @@
/** The address of the deployment server **/
private String server;
+ /** Controls whether or not the build fails on an error; true by default.
**/
+ private boolean failOnError = true;
+
/**
* Add a classpath as a nested element.
* @return A Path object representing the classpath to be used.
@@ -224,5 +228,21 @@
*/
public void setServer(String server) {
this.server = server;
+ }
+
+ /**
+ * Returns the failOnError field.
+ * @return A Boolean representing the "failOnError" attribute.
+ */
+ public boolean getFailOnError() {
+ return failOnError;
+ }
+
+ /**
+ * Whether or not an error causes a build failure; optional.
+ * @param failOnError Boolean representing the "failonerror" attribute.
+ */
+ public void setFailOnError(boolean failOnError) {
+ this.failOnError = failOnError;
}
}
--- serverdeploy.html.bak Wed Nov 13 20:22:45 2002
+++ serverdeploy.html Wed Nov 13 20:26:21 2002
@@ -12,6 +12,7 @@
<p>by</p>
<!-- Names are in alphabetical order, on last name -->
<ul>
+<li>Kyle Adams (<a href="mailto:[EMAIL PROTECTED]">[EMAIL PROTECTED]</a>)</li>
<li>Christopher A. Longo (<a href="mailto:[EMAIL PROTECTED]">[EMAIL
PROTECTED]</a>)</li>
<li>Cyrille Morvan (<a href="mailto:[EMAIL PROTECTED]">[EMAIL
PROTECTED]</a>)</li>
</ul>
@@ -108,6 +109,11 @@
<td valign="top">The password of the user with privileges to deploy
applications to the server.</td>
<td>Tool dependant</td>
</tr>
+ <tr>
+ <td valign="top">failonerror</td>
+ <td valign="top">Log a warning message, but do not stop the build, when
the deployment fails; defaults to true.</td>
+ <td>Tool dependant</td>
+ </tr>
</table>
<p>Also supported are nested vendor-specific elements.</p>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>