ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "SteveB" <x1...@passeridae.de>
Subject include via script task
Date Sun, 25 Nov 2012 13:08:03 GMT
Hi all,

 

I'm trying to call ant's include task inside a <script> element, like 

  

<script language="beanshell">

    <![CDATA[

        import org.apache.tools.ant.taskdefs.ImportTask;

       

        ImportTask includeTask = project.createTask("include");

        includeTask.setFile("./global-properties.xml");

        includeTask.perform();

    ]]>

</script>

 

This fails with the error  "import only allowed as a top-level task".

 

Anyone knows how to create a "top level task" inside a <script> element ? 

 

Thanks,

 

Steve.

 

 

 

 


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message