File tree Expand file tree Collapse file tree 4 files changed +50
-0
lines changed
ant/docs/examples/5-minute-tutorial Expand file tree Collapse file tree 4 files changed +50
-0
lines changed Original file line number Diff line number Diff line change
1
+ generated-sources
Original file line number Diff line number Diff line change
1
+ To run this example:
2
+ - Have [ Apache Ant] ( https://ant.apache.org ) installed
3
+ - Have [ H2 Sakila database] ( https://github.com/koentsje/sakila-h2 ) running
4
+ - Issue ` ant reveng ` from a command-line window
Original file line number Diff line number Diff line change
1
+ <project xmlns : ivy =" antlib:org.apache.ivy.ant" >
2
+
3
+ <property name =" hibernate-tools.version" value =" 7.0.0.CR1" />
4
+ <property name =" jdbc-driver.org" value =" com.h2database" />
5
+ <property name =" jdbc-driver.module" value =" h2" />
6
+ <property name =" jdbc-driver.version" value =" 2.3.232" />
7
+
8
+ <ivy : cachepath
9
+ organisation =" org.hibernate.tool"
10
+ module =" hibernate-tools-ant"
11
+ revision =" ${ hibernate-tools.version } "
12
+ pathid =" hibernate-tools.path"
13
+ inline =" true" />
14
+ <ivy : cachepath
15
+ organisation =" ${ jdbc-driver.org } "
16
+ module =" ${ jdbc-driver.module } "
17
+ revision =" ${ jdbc-driver.version } "
18
+ pathid =" jdbc-driver.path"
19
+ inline =" true" />
20
+
21
+ <path id =" classpath" >
22
+ <path refid =" hibernate-tools.path" />
23
+ <path refid =" jdbc-driver.path" />
24
+ </path >
25
+
26
+ <taskdef
27
+ name =" hibernatetool"
28
+ classname =" org.hibernate.tool.ant.HibernateToolTask"
29
+ classpathref =" classpath" />
30
+
31
+ <target name =" reveng" >
32
+ <hibernatetool destdir =" generated-sources" >
33
+ <jdbcconfiguration propertyfile =" hibernate.properties" />
34
+ <hbm2java />
35
+ </hibernatetool >
36
+ </target >
37
+
38
+ </project >
39
+
Original file line number Diff line number Diff line change
1
+ hibernate.connection.driver_class =org.h2.Driver
2
+ hibernate.connection.url =jdbc:h2:tcp://localhost/./sakila
3
+ hibernate.connection.username =sa
4
+ hibernate.default_catalog =SAKILA
5
+ hibernate.default_schema =PUBLIC
6
+
You can’t perform that action at this time.
0 commit comments