ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 22020] - addition to <target..> task
Date Mon, 11 Aug 2003 19:15:13 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22020>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22020

addition to <target..> task





------- Additional Comments From gus.heck@olin.edu  2003-08-11 19:15 -------
Ok, I coded this up. I tried to write it in a way that access modifiers could be
used fairly generally by simply ehancing the isAccessibleFrom method that I
added to target. I have only implemented the from the modifiers public and
private, which will mean works on the command line and doesn't work on the
command line.

Those who would like to consider what should be done with import/overide etc can
simply add another access point name to the isAccessibleFrom method and then
check it in whatever code makes decisions about inclusion/invocation/precedence
of targets to find out what the author intended.

My implementation likely needs to have some constants added instead of the magic
words "command line". I wasn't sure where the best place to put such constants
would be, so I just left it. Edit or not as pleases (of course). A patch for
docs will be forthcomming, I want to see if people like my patch before I spend
time documenting. I suspect that there is no good way to write a unit test for
the invocation on the commandline, but if someone can tell me how I am willing
to learn :)

The following build file seems to work as expected... (which I used for testing)

<?xml version="1.0"?>
<project name="access-test" basedir="." default="pubtar">

<target name="pubtar" access="public">
  <echo message="default target called"/>
  <antcall target="privtar"/>
</target>

<target name="pubtar2" access="public" depends="privtar">
  <echo message="default target called"/>
  <antcall target="privtar"/>
</target>

<target name="privtar" access="private">
  <echo message="internal target called"/>
</target>

</project>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message