You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Thorbjørn Ravn Andersen <no...@gmail.com> on 2010/01/27 10:46:29 UTC

ant -u http://somewhere/build.xml

Hi.

We have a need for ant to be easily able to use a build.xml file 
available on a remote server, which means that I would really like to be 
able to provide an URL instead of a filename to ant.

I just found that 1.8rc0 has been released, so to check if ant already 
can do this I downloaded the svn source for HEAD [1], and had a quick 
look at the source for org.apache.tools.ant.Main, where it seems that 
all the logic for the build file is File-based, and a quick look at the 
developer mailing list and the issues system did not immediately reveal 
any discussion on this.

I'd really, really like this to be possible in ant 1.8, hence this 
hurried mail, and I'd be happy to help.

What should I do now?

/Thorbjørn


[1] The "ant bootstrap" process fails compiling optional taskdefs for a 
plain svn extract.  The installation documents does not mention how to 
circumvent this.

-- 
  Thorbjørn Ravn Andersen  "...plus... Tubular Bells!"


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


Re: AW: ant -u http://somewhere/build.xml

Posted by Thorbjørn Ravn Andersen <no...@gmail.com>.
Jan.Materne@rzf.fin-nrw.de skrev:
>
> A shorter way would
>
> $ant -u url -basedir .
>
> which autoloads that buildfile sets the url and basedir and all should
> work?
>   
That would be fine for me, certainly.

-- 
  Thorbjørn Ravn Andersen  "...plus... Tubular Bells!"


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


AW: ant -u http://somewhere/build.xml

Posted by Ja...@rzf.fin-nrw.de.
>> We have a need for ant to be easily able to use a build.xml file 
>> available on a remote server, which means that I would really like to

>> be able to provide an URL instead of a filename to ant.

>the import task in 1.8.x supports importing resources which can be
URLs. 
>So maybe the main build file cannot be http based, but the meat of the 
>build file can. So maybe you can have a stub of a build file 
>on the file system ?


If the easiest "URL buildfile scenario" is

$ant -f build.xml -Durl=...

<project>
  <import><url url="${url}"/></import>
</project>


A shorter way would

$ant -u url -basedir .

which autoloads that buildfile sets the url and basedir and all should
work?



Jan

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


Re: ant -u http://somewhere/build.xml

Posted by Thorbjørn Ravn Andersen <no...@gmail.com>.
Antoine Levy Lambert skrev:
> the import task in 1.8.x supports importing resources which can be 
> URLs. So maybe the main build file cannot be http based, but the meat 
> of the build file can. So maybe you can have a stub of a build file on 
> the file system ?
The scenario for this is that we frequently have to bootstrap our 
deployment scheme on machines with not much more than a JVM[1], but 
which can "call home".  Being able to pull in the environment from the 
mother ship means things are easier to script.  I did not know the 
import task now knows URL's, which could mean that the functionality I 
need could be satisfied simply by downloading the remote build.xml file 
to a temporary local file (with basedir set to current directory), 
executed, and then deleted when the JVM exits.

[1] I'd also like an easy ant deployment scheme on such a machine, but 
that is an issue for another day.

>> I just found that 1.8rc0 has been released, so to check if ant 
>> already can do this I downloaded the svn source for HEAD [1], and had 
>> a quick look at the source for org.apache.tools.ant.Main, where it 
>> seems that all the logic for the build file is File-based, and a 
>> quick look at the developer mailing list and the issues system did 
>> not immediately reveal any discussion on this.
>>
>> I'd really, really like this to be possible in ant 1.8, hence this 
>> hurried mail, and I'd be happy to help.
>>
>> What should I do now?
>>
>> /Thorbjørn
>>
>>
>> [1] The "ant bootstrap" process fails compiling optional taskdefs for 
>> a plain svn extract.  The installation documents does not mention how 
>> to circumvent this.
>>
> to build the optional tasks, you need to download the dependencies 
> using ant -f fetch.xml ... (there are additional parameters). This can 
> put the libraries in lib/optional where the bootstrap process uses 
> them. I think currently only NetRexx is the only commercial dependency 
> which cannot be fetched that way, at least for my JDK 1.5 on Mac which 
> include s JMF and JAI in the extensions.
>
Thank you!  I now have a compiling tree.

I'll have a closer look :)

-- 
  Thorbjørn Ravn Andersen  "...plus... Tubular Bells!"


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


Re: ant -u http://somewhere/build.xml

Posted by Antoine Levy Lambert <an...@gmx.de>.
Hello Thorbjørn,


Thorbjørn Ravn Andersen wrote:
> Hi.
>
> We have a need for ant to be easily able to use a build.xml file 
> available on a remote server, which means that I would really like to 
> be able to provide an URL instead of a filename to ant.
the import task in 1.8.x supports importing resources which can be URLs. 
So maybe the main build file cannot be http based, but the meat of the 
build file can. So maybe you can have a stub of a build file on the file 
system ?
>
> I just found that 1.8rc0 has been released, so to check if ant already 
> can do this I downloaded the svn source for HEAD [1], and had a quick 
> look at the source for org.apache.tools.ant.Main, where it seems that 
> all the logic for the build file is File-based, and a quick look at 
> the developer mailing list and the issues system did not immediately 
> reveal any discussion on this.
>
> I'd really, really like this to be possible in ant 1.8, hence this 
> hurried mail, and I'd be happy to help.
>
> What should I do now?
>
> /Thorbjørn
>
>
> [1] The "ant bootstrap" process fails compiling optional taskdefs for 
> a plain svn extract.  The installation documents does not mention how 
> to circumvent this.
>
to build the optional tasks, you need to download the dependencies using 
ant -f fetch.xml ... (there are additional parameters). This can put the 
libraries in lib/optional where the bootstrap process uses them. I think 
currently only NetRexx is the only commercial dependency which cannot be 
fetched that way, at least for my JDK 1.5 on Mac which include s JMF and 
JAI in the extensions.

Regards,

Antoine

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