ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Kuhn <bnk...@gmail.com>
Subject Re: turn off logging for just one task
Date Thu, 13 Oct 2005 20:37:02 GMT
So, this is how I solved the problem. It's kind of a hack, but it works...


package com.briankuhn.ant.taskdefs;

import org.codehaus.groovy.ant.Groovy;
import org.apache.tools.ant.Project;

public class QuietGroovy extends Groovy {

 public void log(String str) {
 this.log(str, Project.MSG_VERBOSE);
 }
}



On 10/13/05, Brian Kuhn <bnkuhn@gmail.com> wrote:
>
> Is there a way to stop a task from logging? I have the following macrodef
> that uses the groovy ant task. Groovy spits out the message "[groovy]
> statements executed successfully" and provides no way to turn it off. Is
> there a way I can override its ability to log?
>
> Thanks,
> Brian
>
>
> <macrodef name="continue">
> <attribute name="property"/>
> <attribute name="message" default="Do you want to continue? "/>
> <attribute name="options" default="y,n"/>
>  <attribute name="abortonoption" default="n"/>
> <sequential>
> <input message="@{message}" validargs="@{options}"
> addproperty="@{property}"/>
> <groovy>
> if ('@{abortonoption}'.equals(properties.get('@{property}'))) {
> ant.fail(message:'Build aborted by user...');
> }
> </groovy>
> </sequential>
> </macrodef>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message