Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 84391 invoked from network); 2 Mar 2004 22:24:39 -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:24:39 -0000 Received: (qmail 24856 invoked by uid 500); 2 Mar 2004 22:24:17 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 24826 invoked by uid 500); 2 Mar 2004 22:24:17 -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 24810 invoked from network); 2 Mar 2004 22:24:17 -0000 Received: from unknown (HELO mclmx.mail.saic.com) (149.8.64.10) by daedalus.apache.org with SMTP; 2 Mar 2004 22:24:17 -0000 Received: from mcl-its-ieg01.mail.saic.com by mclmx.mail.saic.com for user@ant.apache.org; Tue, 2 Mar 2004 17:24:11 -0500 Received: from mcl-its-exbh01.mail.saic.com ([149.8.64.11]) by mcl-its-ieg01.mail.saic.com (SAVSMTP 3.1.2.35) with SMTP id M2004030217241024228 for ; Tue, 02 Mar 2004 17:24:10 -0500 Received: by mcl-its-exbh01.mail.saic.com with Internet Mail Service (5.5.2657.72) id ; Tue, 2 Mar 2004 17:24:10 -0500 Message-Id: <860AD41E1A9F9E478C5D3B18AAC39468877984@us-vienna-fims.mail.saic.com> From: "Chon, Ae H" To: 'Ant Users List' Subject: RE: Calling Ant from a Java main? Date: Tue, 2 Mar 2004 17:24:10 -0500 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2657.72) Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable 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 Shailesh, You can use ANT's listener to capture your build log then transform the build log to html using xslt task. I have it set up where I execute a build with a listener to capture the = log. ant -f build_csharp.xml -listener org.apache.tools.ant.XmlLogger" /> This will generate a "log.xml" file. then... use XSLT task to transform the log.xml to a html build file = using log.xsl stylesheet that ANT provides. don't know if this is what your looking for. hope this helps. -----Original Message----- From: Shailesh Sharma [mailto:shailesh_scea@yahoo.com] Sent: Tuesday, March 02, 2004 3:59 PM To: Ant Users List Subject: Re: Calling Ant from a Java main? Alex, could you please explain more on your "build log analyzer that produces = an HTML report about the build" =20 and if you can share your build log analyzer code with us ? =20 =20 -shailesh "Alexey N. Solofnenko" wrote: I would put every into a separate target, specify dependency=20 between them, if any and run them with "-k" option. For my builds I=20 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.=20 >- 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 : > >=20 >=20 >=20 > [...] >=20 > >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 =3D new Project(); > helper.parse(project, xmlFile); > Target target =3D (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 =3D 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=E8ces jointes) sont confidentiels ; son = contenu ne repr=E9sente en aucun cas un engagement de la part de DEXIA SOFAXIS. = Toute publication, utilisation ou diffusion, m=EAme partielle, doit =EAtre = autoris=E9e pr=E9alablement par l'=E9metteur.=20 > >Si vous n'=EAtes pas destinataire de ce message, merci d'en avertir imm=E9diatement l'exp=E9diteur. > >Conform=E9ment aux dispositions de la loi n=B0 78-17 du 6 janvier 1978 = relative =E0 l'informatique, aux fichiers et aux libert=E9s, vous pouvez obtenir communication et, le cas =E9ch=E9ant, rectification ou suppression des informations vous concernant en vous adressant =E0 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 >=20 > --------------------------------------------------------------------- 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