wason

发布一个hibernate的通用ant script

这个模块用作从实体类-->hbm.xml-->数据库,用于配合我的测试驱动开发。写的时候挺麻烦,但写好了就一劳永逸了。 this is a common hibernate mapping file builder.it needs parameters below: fileset.hibernate.models : model objects need to generate mapping files.(fileset type) classpath : classpath that those model objects depend on.(path type) dependent optional task : xdoclet.modules.hibernate.HibernateDocletTask must be added to your build path. src.hibernate : where to put generated mapping files. example: 用到的时候,import到build.xml就行了,schemaexport任务要一个hibernate.properties文件,内容如下: hibernate.connection.driver_class=driver name hibernate.connection.url=url hibernate.connection.username=user name hibernate.connection.password=password hibernate.dialect=org.hibernate.dialect.MySQLDialect 像这样子的,每个项目都会用到的ant script还有挺多的如javadocs等,独立出来非常方便,呵呵。

posted on 2006-05-31 13:35 wason-pcwl 阅读(116) 评论(0)  编辑  收藏


只有注册用户登录后才能发表评论。


网站导航: