Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ant/docs/examples/5-minute-tutorial/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
generated-sources
4 changes: 4 additions & 0 deletions ant/docs/examples/5-minute-tutorial/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
To run this example:
- Have [Apache Ant](https://ant.apache.org) installed
- Have [H2 Sakila database](https://github.com/koentsje/sakila-h2) running
- Issue `ant reveng` from a command-line window
39 changes: 39 additions & 0 deletions ant/docs/examples/5-minute-tutorial/build.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<project xmlns:ivy="antlib:org.apache.ivy.ant">

<property name="hibernate-tools.version" value="7.0.0.CR1"/>
<property name="jdbc-driver.org" value="com.h2database"/>
<property name="jdbc-driver.module" value="h2"/>
<property name="jdbc-driver.version" value="2.3.232"/>

<ivy:cachepath
organisation="org.hibernate.tool"
module="hibernate-tools-ant"
revision="${hibernate-tools.version}"
pathid="hibernate-tools.path"
inline="true"/>
<ivy:cachepath
organisation="${jdbc-driver.org}"
module="${jdbc-driver.module}"
revision="${jdbc-driver.version}"
pathid="jdbc-driver.path"
inline="true"/>

<path id="classpath">
<path refid="hibernate-tools.path"/>
<path refid="jdbc-driver.path"/>
</path>

<taskdef
name="hibernatetool"
classname="org.hibernate.tool.ant.HibernateToolTask"
classpathref="classpath" />

<target name="reveng">
<hibernatetool destdir="generated-sources">
<jdbcconfiguration propertyfile="hibernate.properties" />
<hbm2java/>
</hibernatetool>
</target>

</project>

6 changes: 6 additions & 0 deletions ant/docs/examples/5-minute-tutorial/hibernate.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
hibernate.connection.driver_class=org.h2.Driver
hibernate.connection.url=jdbc:h2:tcp://localhost/./sakila
hibernate.connection.username=sa
hibernate.default_catalog=SAKILA
hibernate.default_schema=PUBLIC