ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ar <armaill...@free.fr>
Subject Task def and classpath problem
Date Wed, 22 Feb 2006 09:36:53 GMT
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


Mime
View raw message