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 12709] New: - <script> BSF optional task too crippled to be useful currently
Date Mon, 16 Sep 2002 21:51:49 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=12709>.
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=12709

<script> BSF optional task too crippled to be useful currently

           Summary: <script> BSF optional task too crippled to be useful
                    currently
           Product: Ant
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Enhancement
          Priority: Other
         Component: Optional Tasks
        AssignedTo: ant-dev@jakarta.apache.org
        ReportedBy: jadams@enteract.com


In the current code of the <script> optional task that uses BSF,
it is failing to create a majority of useful 'beans' becaus the code
currently will only use declareBean() on the BSF manager and only if
any bean name is Character.isJavaIdentifier valid...

Thus, the code then ends up excluding any property of the ant project that 
includes a dot "." and a vast majority of the properties as well as a common
convention for user properties ends up not being defined.

While it is desirable for all ant project properties to be automatically
defined using declareBean on the BSF Manager,
it would also be just as useful and feature complete if the script task
would not just throw away properties not valid for declareBean,
but instead define them at least using
BSF Manager's  registerBean() so that all properties could be found
using bsf.lookupBean() which uses the string of the bean name and does
not carry the naming restriction that declareBean does

That way, all properties could be found with bsf's lookupBean instead
of just those that happen to work with declareBean

Please consider adding this to the script task functionality as it really
limits a script's access to all the properties defined.

The current workaround is to know

project.getProperties().get("ant.file")

where at least

bsf.lookupBean("ant.file")

could be made to work

Thanks
Jeff

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


Mime
View raw message