ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <>
Subject AW: Import build files from a jar?
Date Fri, 14 Sep 2007 06:46:48 GMT
We thought about extending <import> to get a resource (JAR, URL, ...), but there is one
"problem": a project must have a basedir from where you could do calculate all the paths.
Not really easy - if possible. What is "/"?

So you cant use the bunch of buildfiles from an archive.

But you can extract these files ...
And (I tested this) you can do this in your main buildfile: contains only b.xml:
<project name="B">
    <target name="imported">

build.xml is:
  <unzip src="" dest="."/>
  <import file="b.xml"/>

14.09.2007  08:44               102 build.xml
14.09.2007  08:42               192

$ant -p
Buildfile: build.xml
    [unzip] Expanding: C:\TEMP\ant-test\ into C:\TEMP\ant-test
     [echo] ${}

Main targets:

Other targets:




>-----Urspr√ľngliche Nachricht-----
>Von: Scot P. Floess [] 
>Gesendet: Donnerstag, 13. September 2007 19:04
>An: Ant Users List
>Betreff: Import build files from a jar?
>I was wondering if its possible to import build files from a Jar file?
>For instance, lets "assume" I wrote a bunch of re-usable Ant scripts, 
>placed them in a zip/jar file and wanted to import a build.xml 
>from said 
>zip/jar file...  The import task doesn't seem to work this way...  Is 
>there something else I can use or is this type of functionality not 
>Scot P. Floess
>27 Lake Royale
>Louisburg, NC  27549
>252-478-8087 (Home)
>919-754-4592 (Work)
>Chief Architect JPlate
>Chief Architect JavaPIM
>To unsubscribe, e-mail:
>For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message