I'm not sure if this is useful to anyone, but I've attached my patch
that lets you turn off output to STDOUT by using 
<javadoc showoutput="false">


On Wed, 2005-03-16 at 15:15 -0800, Matt Benson wrote:
> --- Michael Pelz Sherman <[EMAIL PROTECTED]>
> wrote:
> > Thanks for the info on <record>, Matt. Unfortunately
> > my real objective here is
> > to suppress the javadoc warnings etc. from spamming
> > my console.
> 
> I'll try to get that into Ant 1.7 .  If you're good I
> might even shoot for 1.6.3 but that's not far off so
> we'll see...
> 
> -Matt
> 
> > 
> > - mps
> > 
> > --- Matt Benson <[EMAIL PROTECTED]> wrote:
> > > 
> > > --- Michael Pelz Sherman <[EMAIL PROTECTED]>
> > > wrote:
> > > > Hi,
> > > > 
> > > > Can anyone tell me how to suppress and/or
> > redirect
> > > > the output of the javadoc
> > > > task to a file?
> > > 
> > > IIRC it is somewhere on my virtual TODO list to
> > add
> > > redirector support to the javadoc task.  Assuming
> > you
> > > want it in a file more than you want it
> > suppressed,
> > > you can use the record task to achieve the former.
> > > 
> > > Sorry,
> > > Matt
> > > 
> > > > 
> > > > Thanks!
> > > > - mps
> > > > 
> > > >
> > >
> >
> ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail:
> > > > [EMAIL PROTECTED]
> > > > For additional commands, e-mail:
> > > > [EMAIL PROTECTED]
> > > > 
> > > > 
> > > 
> > > 
> > >   
> > >           
> > > __________________________________ 
> > > Do you Yahoo!? 
> > > Yahoo! Mail - You care about security. So do we. 
> > > http://promotions.yahoo.com/new_mail
> > > 
> > >
> >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> > [EMAIL PROTECTED]
> > > For additional commands, e-mail:
> > [EMAIL PROTECTED]
> > > 
> > > 
> > 
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > [EMAIL PROTECTED]
> > For additional commands, e-mail:
> > [EMAIL PROTECTED]
> > 
> > 
> 
> 
>               
> __________________________________ 
> Do you Yahoo!? 
> Yahoo! Small Business - Try our new resources site!
> http://smallbusiness.yahoo.com/resources/ 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
--- apache-ant-1.6.2/src/main/org/apache/tools/ant/taskdefs/Javadoc.java.orig	2005-03-16 19:06:10.920733040 -0600
+++ apache-ant-1.6.2/src/main/org/apache/tools/ant/taskdefs/Javadoc.java	2005-03-16 19:27:15.721454104 -0600
@@ -432,6 +432,7 @@
     private String source = null;
     private boolean linksource = false;
     private boolean breakiterator = false;
+    private boolean showoutput = true;
     private String noqualifier;
 
     private Vector fileSets = new Vector();
@@ -1553,6 +1554,16 @@
         this.noqualifier = noqualifier;
     }
 
+    /**
+     * If false, output generated by the javadoc command will not be shown.
+     *
+     * @since Ant 1.6
+     */
+    public void setShowoutput(boolean showoutput) {
+        this.showoutput = showoutput;
+    }
+
+
     public void execute() throws BuildException {
         if ("javadoc2".equals(getTaskType())) {
             log("!! javadoc2 is deprecated. Use javadoc instead. !!");
@@ -1924,8 +1935,13 @@
 
         log("Javadoc execution", Project.MSG_INFO);
 
-        JavadocOutputStream out = new JavadocOutputStream(Project.MSG_INFO);
+        JavadocOutputStream out;
         JavadocOutputStream err = new JavadocOutputStream(Project.MSG_WARN);
+        if (showoutput) {
+            out = new JavadocOutputStream(Project.MSG_INFO);
+        } else {
+            out = new JavadocOutputStream(Project.MSG_DEBUG);
+        }
         Execute exe = new Execute(new PumpStreamHandler(out, err));
         exe.setAntRun(getProject());
 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to