File tree Expand file tree Collapse file tree 1 file changed +48
-1
lines changed Expand file tree Collapse file tree 1 file changed +48
-1
lines changed Original file line number Diff line number Diff line change @@ -215,8 +215,55 @@ Section 3 further down this guide will document in more detail the use of these
215215As explained earlier, the reverse engineering and generation of artefacts with Hibernate Tools is based on a
216216so-called configuration. We will detail the possibilities for these configurations in this section.
217217
218- ### 2.1 Native Configuration
218+ ### 2.1 Native Configuration with ` <configuration> `
219219
220+ The first and simplest possibility to configure the ` <hibernatetool> ` task is by using the ` <configuration> `
221+ element.
222+
223+ ``` xml
224+ <target name =" reveng" >
225+ <hibernatetool destdir =" ..." >
226+ ...
227+ <configuration />
228+ ...
229+ </hibernatetool >
230+ </target >
231+ ```
232+
233+ The ` <configuration> ` element can be used without additional configuration but that is only of limited interest.
234+ In practically all cases you will use additional attributes and/or embedded elements.
235+
236+ ### 2.1.1 The ` propertyfile ` attribute
237+
238+ The first possible attribute is ` propertyfile ` . This property points to the file that will be used to read the
239+ Hibernate properties.
240+
241+ ``` xml
242+ <target name =" reveng" >
243+ <hibernatetool destdir =" ..." >
244+ ...
245+ <configuration propertyfile =" hibernate.properties" >
246+ ...
247+ </configuration >
248+ ...
249+ </hibernatetool >
250+ </target >
251+ ```
252+
253+ Possible contents for the ` hibernate.properties ` file when using the H2 Sakila database are illustrated below:
254+
255+ ``` properties
256+ hibernate.connection.driver_class =org.h2.Driver
257+ hibernate.connection.url =jdbc:h2:tcp://localhost/./sakila
258+ hibernate.connection.username =sa
259+ hibernate.default_catalog =SAKILA
260+ hibernate.default_schema =PUBLIC
261+ ```
262+
263+ ### 2.1.2 The ` configurationfile ` attribute
264+
265+
266+ ### 2.1.3 The ` <fileset> ` element
220267
221268
222269### 2.2 JPA Configuration
You can’t perform that action at this time.
0 commit comments