Hi,

sorry if this is a newbie question, but I did not find an answer in docs, faqs, google etc.

I'm using Ant 1.7, and I would like to use the <script> and <scriptdef> tasks to solve a particular problem. Since these are optional tasks, they need various libraries when run under Java5. So far, I was able to run a little "hello world" script. But what really bothers me is that I either have to copy the libraries into my ant installation or have to use the "-lib" option for each of the three libraries. As I want to distribute the project and as it shall be platform independent, writing a shell script or a Windows batch file is not really the solution I imagine. I would prefer to reference the libraries from within the build.xml file, like it is done with <typedef>/<taskdef> for external tasks. Trying to use the <typedef> mechanism for this purpose failed; An attempt to override the "script" task results in an error "Trying to override old definition of task script"; choosing a different name reveals that the libraries are not found despite being referenced (maybe ant uses a different class loader for that purpose).

   <path id="lib.path">
      <fileset dir="lib" includes="**/*.jar"/>
    </path>

    <typedef
      name="scriptx"
      classname="org.apache.tools.ant.taskdefs.optional.Script"
      classpathref="lib.path"/>

Any help is highly appreciated.

Klaus


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to