ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matthew Inger <ma...@sedonacorp.com>
Subject Re: private
Date Wed, 22 Aug 2001 15:19:48 GMT
i can't answer that for you, but an nicer workaround would be for you to 
keep all your
private targets in another .xml file, and treat it as a subproject. 
 Then keep all your
public targets in your build.xml file.   That way, if someone wants to 
call a so called
"private" target, they really have to make an effort at doing it, by 
explicitly specifying
the buildfile.

cnsxxx09@netscape.net wrote:

>Thanks for the info,
>
>It's certainly a usable workaround which I may have to employ.
>
>But I'm surprised that this isn't either a current feature or a feature planned for Ant
2.
>
>Is there a reason why this doesn't exist?
>
>Thanks
>
>Chris
>-=-=-=
>
>SimonRichardson2@halifax.co.uk wrote:
>
>>Would you settle for setting a property in your main <target> and then
>>perform a check for it on your *private* <target>?  Probably not, it's a bit
>>of a hack!  But, I've included a build xml file anyway ..
>>
>><project name="test" default="main" basedir=".">
>>   <target name="B" if="_internal_call">
>>       <echo message="Hello B"/>
>>   </target>   
>>   <target name="A" depends="B" if="_internal_call">
>>       <echo message="Hello A"/>
>>   </target>
>>   <target name="set_internal_call">
>>       <property name="_internal_call" value="false"/>
>>   </target>
>>   <target name="main" depends="set_internal_call,A">
>>       <echo message="Hello Main"/>
>>   </target>
>></project>
>>
>>
>>Simon
>>
>>-----Original Message-----
>>From: cnsxxx09@netscape.net [mailto:cnsxxx09@netscape.net]
>>Sent: 22 August 2001 09:32
>>To: ant-user@jakarta.apache.org
>>Subject: private
>>
>>
>>Hi,
>>
>>Is it possible (and, if not, forseen) to be able to make a target private;
>>so it can only be called from another target, and not from the command line?
>>
>>I have 2 targets; each sets their own specific properties before sending
>>them to a more generic (and, ideally, private) target.
>>
>>TIA
>>
>>Chris
>>
>>
>>
>>__________________________________________________________________
>>Your favorite stores, helpful shopping tools and great gift ideas.
>>Experience the convenience of buying online with Shop@Netscape!
>>http://shopnow.netscape.com/
>>
>>Get your own FREE, personal Netscape Mail account today at
>>http://webmail.netscape.com/
>>
>>
>>------------------------------------------------------------------------------
>>
>>Part of the Halifax Group, Halifax plc, Registered in England No. 2367076.  Registered
Office: Trinity Road, Halifax, West Yorkshire HX1 2RG. Represents only the Halifax Financial
Services Marketing Group for the purposes of advising on and selling life assurance, pensions
and unit trust business.  The Marketing Group is regulated by the Personal Investment Authority.
 Switchboard 01422 333333.
>>
>>==============================================================================
>>
>>
>
>
>__________________________________________________________________
>Your favorite stores, helpful shopping tools and great gift ideas. Experience the convenience
of buying online with Shop@Netscape! http://shopnow.netscape.com/
>
>Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/
>
>


-- 
Matt Inger (matt.inger@sedonacorp.com)
Sedona Corporation
455 S. Gulph Road, Suite 300
King of Prussia, PA 19406
(484) 679-2213
"Self-respect - the secure feeling that no one,
 as yet, is suspicious." -H.L. Mencken 




Mime
View raw message