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 37688] New: - script task with beanshell confuses Ant references
Date Tue, 29 Nov 2005 10:54:33 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=37688>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=37688

           Summary: script task with beanshell confuses Ant references
           Product: Ant
           Version: 1.6.5
          Platform: PC
        OS/Version: Windows 2000
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Core tasks
        AssignedTo: dev@ant.apache.org
        ReportedBy: vidl@mysunrise.ch


When using a beanshell script, Ant shows a special behavior together with
references.
To have beanshell, I used bsf-2.3.0.jar and bsh-2.0b4.jar in the ${ant.home}/lib
directory.


<?xml version="1.0"?>
<project name="antbug">

  <macrodef name="compileMapper" >
    <attribute name="objDir" />
    <attribute name="id" default="compileMapperID" />
    <sequential>
      <mapper id="@{id}">
        <chainedmapper  >
          <flattenmapper/>
          <globmapper from="*" to="@{objDir}/*.o"/>
        </chainedmapper>
      </mapper>
    </sequential>
  </macrodef>

  <target name="failes">
      <script language="beanshell"><![CDATA[
      // nothing
      ]]></script>
      <!-- throws java.lang.ClassCastException:
org.apache.tools.ant.types.Mapper -->
      <compileMapper objDir="." />
  </target>

  <target name="works">
      <compileMapper objDir="." />
  </target>

  <target name="override" >
      <script language="beanshell"><![CDATA[
      // nothing
      ]]></script>
      <!-- Overriding previous definition of reference to anID -->
      <path id="anID">
        <fileset dir="." includes="*.ant" />
      </path>
  </target>

  <target name="noOverride" >
      <path id="anID">
        <fileset dir="." includes="*.ant" />
      </path>
  </target>

</project>

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


Mime
View raw message