ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <Jan.Mate...@rzf.fin-nrw.de>
Subject AW: AW: Call Ant task from java file
Date Mon, 15 Aug 2005 05:33:26 GMT
Change
  <fileset dir="someDir" includes="**/CVS" defaultexcludes="no"/>
to
  <fileset dir="someDir" includes="**/CVS/" defaultexcludes="no"/> 

A "**/CVS" catches only a file CVS, but not all files in the directory.
A "**/CVS/" is expanded to "**/CVS/**" which catches all subdirectories and contained files.


Jan


>-----Urspr├╝ngliche Nachricht-----
>Von: graste [mailto:graste@gmail.com] 
>Gesendet: Freitag, 12. August 2005 16:47
>An: Ant Users List
>Betreff: Re: AW: Call Ant task from java file
>
>Am Fri, 12 Aug 2005 15:51:37 +0200 schrieb 
><Jan.Materne@rzf.fin-nrw.de>:
>
>> And you┬┤re trying to catch files (include="**/CVS/") without 
>touching 
>> the default excludes...
>>
>
>Thanks. Default excludes were an issue. I could successfully 
>run my plugin  
>and the ant task from it to delete files.
>But I wonder: how do I have to use the delete task to delete 
>all "CVS"  
>directories (with all the files in them) in a specified folder 
>(recursing  
>into subdir to delete CVS there as well). I had no luck with 
>it, because  
>delete only works for files?
>
><delete includeEmptyDirs="true">
>	<fileset dir="someDir" includes="**/CVS" defaultexcludes="no"/>
></delete>
>
>As a starting point. :\
>
>
>>>
>>> You didn't specify, what's going wrong, when you run your code.
>>> I recommend writing an Ant task first and then use it outside
>>> of a build.xml instead of using ant classes directly.
>
>Yes, that's right. But I didn't get any output at all when 
>running the  
>task from inside a java class. So how can I get the ant log 
>messages as a  
>string?
>
> From my first message:
>
>BuildLogger log = new DefaultLogger();
>log.setMessageOutputLevel(Project.MSG_VERBOSE);
>log.setOutputPrintStream(System.out);
>log.setErrorPrintStream(System.out);
>project.addBuildListener(log);
>
>Did not produce any outputs for me.
>
>>>
>>> Maybe you code fails only because of the missing dummy 
>target object.
>
>I added a dummy target and it works. Thanks.
>
>>>
>>> Regards,
>>> Martin
>>>
>
>
>Thanks again for your help. I appreciate it.
>
>Steffen Gransow
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>For additional commands, e-mail: user-help@ant.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message