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

Reply via email to