Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 40224 invoked from network); 15 Dec 2010 08:59:52 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 15 Dec 2010 08:59:52 -0000 Received: (qmail 50861 invoked by uid 500); 15 Dec 2010 08:59:52 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 50749 invoked by uid 500); 15 Dec 2010 08:59:52 -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 50740 invoked by uid 99); 15 Dec 2010 08:59:51 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Dec 2010 08:59:51 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [213.132.103.110] (HELO mke-srvl-dns01.mpsbroadband.se) (213.132.103.110) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Dec 2010 08:59:44 +0000 Received: from mke-srvw-dc01.MKE.local (client.mpsbroadband.com [213.132.103.97]) by mke-srvl-dns01.mpsbroadband.se (8.13.4/8.13.4) with ESMTP id oBF90XSB005208; Wed, 15 Dec 2010 10:00:33 +0100 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: RE: Fixed default target Date: Wed, 15 Dec 2010 09:59:20 +0100 Message-ID: In-Reply-To: <1801827537-1292403289-cardhu_decombobulator_blackberry.rim.net-536300766-@b17.c2.bise7.blackberry> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Fixed default target Thread-Index: AcucNdCP4cpNP3QoTzeaHeT/P3SFhgAAGzeA References: <1801827537-1292403289-cardhu_decombobulator_blackberry.rim.net-536300766-@b17.c2.bise7.blackberry> From: "Roos Tomas" To: "Ant Users List" , X-Virus-Checked: Checked by ClamAV on apache.org Yeah i thought of that too, though it isn't that clear for users that has been using ant earlier and got a list of targets. But I guess that's the last out come. Thanks! -----Original Message----- From: ltsao@talk21.com [mailto:ltsao@talk21.com]=20 Sent: den 15 december 2010 09:55 To: Ant Users List Subject: Re: Fixed default target How about treating 'target' as command parameter, then do recursive ant call using param as target. Sent from my BlackBerry(r) wireless device -----Original Message----- From: "Roos Tomas" Date: Wed, 15 Dec 2010 09:48:31 To: Ant Users List Reply-To: "Ant Users List" Subject: RE: Fixed default target Well the thing is we have a multi build file system and in the root i just want to relay the targets that were chosen by the commandline down to root\module\build.xml. But the thing it is not possible to get the ${ant.project.invoked-targets} before entering a target, which you mentioned. Therefore it isn't possible to invoke with subant in an initializer. So I guess there is no workaround for this ? Tomas -----Original Message----- From: David Weintraub [mailto:qazwart@gmail.com] Sent: den 14 december 2010 14:45 To: Ant Users List Subject: Re: Fixed default target On Tue, Dec 14, 2010 at 3:47 AM, Roos Tomas wrote: > I'm wondering if it's possible to have a fixed default target, which=20 > always executes instead of what's put on the command-line? > > The reason for this is we use the depends feature of ant to be able to > for instance publish to an ivy repository with a better flow. ant=20 > local milestone publish. You could start all of the other target names with dashes. This makes them impossible to execute on the command line. It's a common tactic to make internal targets start with a dash for this reason. If this is for initialization purposes, you can have non-targeted tasks at the beginning of your Ant build.xml file. All of those tasks will be executed no matter what target is selected. Unfortunately, you can't use the "Ant" or "Antcall" task in this section. These will only be executed if they're inside of an Ant target. Otherwise, you could put these as part of the preliminary stuff and prevent people from executing other tasks directly. If you need to hit a preliminary task, you can make all other tasks in your Antfile depend upon that task. This request is a bit "unusual" because you're basically preventing the developer from using Ant to its fullest. -- David Weintraub qazwart@gmail.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 --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org