Return-Path: Delivered-To: apmail-ant-dev-archive@www.apache.org Received: (qmail 28284 invoked from network); 2 Jul 2005 00:33:44 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 2 Jul 2005 00:33:44 -0000 Received: (qmail 77221 invoked by uid 500); 2 Jul 2005 00:33:42 -0000 Delivered-To: apmail-ant-dev-archive@ant.apache.org Received: (qmail 77167 invoked by uid 500); 2 Jul 2005 00:33:42 -0000 Mailing-List: contact dev-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Ant Developers List" Reply-To: "Ant Developers List" Delivered-To: mailing list dev@ant.apache.org Received: (qmail 77146 invoked by uid 500); 2 Jul 2005 00:33:41 -0000 Received: (qmail 77142 invoked by uid 99); 2 Jul 2005 00:33:41 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [192.87.106.226] (HELO ajax.apache.org) (192.87.106.226) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Jul 2005 17:33:41 -0700 Received: from ajax.apache.org (ajax.apache.org [127.0.0.1]) by ajax.apache.org (Postfix) with ESMTP id DC06813 for ; Sat, 2 Jul 2005 02:33:38 +0200 (CEST) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Apache Wiki To: ant-cvs@apache.org Date: Sat, 02 Jul 2005 00:33:38 -0000 Message-ID: <20050702003338.29432.38971@ajax.apache.org> Subject: =?utf-8?q?=5BAnt_Wiki=5D_Update_of_=22AntSampleFiles/JythonAndAnt=22_by_J?= =?utf-8?q?=C3=BCrgenHermann?= X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Dear Wiki user, You have subscribed to a wiki page or wiki category on "Ant Wiki" for change notification. The following page has been changed by JürgenHermann: http://wiki.apache.org/ant/AntSampleFiles/JythonAndAnt New page: #prgam section-numbers 2 = Using Jython scripting with Ant = [[TableOfContents]] == Description == The following build script, import script and python script define the ``, `` and `if` tasks that provide the full expression power of Jython to Ant scripts. If you run `ant` after you saved all three files to a directory, you'll get output similar to this: {{{ jython.home='D:\\jython-2.1' [jyant-info] name = 'jyant' [jyant-info] ant env = {'__name__': 'main', ...} [jyant-info] modules = {..., 'jyant': , ...} [echo] dummy1 = no dot [echo] dummy2 = no . [echo] foobar = foo**************************************** [echo] number+5 = 42 [echo] 5+number = 42 [echo] true = 1 [echo] false = 0 [echo] life = universe [echo] life2 = everything [echo] nolife = ${nolife} [echo] empty = 'true' [echo] number! (OK) [echo] FALSE! (OK) [echo] TRUE! (OK) [echo] Now cheching subelement assertion... [if] Traceback (innermost last): [if] File "", line 6, in ? [if] File "jyant.py", line 99, in execute [if] AssertionError: Only one subelement allowed! }}} == Files == === build.xml === inline:build.xml.txt === jyant.xml === inline:jyant.xml.txt === jyant.py === inline:jyant.py --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org For additional commands, e-mail: dev-help@ant.apache.org