ASF Bugzilla – Attachment 20198 Details for
Bug 31610
[RFE][Patch] errorproperty attribute to <subant> task
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for Ant 1.7.0 code
bug31610.patch (text/plain), 1.69 KB, created by
David Jackman
on 2007-05-14 15:02:42 UTC
(
hide
)
Description:
Patch for Ant 1.7.0 code
Filename:
MIME Type:
Creator:
David Jackman
Created:
2007-05-14 15:02:42 UTC
Size:
1.69 KB
patch
obsolete
>Index: src/main/org/apache/tools/ant/taskdefs/SubAnt.java >=================================================================== >--- src/main/org/apache/tools/ant/taskdefs/SubAnt.java (revision 537988) >+++ src/main/org/apache/tools/ant/taskdefs/SubAnt.java (working copy) >@@ -73,6 +73,7 @@ > private boolean inheritAll = false; > private boolean inheritRefs = false; > private boolean failOnError = true; >+ private String errorProperty = null; > private String output = null; > > private Vector properties = new Vector(); >@@ -288,6 +289,9 @@ > try { > ant.execute(); > } catch (BuildException e) { >+ if (errorProperty != null) { >+ getProject().setNewProperty(errorProperty, "true"); >+ } > if (failOnError) { > throw e; > } >@@ -295,6 +299,9 @@ > + "' of: " + antfilename + "\n" > + e.getMessage(), Project.MSG_WARN); > } catch (Throwable e) { >+ if (errorProperty != null) { >+ getProject().setNewProperty(errorProperty, "true"); >+ } > if (failOnError) { > throw new BuildException(e); > } >@@ -343,6 +350,18 @@ > } > > /** >+ * Property to set to "true" if there is a error in a sub-build. >+ * >+ * @param propertyName the name of the property to set in the >+ * event of an error. >+ * >+ * @since Ant 1.7? >+ */ >+ public void setErrorProperty(String propertyName) { >+ this.errorProperty = propertyName; >+ } >+ >+ /** > * The target to call on the different sub-builds. Set to "" to execute > * the default target. > * @param target the target
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 31610
:
13002
| 20198