Author: rdonkin
Date: Mon Dec 1 13:50:44 2008
New Revision: 722249
URL: http://svn.apache.org/viewvc?rev=722249&view=rev
Log:
Added quiet attribute
Modified:
james/mpt/trunk/antlib/src/main/java/org/apache/james/mpt/ant/MailProtocolTestTask.java
james/mpt/trunk/antlib/src/site/xdoc/index.xml
james/mpt/trunk/antlib/src/test/resources/build.xml
Modified:
james/mpt/trunk/antlib/src/main/java/org/apache/james/mpt/ant/MailProtocolTestTask.java
URL:
http://svn.apache.org/viewvc/james/mpt/trunk/antlib/src/main/java/org/apache/james/mpt/ant/MailProtocolTestTask.java?rev=722249&r1=722248&r2=722249&view=diff
==============================================================================
---
james/mpt/trunk/antlib/src/main/java/org/apache/james/mpt/ant/MailProtocolTestTask.java
(original)
+++
james/mpt/trunk/antlib/src/main/java/org/apache/james/mpt/ant/MailProtocolTestTask.java
Mon Dec 1 13:50:44 2008
@@ -48,6 +48,7 @@
*/
public class MailProtocolTestTask extends Task implements Monitor {
+ private boolean quiet = false;
private File script;
private Union scripts;
private int port = 0;
@@ -57,6 +58,24 @@
private Collection users = new ArrayList();
/**
+ * Should progress output be suppressed?
+ * @return true if progress information should be suppressed,
+ * false otherwise
+ */
+ public boolean isQuiet() {
+ return quiet;
+ }
+
+ /**
+ * Sets whether progress output should be suppressed/
+ * @param quiet true if progress information should be suppressed,
+ * false otherwise
+ */
+ public void setQuiet(boolean quiet) {
+ this.quiet = quiet;
+ }
+
+ /**
* Should the execution be skipped?
* @return true if exection should be skipped,
* otherwise false
@@ -350,7 +369,11 @@
}
public void note(String message) {
- log(message, Project.MSG_INFO);
+ if (quiet) {
+ log(message, Project.MSG_DEBUG);
+ } else {
+ log(message, Project.MSG_INFO);
+ }
}
public void debug(char character) {
Modified: james/mpt/trunk/antlib/src/site/xdoc/index.xml
URL:
http://svn.apache.org/viewvc/james/mpt/trunk/antlib/src/site/xdoc/index.xml?rev=722249&r1=722248&r2=722249&view=diff
==============================================================================
--- james/mpt/trunk/antlib/src/site/xdoc/index.xml (original)
+++ james/mpt/trunk/antlib/src/site/xdoc/index.xml Mon Dec 1 13:50:44 2008
@@ -84,6 +84,11 @@
<td>Optional server shabang will be substituted for first server
response.</td>
<td>No</td>
</tr>
+<tr>
+ <td>quiet</td>
+ <td>Optional boolean setting when true will suppress progress output.</td>
+ <td>No (defaults to false)</td>
+</tr>
</table>
</subsection>
Modified: james/mpt/trunk/antlib/src/test/resources/build.xml
URL:
http://svn.apache.org/viewvc/james/mpt/trunk/antlib/src/test/resources/build.xml?rev=722249&r1=722248&r2=722249&view=diff
==============================================================================
--- james/mpt/trunk/antlib/src/test/resources/build.xml (original)
+++ james/mpt/trunk/antlib/src/test/resources/build.xml Mon Dec 1 13:50:44 2008
@@ -71,6 +71,13 @@
<fileset dir='${basedir}' />
</mpt:mpt>
</target>
+
+ <target name='testMaySetQuiet'>
+ <mpt:mpt port='10000' skip='true' quiet='true'>
+ <fileset dir='${basedir}' />
+ </mpt:mpt>
+ </target>
+
<target name='testShouldAllowAddUserToBeSet'>
<mpt:mpt port='10000' skip='true' host='example.org'>
@@ -121,7 +128,7 @@
</au:expectfailure>
</target>
- <target name='testMptAttributes' depends='testMustSetPort,
testMaySetHost,testMustSetScriptsOrScript, testMustNotAllowScriptsAndScript,
testMaySetShabang'/>
+ <target name='testMptAttributes' depends='testMustSetPort,
testMaySetHost,testMustSetScriptsOrScript, testMustNotAllowScriptsAndScript,
testMaySetShabang, testMaySetQuiet'/>
<target name='testAddUser' depends='testShouldAllowAddUserToBeSet,
testAddUserMustSetPortScript, testAddUserMayIncludeScriptText,
testAddUserBothScriptTextAndScriptAttributeMayNotBeSet,
testAddUserMaySetNamePassword'/>
<target name='all' depends='testMptAttributes, testAddUser'/>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]