You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by ar <ar...@free.fr> on 2006/02/22 10:36:53 UTC

Task def and classpath problem

Hi all,

I define a task and try to use it (Hibernate Schema Update). It needs a  
classpath initialized.

Here's how I defined it :


    <path id="class.path">
    	<fileset dir="${lib.dir}">
    	   <include name="**/*.jar"/>
       </fileset>
       <pathelement location="${work.dir}/bin/classes"/>
    </path>

       ...
       <taskdef name="schemaupdate"
                classname="net.sf.hibernate.tool.hbm2ddl.SchemaUpdateTask"
                classpathref="class.path"/>

       <schemaupdate properties="${hibernate.properties}"
                  quiet="no"
                  text="false">
          <fileset dir="${hbm.dir}">
             <include name="**/*.hbm.xml"/>
          </fileset>
       </schemaupdate>


This works fine on Windows environment, but not on Linux environment.

To make it work on Linux, I have to pass the classpath on the command line  
using the -lib option.
ant -lib ../work/bin/classes

Does anybody have an explanation to this behaviour and a solution to make  
it work using classpath definitions in the ant script ?

Regards

-- 
A. ROY

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