Return-Path: X-Original-To: apmail-ant-user-archive@www.apache.org Delivered-To: apmail-ant-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E63B29FE7 for ; Thu, 1 Mar 2012 17:08:42 +0000 (UTC) Received: (qmail 69457 invoked by uid 500); 1 Mar 2012 17:08:42 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 69430 invoked by uid 500); 1 Mar 2012 17:08:42 -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 69420 invoked by uid 99); 1 Mar 2012 17:08:42 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Mar 2012 17:08:42 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [216.32.181.182] (HELO ch1outboundpool.messaging.microsoft.com) (216.32.181.182) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Mar 2012 17:08:35 +0000 Received: from mail159-ch1-R.bigfish.com (10.43.68.226) by CH1EHSOBE001.bigfish.com (10.43.70.51) with Microsoft SMTP Server id 14.1.225.23; Thu, 1 Mar 2012 17:08:13 +0000 Received: from mail159-ch1 (localhost [127.0.0.1]) by mail159-ch1-R.bigfish.com (Postfix) with ESMTP id F3421440268 for ; Thu, 1 Mar 2012 17:08:13 +0000 (UTC) X-SpamScore: -30 X-BigFish: VPS-30(zz9371I179aM542M1432N98dK14ffO62a3Kzz1202hzz8275bh8275dhz2dh2a8h668h839h944h) X-Forefront-Antispam-Report: CIP:80.238.1.152;KIP:(null);UIP:(null);IPV:NLI;H:CHIXEDG01.BSKYB.COM;RD:ip-80-238-1-152.bskyb.com;EFVD:NLI Received: from mail159-ch1 (localhost.localdomain [127.0.0.1]) by mail159-ch1 (MessageSwitch) id 1330621692304466_6139; Thu, 1 Mar 2012 17:08:12 +0000 (UTC) Received: from CH1EHSMHS028.bigfish.com (snatpool1.int.messaging.microsoft.com [10.43.68.249]) by mail159-ch1.bigfish.com (Postfix) with ESMTP id 45B7740094 for ; Thu, 1 Mar 2012 17:08:12 +0000 (UTC) Received: from CHIXEDG01.BSKYB.COM (80.238.1.152) by CH1EHSMHS028.bigfish.com (10.43.70.28) with Microsoft SMTP Server (TLS) id 14.1.225.23; Thu, 1 Mar 2012 17:08:11 +0000 Received: from CHIXHUB01.bskyb.com (10.20.32.59) by CHIXEDG01.BSKYB.COM (80.238.1.7) with Microsoft SMTP Server (TLS) id 14.2.247.3; Thu, 1 Mar 2012 17:07:43 +0000 Received: from CHIXMBX01.bskyb.com ([169.254.3.80]) by CHIXHUB01.bskyb.com ([10.20.32.59]) with mapi id 14.02.0247.003; Thu, 1 Mar 2012 17:07:42 +0000 From: "Holman, Chris" To: Ant Users List Subject: RE: Passing multiple targets from one build.xml to another build.xml Thread-Topic: Passing multiple targets from one build.xml to another build.xml Thread-Index: AQHM96ThJEiPSuYNIkq1x5u/UEWYQ5ZVXB2ggABEkgCAAAL5AIAABt7g Date: Thu, 1 Mar 2012 17:07:41 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.99.85.136] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: bskyb.com X-Virus-Checked: Checked by ClamAV on apache.org This is how I'd approach the problem. = (I haven't tried it, so there may be some bugs in there): = = = = Regards, Chris Holman, Chordiant/STAR Build Engineer gTalk: chris.d.holman@googlemail.com LinkedIn: http://uk.linkedin.com/in/chrisdholman -----Original Message----- From: Swayam Prakash Vemuri [mailto:vemuriswayam@gmail.com] = Sent: 01 March 2012 16:37 To: Ant Users List Subject: Re: Passing multiple targets from one build.xml to another build.x= ml What I meant by I have only build xml, is I dont have build_abcd.xml and neither I have build_xyz.xml. Say that I have just build.xml with some targets defined. And Iam not invoking any other build xml from this build.xml, that being the case ant understands howmany ever targets I give dynamically. The moment I invoke one build.xml from other, ant is not able to understand= any of the targets passed unless I explicitly define each of the target as you mentioned. Just like in Java where we have varargs, ant should be having something, otherwise in the simple case(where Iam not invoking one build from other) how come ant was able to understand multiple dynamic targets, whereas the same its not able to understand in the case of invoking one build from another thanks Swayam On Thu, Mar 1, 2012 at 9:56 PM, Swayam Prakash Vemuri < vemuriswayam@gmail.com> wrote: > Thanks much Chris for the quick reply. > Full marks to your reasoning, yes by mistake I have not specified any > target it was invoking default target which was deploy. > > But had it been this way, say that, Iam not invoking two different build > xmls, say I have only one build xml, in that case > I am able to give multiple targets dynamically and ant is able to > understand, why the same is not possible when Iam invoking > one build xml from another. Why in the latter case ant is not able to ge= t > the targets dynamically > > Thanks > Swayam > > > On Thu, Mar 1, 2012 at 6:06 PM, Holman, Chris wro= te: > >> The ant task calls the default target of the project being called if you= >> haven't declared a target in the ant task (that's probably why deploy >> target is running). >> If the targets are static you can do this: >> >> >> >> >> >> >> javabuild >> deploy >> >> >> >> >> >> >> javabuild >> deploy >> >> >> >> >> It's a bit more tricky if the targets are dynamic, i.e. can change in >> each invocation; because there are multiple targets. >> In this case you could declare a wrapper target that invoked both (a bit= >> messy if you have many possible target combinations) and pass the name o= f >> this target as a property on the cmd line and use that property in a sin= gle >> target attribute. >> >> >> >> >> >> > target=3D"${BUILD_TARGET}" /> >> >> >> >> >> > target=3D"${BUILD_TARGET}" /> >> >> >> >> Then invoke this using >> >> ant -Dproduct=3Dabcd -DBUILD_TARGET=3Dbuild_and_deploy >> >> Regards, >> Chris Holman >> >> -----Original Message----- >> From: Swayam Prakash Vemuri [mailto:vemuriswayam@gmail.com] >> Sent: 01 March 2012 12:14 >> To: user@ant.apache.org >> Subject: Passing multiple targets from one build.xml to another build.xm= l >> >> Hi All, >> >> In my topmost build.xml Iam doing below >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> Now I am invoking ant as below >> >> ant -Dproduct=3Dabcd javabuild deploy >> >> It is executing build_abcd.xml but it only does 'deploy' its not calling= >> the first target that is 'javabuild'. >> >> So my question is how can I pass javabuild and deploy to build_abcd.xml = or >> build_xyz.xml. can someone pleas help me out >> >> thanks >> Swayam >> >> Information in this email including any attachments may be privileged, >> confidential and is intended exclusively for the addressee. The views >> expressed may not be official policy, but the personal views of the >> originator. If you have received it in error, please notify the sender b= y >> return e-mail and delete it from your system. You should not reproduce, >> distribute, store, retransmit, use or disclose its contents to anyone. >> Please note we reserve the right to monitor all e-mail communication >> through our internal and external networks. SKY and the SKY marks are tr= ade >> marks of British Sky Broadcasting Group plc and are used under licence. >> British Sky Broadcasting Limited (Registration No. 2906991), Sky >> Interactive Limited (Registration No. 3554332), Sky-In-Home Service Limi= ted >> (Registration No. 2067075) and Sky Subscribers Services Limited >> (Registration No. 2340150) are direct or indirect subsidiaries of Britis= h >> Sky Broadcasting Group plc (Registration No. 2247735). All of the compan= ies >> mentioned in this paragraph are incorporated in England and Wales and sh= are >> the same registered office at Grant Way, Isleworth, Middlesex TW7 5QD. >> >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org >> For additional commands, e-mail: user-help@ant.apache.org >> >> > Information in this email including any attachments may be privileged, conf= idential and is intended exclusively for the addressee. The views expressed= may not be official policy, but the personal views of the originator. If y= ou have received it in error, please notify the sender by return e-mail and= delete it from your system. You should not reproduce, distribute, store, r= etransmit, use or disclose its contents to anyone. Please note we reserve t= he right to monitor all e-mail communication through our internal and exter= nal networks. SKY and the SKY marks are trade marks of British Sky Broadcas= ting Group plc and are used under licence. British Sky Broadcasting Limited= (Registration No. 2906991), Sky Interactive Limited (Registration No. 3554= 332), Sky-In-Home Service Limited (Registration No. 2067075) and Sky Subscr= ibers Services Limited (Registration No. 2340150) are direct or indirect su= bsidiaries of British Sky Broadcasting Group plc (Registration No. 2247735)= . All of the companies mentioned in this paragraph are incorporated in Engl= and and Wales and share the same registered office at Grant Way, Isleworth,= Middlesex TW7 5QD. --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org