ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joseph Campbell <jcampb...@inventa.com>
Subject Re: Embedding Ant...
Date Fri, 18 Jul 2003 18:50:04 GMT
Not really what I am looking for.

The full scenario looks like this: I am developing an Install Process for an 
item that I upload to a tomcat web site.  Tomcat is taking care of a some 
JNDI stuff (Most importantly a database connection) that I will need in the 
process.  So I need to bootstrap an ant process and point it to a directory 
that contains the "Unarchived" version of the thing that I have uploaded to 
my portal.  Kinda like a WAR file unpacking itself, but a little more on the 
complex side.  I have to merge files, and do some database inserts - among 
other things.  ANT plays a perfect fit due to its ability to specialize my 
own "Tasks" and targets, not to mention using the built in ones in a nice 
easy to read XML format.  This will also provide that addtional benefit of 
allowing me to make a file "Builder" application which will dynamically build 
the xml build.xml file and package the other stuff needed in a nice archive 
file. 

I just have to find a way to start ANT without it using a System.exit() call.  
This call will be from a java class inside of the web app noted above, and 
will be triggered by an end user.

Thanks,
	Joe

On Friday 18 July 2003 2:42 pm, Alexey Solofnenko wrote:
> Look at ant.bat - it executes ANT inside. You can set classpath and call
> the same class from your code.
>
> - Alexey.
> --
> { http://trelony.cjb.net/ } Alexey N. Solofnenko
> Pleasant Hill, CA (GMT-8 usually)
>
>
> -----Original Message-----
> From: Joseph Campbell [mailto:jcampbell@inventa.com]
> Sent: Friday, July 18, 2003 11:37 AM
> To: user@ant.apache.org
> Subject: Embedding Ant...
>
> I have run afoul attempting to call ant from another process.  I searched
> this
> list (Archive) looking for anyone else who has attempted to embed ant into
> their application and the only message I have found pertains to actually
> copying the Main.java into the class I am writing to by-pass some things
> that
> Main does (i.e. the System.exit(0) type calls).
>
> This is not a good solution for me as I am writing a system that will go up
> for sale and I can not risk "infecting" what I writing with a license that
> would force me to "open" my code up to the world.
>
> Has anyone done this?
> 	Joe

-- 
I wonder if there is anyone in the world who works harder 
at anything than American school kids work at popularity. 
Navy SEALs and neurosurgery residents seem slackers by 
comparison.
     - Paul Graham
-----------------------------------------------------
Joseph Campbell      | EMAIL: jcampbell@inventa.com
Staff Consultant     | URL:   www.inventa.com
Inventa Technologies | PH:    (856)914-5200
                     | PGER:  (888)454-0876
-----------------------------------------------------


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


Mime
View raw message