Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 80061 invoked from network); 2 Mar 2004 22:16:32 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 2 Mar 2004 22:16:32 -0000 Received: (qmail 11989 invoked by uid 500); 2 Mar 2004 22:16:09 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 11895 invoked by uid 500); 2 Mar 2004 22:16:09 -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 11731 invoked from network); 2 Mar 2004 22:16:07 -0000 Received: from unknown (HELO web20308.mail.yahoo.com) (216.136.226.89) by daedalus.apache.org with SMTP; 2 Mar 2004 22:16:07 -0000 Message-ID: <20040302221614.82105.qmail@web20308.mail.yahoo.com> Received: from [153.2.246.11] by web20308.mail.yahoo.com via HTTP; Tue, 02 Mar 2004 14:16:14 PST Date: Tue, 2 Mar 2004 14:16:14 -0800 (PST) From: Shailesh Sharma Subject: Re: Calling Ant from a Java main? To: Ant Users List In-Reply-To: <4044F675.5010007@mdl.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-886385826-1078265774=:81774" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N --0-886385826-1078265774=:81774 Content-Type: text/plain; charset=us-ascii hmmm, cool. atleast it gives me some insight. iam curious, what package are you guys using to parse the ANT output ??? "Alexey N. Solofnenko" wrote: It is a custom tool that parses ANT output and creates several reports about what components were built, how much time each step took, what target failed, and so on. Even if its sources were useful I doubt my company would allow it. - Alexey. Shailesh Sharma wrote: >Alex, >could you please explain more on your "build log analyzer that produces >an HTML report about the build" > >and if you can share your build log analyzer code with us ? > > >-shailesh > > >"Alexey N. Solofnenko" wrote: >I would put every into a separate target, specify dependency >between them, if any and run them with "-k" option. For my builds I >wrote a build log analyzer that produces an HTML report about the build. > >- Alexey. > >DDU DUQUENNOY Didier wrote: > > > >>Hi, >> >>I'm (still) trying to automate the run of the junit tests of all my >> >> >modules, running Ant 1.6.0 on a Windows 2000 machine. > > >>Each module has a build.xml script with a 'test' task defined. The test >> >> >task first compile the classes and then run a junit task which outputs a >XML file. > > >>I want to be able to invoke all these tasks and then build a report >> >> >using . > > >>The problem I'm facing are: >>- if a module doesn't compile, I want the next module to be tested. >>- if a module doesn't compile I'd like to be able to see it in the >> >> >final report > > >>I first thought of a main script like this : >> >> >> >> >>[...] >> >> >>but it isn't OK because the run will stop if a module doesn't compile. >> >>So I though of writing a main java class to call my ant scripts. I >> >> >should then be able to detect the failure of a test a do what I want >then. > > >>Here are the techniques I tried: >> >>- use java.lang.Runtime.exec() : I go asynchronous and I can't check >> >> >the state of the run > > >>- use org.apache.tools.ant.launch.Launcher : the first script runs, but >> >> >it seems that there is a System.exit() after :-( > > >>- use or a ProjectHelper to build the project : >>ProjectHelper.getProjectHelper(); >>Project project = new Project(); >>helper.parse(project, xmlFile); >>Target target = (Target)targetTable.get("test"); >>target.execute(); >> >>but I get an error "Could not create task or type of type: junit". But >> >> >junit.jar and all the contents of Ant1.6/lib is in my classpath > > >>- use of org.apache.tools.ant.taskdefs.Ant to simulate a : >>Ant antTask = new Ant(); >>antTask.setProject(new Project()); >>antTask.setAntfile(xmlFile); >>antTask.setTarget("test"); >>antTask.execute(); >> >>but I get an error "Could not create task or type of type: property". >> >> >(???) > > >>Well, how can I do the trick? >> >>Didier D >> >>_______________________________________________________________________ >> >> >__________________________________ > > >>Ce message (et toutes les pi�ces jointes) sont confidentiels ; son >> >> >contenu ne repr�sente en aucun cas un engagement de la part de DEXIA >SOFAXIS. Toute publication, utilisation ou diffusion, m�me partielle, >doit �tre autoris�e pr�alablement par l'�metteur. > > >>Si vous n'�tes pas destinataire de ce message, merci d'en avertir >> >> >imm�diatement l'exp�diteur. > > >>Conform�ment aux dispositions de la loi n� 78-17 du 6 janvier 1978 >> >> >relative � l'informatique, aux fichiers et aux libert�s, vous pouvez >obtenir communication et, le cas �ch�ant, rectification ou suppression >des informations vous concernant en vous adressant � DEXIA SOFAXIS - >Route de Creton - 18110 VASSELAY > > >>_______________________________________________________________________ >> >> >__________________________________ > > >>Consultez notre site internet http://www.sofaxis.com >> >> >> >> >>--------------------------------------------------------------------- >>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org >>For additional commands, e-mail: user-help@ant.apache.org >> >> >> >> > >--------------------------------------------------------------------- >To unsubscribe, e-mail: user-unsubscribe@ant.apache.org >For additional commands, e-mail: user-help@ant.apache.org > > >--------------------------------- >Do you Yahoo!? >Yahoo! Search - Find what you�re looking for faster. > > > > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org --------------------------------- Do you Yahoo!? Yahoo! Search - Find what you�re looking for faster. --0-886385826-1078265774=:81774--