Thread:
 Creating Hibernate Configuration File (hibernate.c... 
 andre1   22 Oct 2004, 23:29 

Comment
Prev. thread 
 Next thread
 
Prev. posting 
 Next posting
From: andre1 (22 Oct 2004, 23:29) Replies: 0, Views: 44443
Subject: Creating Hibernate Configuration File (hibernate.cfg.xm...
Using XDoclet 1.2.1 you may create a configuration file by using the
nested Element "hibernatecfg" of the "hibernatedoclet" task.

Example:

<target name="hibernate.mappings" description="creates hibernate mapping
files and hibernate config file">
<hibernatedoclet
    excludedtags="@version,@author,@todo"
    destdir="${basedir}"
    mergedir="${basedir}"
    force="false"
    verbose="true">

    <fileset dir="${basedir}">
        <include name="**/*.java"/>
    </fileset>

    <hibernate  version="2.0"/>
	
    <hibernatecfg
        dialect="net.sf.hibernate.dialect.MySQLDialect"
        driver="com.mysql.jdbc.Driver"
        jdbcUrl="jdbc:mysql:///${database.name}"
        userName="hibernate"
        password="aPassword"/>
</hibernatedoclet>
</target>
Prev. thread 
 Next thread
 
Prev. posting 
 Next posting
© Copyright 2006, Red Hat Middleware, LLC. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc. [Privacy Policy]