Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 87954 invoked from network); 20 Jan 2005 02:24:03 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 20 Jan 2005 02:24:03 -0000 Received: (qmail 6426 invoked by uid 500); 20 Jan 2005 02:23:56 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 6391 invoked by uid 500); 20 Jan 2005 02:23:56 -0000 Mailing-List: contact user-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list user@ant.apache.org Received: (qmail 6378 invoked by uid 99); 20 Jan 2005 02:23:56 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (hermes.apache.org: local policy) Received: from Unknown (HELO ljubljana.agtrz.com) (69.20.9.152) by apache.org (qpsmtpd/0.28) with SMTP; Wed, 19 Jan 2005 18:23:55 -0800 Received: (qmail 714 invoked by uid 502); 20 Jan 2005 02:23:52 -0000 Date: Wed, 19 Jan 2005 21:23:52 -0500 From: Alan Gutierrez To: Ant Users List , softgnostics k Subject: Re: how to invoke ant via java Message-ID: <20050120022352.GE28227@maribor.izzy.net> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.1i X-Mailer: Mutt http://www.mutt.org/ X-Editor: Vim 6.1 http://www.vim.org/ X-Location: Ann Arbor, Michigan, United States of America X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N * softgnostics k [2005-01-19 15:01]: > Hi all, > > I am newbie to ant and have one query. My application has a new > menu.This menu creates a build.xml Ant file. Now, when this menu is > invoked, its action should call Ant build, so that the build.xml will > do what is necessary. > > How can I do it? That is, how to call the Ant via java? Is there any > way to use an Ant object? Yes. Try reading through the source of: org.apache.tools.ant.launcher.Launcher Cheers. -- Alan Gutierrez - alan@engrm.com --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org