Ant + hibernate 生成*.sql

一开始没有在<schemaexport />里加
quiet="no" text="true" drop="no" delimiter=";"
   output="${build.class.dir}/schema-export.sql"

运行ant提示失败

下面是正确的:

< target  name ="schema"  depends ="build" >
        
< taskdef  name ="schemaexport"  classname ="org.hibernate.tool.hbm2ddl.SchemaExportTask" >
            
< classpath  refid ="project.classpath"   />
        
</ taskdef >
        
< schemaexport  config ="${src.java.dir}/hibernate.cfg.xml"  
            quiet
="no"  text ="true"  drop ="no"  delimiter =";"  
            output
="${build.class.dir}/schema-export.sql"   />
    
</ target >


参考: http://mzrj.itpub.net/post/2660/11489

你可能感兴趣的:(sql,xml,Hibernate,.net,ant)