You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Giovanni Cuccu - CUP2000 <gi...@cup2000.it> on 2006/09/05 14:53:29 UTC

Adding InpustStream as build file source

Hi all,
	I'm developing an application and I'm planning to use ant inside my 
Java programs to execute generic tasks and projects (the code calling 
Ant is taken from 
http://www-128.ibm.com/developerworks/websphere/library/techarticles/0502_gawor/0502_gawor.html). 
The requirements specify that the build file is provided via tcp/ip 
connection and can be viewed as a InputStream.
My approach to solve this problem has been to modify ProjectHelper2 in 
order to manage InputStream as source. The class I produced seems 
working but before going on I'd like to know:
1)If there is an alternative solution to my problem
2)If my solution fits well into  ant architecture
Thanks in advance,
	Giovanni
-- 
Giovanni Cuccu
CUP 2000 Spa
Via del Borgo di S. Pietro, 90/c - 40126 Bologna
e-mail: giovanni.cuccu _at_ cup2000.it


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


Re: Adding InpustStream as build file source

Posted by Steve Loughran <st...@apache.org>.
Giovanni Cuccu - CUP2000 wrote:
> Hi all,
>     I'm developing an application and I'm planning to use ant inside my 
> Java programs to execute generic tasks and projects (the code calling 
> Ant is taken from 
> http://www-128.ibm.com/developerworks/websphere/library/techarticles/0502_gawor/0502_gawor.html). 
> The requirements specify that the build file is provided via tcp/ip 
> connection and can be viewed as a InputStream.
> My approach to solve this problem has been to modify ProjectHelper2 in 
> order to manage InputStream as source. The class I produced seems 
> working but before going on I'd like to know:
> 1)If there is an alternative solution to my problem
> 2)If my solution fits well into  ant architecture
> Thanks in advance,
>     Giovanni

Ant likes to know where build files live, so that it can build relative 
file references from them. Why not save the input stream to a temporary 
file and run ant without modifying any of it? It's not like you are 
going to take any performance hit given that ant parses the entire 
document before executing any targets.

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