Skip to content

Commit f4d36eb

Browse files
committed
HBX-2984: Create Reference Guide for Ant
- Add subsection for the '<fileset>' element for native configurations Signed-off-by: Koen Aers <[email protected]>
1 parent e3d237c commit f4d36eb

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

ant/docs/reference-guide.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,9 +289,29 @@ A possible example of such a `hibernate.cfg.xml` file is shown in the xml snippe
289289

290290
### 2.1.3 The `<fileset>` element
291291

292+
The `<fileset>` element can be used to specify additional resources (most probably mapping files)
293+
that need to be included in the configuration.
294+
295+
```xml
296+
<target name="reveng">
297+
<hibernatetool destdir="...">
298+
...
299+
<configuration propertyfile="...">
300+
<fileset file="Foo.hbm.xml"/>
301+
</configuration>
302+
...
303+
</hibernatetool>
304+
</target>
305+
```
306+
All the usual options for the [Ant FileSet](https://ant.apache.org/manual/Types/fileset.html) type apply.
292307

293308
### 2.1.4 Additional Remarks
294309

310+
The `propertyfile` and `configurationfile` attributes and the `<fileset>` element can be freely mixed and
311+
matched. There are however two additional remarks to take into account:
312+
1. The properties defined in `propertyfile` take precedence over the properties defined in `configurationfile`.
313+
2. Files and resources specified in the `configurationfile` should be excluded from the files
314+
specified by the `<fileset>` to avoid duplicate import exceptions.
295315

296316
### 2.2 JPA Configuration
297317

0 commit comments

Comments
 (0)