<path id="classpath">
<pathelement location="${build.classes}"/> <pathelement location="build/classes"/> <!-- this is for the servlet JARs in Tomcat 4.1.x --> <fileset dir="${env.CATALINA_HOME}/common/lib"> <include name="*.jar"/> </fileset>
<!-- this is for the servlet JARs in Tomcat 4.1.x --> <fileset dir="${env.CATALINA_HOME}/shared/lib"> <include name="*.jar"/> </fileset>
<!-- this is for the XML JARs in Tomcat 4.1.x --> <fileset dir="${env.CATALINA_HOME}/common/endorsed"> <include name="*.jar"/> </fileset>
<fileset dir="lib"> <include name="*.jar"/> </fileset> <fileset dir="lib/ext"> <exclude name="*.LICENSE"/> <include name="*.jar"/> </fileset>
<pathelement path="${java.class.path}"/> </path>
It runs from my IDE!
If I enhance my $CLASSPATH in the shell to include my jar (and the jdbc driver) and then run ant, it works!
Is there a way to tell the schemaexport to use a classpath? The Schemaexport Task really tries to find the
class next to the mapping file.
Oliver
On Wednesday, August 13, 2003, at 01:28 PM, Anders Hermansen wrote:
Hi Oliver,
Are you sure that the path build/classes is in your classpath when schemaexport is running?
How is the classpathref "classpath" defined in your build.xml?
Anders
* Oliver Wehrens ([EMAIL PROTECTED]) wrote:Hi,
I have a project where I separated the mapping files from the classes. So classes in build/classes and the mapping files are in webapps/gridsphere/WEB-INF/persistence/ .
If I now want to use the anttask schemaexport to create the database my
classes are not found.
My classpathref includes the build/classes dir.
Here is what my task looks like: --snip <target name="createdatabase" depends="setenv, compile">
<taskdef name="schemaexport" classname="net.sf.hibernate.tool.hbm2ddl.SchemaExportTask" classpathref="classpath"/>
<schemaexport
properties="webapps/gridsphere/WEB-INF/persistence/ hibernate.properties"
quiet="no"
text="no"
drop="no"
delimiter=";"
output="schema-export.sql">
<fileset dir="webapps/gridsphere/WEB-INF/persistence/">
<include name="**/*.hbm.xml"/>
</fileset>
</schemaexport>
</target>
-- snip
It seems to me that anttask schemaexport has some problems when mapping
files and
classes not next to each other. Is there more documentation on that?
Anybody knows
how to solve that?
To make thing more confusing: it works from my IDE (Idea) where it
maybe passes
addtl. classpath parameters to ant.
Oliver
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/ direct;at.aspnet_072303_01/01
_______________________________________________
hibernate-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hibernate-devel
------------------------------------------------------- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01 _______________________________________________ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel