Skip to content

Commit dfc2682

Browse files
committed
HBX-2984: Create Reference Guide for Ant
- Complete the subsection for the configuration elements Signed-off-by: Koen Aers <[email protected]>
1 parent 7d2b87d commit dfc2682

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

ant/docs/reference-guide.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,28 @@ for the `propertySet`element are supported.
158158

159159
### 1.2.5 The Configuration Elements
160160

161+
The model from which to generate artefacts with Hibernate Tools is created from a configuration, very much like
162+
the configuration used in plain Hibernate ORM. As a matter of fact, this 'plain' Hibernate configuration can
163+
serve as a starting point for some of the generators. You can specify it with the `<configuration>`element for
164+
Hibernate native configurations or with the `<jpaconfiguration>` element for JPA annotated projects.
161165

166+
In most cases however, you will use the `<jdbcconfiguration>`element as this one is specific to perform the
167+
generation of artefacts starting from a relational database schema. See an example below.
168+
169+
```xml
170+
<hibernatetool
171+
destdir="...">
172+
<jdbcconfiguration propertyfile="hibernate.properties"/>
173+
...
174+
</hibernatetool>
175+
176+
```
177+
One - and only one - of the configuration possibilities needs to be specified in the `<hibernatetool>` task.
178+
(As shown in the classpath example above tough, you can just specify an empty configuration if your
179+
generators do not need to be configured)
180+
181+
More detailed information on the possible attributes and elements that can be used for the configuration
182+
elements is to be found in section 2 further down this guide.
162183

163184
### 1.2.6 The Exporter Elements
164185

0 commit comments

Comments
 (0)