If I read the source of Ants main class [1] I would think, that the buildfile must be a real file on the file system. It cannot be run from the classpath.
What do you expect from bundling the buildfile in a jar? A workaround is using a "launcher buildfile" which extracts the content oft he jar (maybe download the jar before from a repository) and <ant> the downloaded file. Viele Grüße Jan [1] http://svn.apache.org/repos/asf/ant/core/trunk/src/main/org/apache/tools/ant/Main.java -----Ursprüngliche Nachricht----- Von: jro...@redlinesolutions.biz [mailto:jro...@redlinesolutions.biz] Im Auftrag von Jose Rojas Gesendet: Donnerstag, 17. Januar 2013 11:01 An: Ant Users List Betreff: Packaging ant scripts into a jar Hello, I have an ant build process that I would like bundle into a jar. Is it possible for ant to run a build.xml found within a jar file instead of a file within the local file system? I know I can script Ant within a custom Java program to possibly handle some of this, but I also have special hooks within my custom build.xml that use the 'ant' task to call external ant scripts for extra customization. It would be nice if Ant could look within the current classpath/jar to find these, or if not within the classpath/jar, then look for it within the file system. Is this architecture possible with Ant? Thanks for the help. --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@ant.apache.org For additional commands, e-mail: user-h...@ant.apache.org