File tree Expand file tree Collapse file tree 5 files changed +116
-0
lines changed
ant/docs/examples/templatepath Expand file tree Collapse file tree 5 files changed +116
-0
lines changed Original file line number Diff line number Diff line change 1+ # ###########################################################################
2+ # Hibernate Tools, Tooling for your Hibernate Projects #
3+ # #
4+ # Copyright 2004-2025 Red Hat, Inc. #
5+ # #
6+ # Licensed under the Apache License, Version 2.0 (the "License"); #
7+ # you may not use this file except in compliance with the License. #
8+ # You may obtain a copy of the License at #
9+ # #
10+ # http://www.apache.org/licenses/LICENSE-2.0 #
11+ # #
12+ # Unless required by applicable law or agreed to in writing, software #
13+ # distributed under the License is distributed on an "AS IS" basis, #
14+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
15+ # See the License for the specific language governing permissions and #
16+ # limitations under the License. #
17+ # ###########################################################################
18+ generated-sources
Original file line number Diff line number Diff line change 1+ <!--
2+ ~ Copyright 2004 - 2025 Red Hat, Inc.
3+ ~
4+ ~ Licensed under the Apache License, Version 2.0 (the "License");
5+ ~ you may not use this file except in compliance with the License.
6+ ~ You may obtain a copy of the License at
7+ ~
8+ ~ http://www.apache.org/licenses/LICENSE-2.0
9+ ~
10+ ~ Unless required by applicable law or agreed to in writing, software
11+ ~ distributed under the License is distributed on an "AS IS" basis,
12+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ ~ See the License for the specific language governing permissions and
14+ ~ limitations under the License.
15+ -->
16+ To run this example:
17+ - Have [ Apache Ant] ( https://ant.apache.org ) installed
18+ - Have [ H2 Sakila database] ( https://github.com/koentsje/sakila-h2 ) running
19+ - Issue ` ant ` from a command-line window
Original file line number Diff line number Diff line change 1+ <!--
2+ ~ Copyright 2004 - 2025 Red Hat, Inc.
3+ ~
4+ ~ Licensed under the Apache License, Version 2.0 (the "License");
5+ ~ you may not use this file except in compliance with the License.
6+ ~ You may obtain a copy of the License at
7+ ~
8+ ~ http://www.apache.org/licenses/LICENSE-2.0
9+ ~
10+ ~ Unless required by applicable law or agreed to in writing, software
11+ ~ distributed under the License is distributed on an "AS IS" basis,
12+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ ~ See the License for the specific language governing permissions and
14+ ~ limitations under the License.
15+ -->
16+ <project name =" templatepath" default =" reveng" >
17+
18+ <!-- Include the 'hibernatetool' task definition from the file '../common/included.xml' -->
19+ <include file =" ../common/included.xml" />
20+
21+ <target name =" clean" >
22+ <!-- Delete the folder 'generated-sources' if it exists -->
23+ <delete dir =" generated-sources" />
24+ </target >
25+
26+ <target name =" reveng" depends =" clean" >
27+ <!-- Hibernate Tools will look for templates to use in the 'templates' folder -->
28+ <hibernatetool
29+ destdir =" generated-sources"
30+ templatepath =" templates" >
31+ <jdbcconfiguration propertyfile =" hibernate.properties" />
32+ <!-- The main template file used by the Java exporter is to be found in the location 'pojo/Pojo.ftl' -->
33+ <hbm2java />
34+ </hibernatetool >
35+ </target >
36+
37+ </project >
38+
Original file line number Diff line number Diff line change 1+ # ###########################################################################
2+ # Hibernate Tools, Tooling for your Hibernate Projects #
3+ # #
4+ # Copyright 2004-2025 Red Hat, Inc. #
5+ # #
6+ # Licensed under the Apache License, Version 2.0 (the "License"); #
7+ # you may not use this file except in compliance with the License. #
8+ # You may obtain a copy of the License at #
9+ # #
10+ # http://www.apache.org/licenses/LICENSE-2.0 #
11+ # #
12+ # Unless required by applicable law or agreed to in writing, software #
13+ # distributed under the License is distributed on an "AS IS" basis, #
14+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
15+ # See the License for the specific language governing permissions and #
16+ # limitations under the License. #
17+ # ###########################################################################
18+ hibernate.connection.driver_class =org.h2.Driver
19+ hibernate.connection.url =jdbc:h2:tcp://localhost/./sakila
20+ hibernate.connection.username =sa
21+ hibernate.default_catalog =SAKILA
22+ hibernate.default_schema =PUBLIC
23+
Original file line number Diff line number Diff line change 1+ <!--
2+ ~ Copyright 2004 - 2025 Red Hat, Inc.
3+ ~
4+ ~ Licensed under the Apache License, Version 2.0 (the "License");
5+ ~ you may not use this file except in compliance with the License.
6+ ~ You may obtain a copy of the License at
7+ ~
8+ ~ http://www.apache.org/licenses/LICENSE-2.0
9+ ~
10+ ~ Unless required by applicable law or agreed to in writing, software
11+ ~ distributed under the License is distributed on an "AS IS" basis,
12+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ ~ See the License for the specific language governing permissions and
14+ ~ limitations under the License.
15+ -->
16+ // This is just an example of a custom template
17+
18+
You can’t perform that action at this time.
0 commit comments