You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by stlecho <st...@gmail.com> on 2009/01/27 09:54:24 UTC
How to load build.xml from a JAR ?
Hi,
I would like to package a build.xml file into a JAR so that it can be
referenced by other projects (using the ant antfile target). I was thinking
about using "classpath:..." in the antfile attribute, but that does not
work. How can this functionality be achieved ?
Regards, Stefan Lecho.
--
View this message in context: http://www.nabble.com/How-to-load-build.xml-from-a-JAR---tp21681760p21681760.html
Sent from the Ant - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
AW: AW: How to load build.xml from a JAR ?
Posted by Ja...@rzf.fin-nrw.de.
>If in projectA the build.xml from projectB is called through the ant
target,
>the basedir of projectA could be used to create directories, resolve
>relative paths etc.. Is this correct ?
>
>Would something similar with
>"jar:file:///some/location/projectB.jar!/build.xml" work ?
No, Ants main class wont accept that url.
'Maybe' there are some scenarios where loading the buildfile from an url
would work. But having that option implies opening for all other
scenarios - and that would require the maintainance.
Jan
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: AW: How to load build.xml from a JAR ?
Posted by stlecho <st...@gmail.com>.
Concerning
Jan.Materne wrote:
> because the project needs a base directory with real "file access"
If in projectA the build.xml from projectB is called through the ant target,
the basedir of projectA could be used to create directories, resolve
relative paths etc.. Is this correct ?
Would something similar with
"jar:file:///some/location/projectB.jar!/build.xml" work ?
Regards, Stefan.
Jan.Materne wrote:
>
>>I would like to package a build.xml file into a JAR so that it can be
>>referenced by other projects (using the ant antfile target). I
>>was thinking
>>about using "classpath:..." in the antfile attribute, but that does not
>>work. How can this functionality be achieved ?
>
> You cant load the buildfile from an URL, because the project needs a
> base directory with real "file access" so it can create directories,
> resolve relative paths etc.
>
> You could unzip the build.xml to a specified location and invoke that.
>
>
> Jan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>
>
--
View this message in context: http://www.nabble.com/How-to-load-build.xml-from-a-JAR---tp21681760p21683679.html
Sent from the Ant - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
AW: How to load build.xml from a JAR ?
Posted by Ja...@rzf.fin-nrw.de.
>I would like to package a build.xml file into a JAR so that it can be
>referenced by other projects (using the ant antfile target). I
>was thinking
>about using "classpath:..." in the antfile attribute, but that does not
>work. How can this functionality be achieved ?
You cant load the buildfile from an URL, because the project needs a
base directory with real "file access" so it can create directories,
resolve relative paths etc.
You could unzip the build.xml to a specified location and invoke that.
Jan
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org