Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 59406 invoked from network); 10 Oct 2007 12:32:35 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 10 Oct 2007 12:32:35 -0000 Received: (qmail 91714 invoked by uid 500); 10 Oct 2007 12:32:17 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 91690 invoked by uid 500); 10 Oct 2007 12:32:17 -0000 Mailing-List: contact user-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list user@ant.apache.org Received: (qmail 91679 invoked by uid 99); 10 Oct 2007 12:32:17 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Oct 2007 05:32:17 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [62.154.176.138] (HELO icon040.icongmbh.de) (62.154.176.138) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Oct 2007 12:32:17 +0000 Received: from icsrv02.icongmbh.de (unknown [192.168.195.2]) by icon040.icongmbh.de (Postfix) with ESMTP id 78B88FDE5 for ; Wed, 10 Oct 2007 14:31:15 +0200 (CEST) Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-MimeOLE: Produced By Microsoft Exchange V6.5 Subject: AW: Accessing Properties from Sub-Projects Date: Wed, 10 Oct 2007 14:31:14 +0200 Message-ID: <06080D44730F41428BAF2168FA8BDD800141B4FB@icsrv02.icongmbh.de> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Accessing Properties from Sub-Projects thread-index: AcgFl14LZZgYDOozQnKrlAJEm7zgIwFoWxuw References: <006c01c80525$bae41de0$0f00a8c0@sydney> <4703524B.7000704@apache.org> From: =?iso-8859-1?Q?Knuplesch=2C_J=FCrgen?= To: "Ant Users List" X-Virus-Checked: Checked by ClamAV on apache.org I used antcallback from antcontrib in my Buildfile: So I got back if one of my tests failed. antFetch is the same f=FCr calling external Buildfiles. Use http://sourceforge.net/project/showfiles.php?group_id=3D36177 to get = antcontrib. --=20 J=FCrgen Knuplesch www.icongmbh.de icon Systemhaus GmbH Tel. +49 711 806098-275 Sophienstra=DFe 40 =20 D-70178 Stuttgart Fax. +49 711 806098-299 Gesch=E4ftsf=FChrer: Uwe Seltmann HRB Stuttgart 17655 USt-IdNr.: DE 811944121=20 -----Urspr=FCngliche Nachricht----- Von: Steve Loughran [mailto:stevel@apache.org]=20 Gesendet: Mittwoch, 3. Oktober 2007 10:27 An: Ant Users List Betreff: Re: Accessing Properties from Sub-Projects Christoph Krammer wrote: > Hello everybody, >=20 > I use Ant together with a Test framework for Web applications (Canoo=20 > WebTest). The main structure of the Ant files is the following: >=20 > main build.xml: >=20 > >=20 > =09 > > =09 > >=20 > > > > > >=20 > Excerpt from the webtest.xml: >=20 > ... > > =20 > inheritRefs=3D"true"/> > > ... >=20 > Excerpt from tests/jsfTest.xml: >=20 > >=20 > >=20 > > ... > > =09 > > test.failure: ${test.failure} > > > >=20 >=20 > If the test fails, the ${test.failure} property is set within the=20 > project in the jsfTest.xml file. But the problem is that I need the=20 > value of this property in the main build.xml file, since I want to=20 > decide further actions on basis of this value after all tests have = been run. the ant-contrib extensions on sourceforge have a task to get results = back >=20 > I know one simple solution: To export the test.failure property to a=20 > file and read it in the build.xml. But this solution has one major=20 > drawback: The final test suite will consist of lots of webtest=20 > projects in different xml files (one per developer). The problem is to = > ensure that the test.failure value is exported in all files, in each=20 > single test's xml. If any one developer omits the export, a failure of = > his tests will not be taken into account for further decisions (like = deployment to a productive system). > Obviously, this is not perfect. No, it isnt 1. you should have a common build file that is pulled in to the main = file with ; it can do the result output 2. you can create a test.failed file for every project (build/results/tests.${ant.project.name}.failed) if -and only if- the = tests for that project failed. 3. then, the toplevel file uses to look for any file = matching that pattern, which implies that the test failed. -steve --=20 Steve Loughran http://www.1060.org/blogxter/publish/5 Author: Ant in Action http://antbook.org/ --------------------------------------------------------------------- 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