You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by "Priest, James (NIH/NIEHS) [C]" <Pr...@niehs.nih.gov> on 2007/02/23 21:35:14 UTC

Redirecting output to a file

I'm trying to get Ant to build a SVN log file:

svn log -v --xml > logfile.log

The ">" seems to be causing problems - so I dug around and found this:

http://ant.apache.org/faq.html#shell-redirect-1

But despite various trys using &gt; and various combos of single and
double quotes I can't make it work...

<target name="buildReport">
	<exec executable="svn">
		<arg line="log --xml -v D:\CFProjects\mrc\priv &gt;
D:\temp\svn.log" />
	</exec>
</target>

I'm getting back:
    [exec] svn: Error resolving case of 'D:\CFProjects\mrc\priv >
D:\temp\svn.log'


Jim

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


RE: Redirecting output to a file

Posted by "Priest, James (NIH/NIEHS) [C]" <Pr...@niehs.nih.gov>.
Sweet that worked!!!  In hindsight I should have looked up the exec task
on the Ant site :\

----
output  	Name of a file to which to write the output. If the
error stream is not also redirected to a file or property, it will
appear in this output.
----

Thanks much!!
Jim 

> -----Original Message-----
> From: Scot P. Floess [mailto:floess@mindspring.com] 
> Sent: Friday, February 23, 2007 3:45 PM
> To: Ant Users List
> Subject: Re: Redirecting output to a file
> 
> Try this:
> 
> <exec  executable = "svn"  output = "d:\temp\svn.log">
>                 <arg  line = "log D:\CFProjects\mrc\priv 
> --xml -v"/> </exec>

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


Re: Redirecting output to a file

Posted by Wayne Cannon <wc...@turinnetworks.com>.
I'm new to ant, but can the Log4jListener combined with log4j's 
HTMLAppender be used for this?

--Wayne

Scot P. Floess wrote:
> Try this:
>
> <exec  executable = "svn"  output = "d:\temp\svn.log">
>                <arg  line = "log D:\CFProjects\mrc\priv --xml -v"/>
> </exec>
>
> If you are interested, I also have some XSLT that will convert the 
> output to HTML in a nice format :)
>
> Priest, James (NIH/NIEHS) [C] wrote:
>> I'm trying to get Ant to build a SVN log file:
>>
>> svn log -v --xml > logfile.log
>>
>> The ">" seems to be causing problems - so I dug around and found this:
>>
>> http://ant.apache.org/faq.html#shell-redirect-1
>>
>> But despite various trys using &gt; and various combos of single and
>> double quotes I can't make it work...
>>
>> <target name="buildReport">
>>     <exec executable="svn">
>>         <arg line="log --xml -v D:\CFProjects\mrc\priv &gt;
>> D:\temp\svn.log" />
>>     </exec>
>> </target>
>>
>> I'm getting back:
>>     [exec] svn: Error resolving case of 'D:\CFProjects\mrc\priv >
>> D:\temp\svn.log'
>>
>>
>> Jim
>>
>> ---------------------------------------------------------------------
>> 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


Re: Redirecting output to a file

Posted by "Scot P. Floess" <fl...@mindspring.com>.
Try this:

<exec  executable = "svn"  output = "d:\temp\svn.log">
                <arg  line = "log D:\CFProjects\mrc\priv --xml -v"/>
</exec>

If you are interested, I also have some XSLT that will convert the 
output to HTML in a nice format :)

Priest, James (NIH/NIEHS) [C] wrote:
> I'm trying to get Ant to build a SVN log file:
>
> svn log -v --xml > logfile.log
>
> The ">" seems to be causing problems - so I dug around and found this:
>
> http://ant.apache.org/faq.html#shell-redirect-1
>
> But despite various trys using &gt; and various combos of single and
> double quotes I can't make it work...
>
> <target name="buildReport">
> 	<exec executable="svn">
> 		<arg line="log --xml -v D:\CFProjects\mrc\priv &gt;
> D:\temp\svn.log" />
> 	</exec>
> </target>
>
> I'm getting back:
>     [exec] svn: Error resolving case of 'D:\CFProjects\mrc\priv >
> D:\temp\svn.log'
>
>
> Jim
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>
>   

-- 
Scot P. Floess
27 Lake Royale
Louisburg, NC  27549

252-478-8087 (Home)
919-392-6730 (Work)

Chief Architect JPlate  http://sourceforge.net/projects/jplate
Chief Architect JavaPIM http://sourceforge.net/projects/javapim


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