DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7549>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7549 Perforce: Add failonerror to tasks Summary: Perforce: Add failonerror to tasks Product: Ant Version: 1.4.1 Platform: All OS/Version: All Status: NEW Severity: Enhancement Priority: Other Component: Optional Tasks AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] When running a build, the first thing we do is sync the latest codebase. However, often some of the files on our machine are set to readable because they contain some client-specific settings. The p4sync task, however, will fail because without specifying force="true", it will fail instead of overwriting a readable file. This is the desired behavior, however there is no way to keep the build going after this because P4 tasks do not have the ability to not fail on error. So I'd suggest modifying P4Base to add the following code protected boolean failOnError = true; /** * Throw a BuildException if compilation fails */ public void setFailonerror(boolean fail) { failOnError = fail; } And modify the catch block around line 180 (i.e. the Exception catch to be) }catch(Exception e) { String failMsg = "Problem exec'ing P4 command: "+e.getMessage(); if (failOnError) { throw new BuildException(failMsg); } else { log(failMsg, Project.MSG_ERR); } } -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
