Skip to content

Commit 39a280c

Browse files
committed
extremely light revision to the tools page
1 parent 3209858 commit 39a280c

File tree

1 file changed

+24
-26
lines changed

1 file changed

+24
-26
lines changed

tools/index.html.haml

Lines changed: 24 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ project: tools
77
-# Center body
88
.feature-block
99
:asciidoc
10-
== Reverse Engineering from a Database
10+
== Reverse engineering from a database
1111

1212
Hibernate Tools is a set of build plugins and a Java library that can be used to generate Hibernate/JPA entities starting
1313
from your relational database structure. The default behavior of the code generator is highly customizable via
@@ -20,13 +20,13 @@ project: tools
2020

2121
.feature-block
2222
:asciidoc
23-
== Project Configuration
23+
== Project configuration
2424

25-
For the purpose of a quick introduction, let's assume that you have a database running, e.g.
26-
https://github.com/maxandersen/sakila-h2[H2 Sakila database] reacheable at the following JDBC URL:
25+
For the purpose of a quick introduction, let's suppose that we have a database running, for example,
26+
https://github.com/maxandersen/sakila-h2[H2 Sakila database], reachable at the following JDBC URL:
2727
`jdbc:h2:tcp://localhost/./sakila`.
2828

29-
Let's assume as well that a `hibernate.properties` file below is available somewhere on the project's class path:
29+
Let's also suppose that the following `hibernate.properties` file is available somewhere on the project class path:
3030

3131
[listing]
3232
hibernate.connection.driver_class=org.h2.Driver
@@ -35,17 +35,16 @@ project: tools
3535
hibernate.default_catalog=SAKILA
3636
hibernate.default_schema=PUBLIC
3737

38-
With this in place let's show some possible uses of the reverse engineering tooling to create Java classes from the
38+
With this in place, let's show some possible uses of the reverse engineering tooling to create Java classes from the
3939
database.
4040

4141
.feature-block
4242
:asciidoc
43-
== Using the Maven Plugin
44-
45-
The Hibernate Tools Maven plugin can be used either directly or by configuration
46-
in the `pom.xml` file of your project to generate entity classes or other artefacts. Let's assume you have created
47-
a Maven project with the following `pom.xml` file.
43+
== Using the Maven plugin
4844

45+
The Hibernate Tools Maven plugin can be used either directly or by configuration in the `pom.xml` file of our
46+
project to generate entity classes or other artefacts.
47+
Let's assume we have created a Maven project with the following `pom.xml` file.
4948

5049
[source, xml]
5150
----
@@ -82,13 +81,13 @@ project: tools
8281

8382
Let's assume as well that the `src/main/resources` folder contains the `hibernate.properties` file shown earlier.
8483

85-
Having this in place simply issuing
84+
Having this in place, simply issuing:
8685
[source]
8786
-----
8887
mvn org.hibernate.tool:hibernate-tools-maven:${hibernate.version}:hbm2java
8988
-----
90-
from a command line prompt in the project folder would use all the default settings to generate Java classes
91-
for all the tables in `target/generated-sources/`.
89+
from a command line prompt in the project folder will use all the default settings to generate Java classes for the
90+
tables in `target/generated-sources/`.
9291

9392
[source]
9493
-----
@@ -102,17 +101,16 @@ project: tools
102101
me@machine foo %
103102
-----
104103

105-
106104
Of course all these defaults can be overridden and tuned. Please consult the documentation for more information.
107105

108106
.feature-block
109107
:asciidoc
110-
== Using Gradle Tasks
108+
== Using Gradle tasks
111109

112-
Let's assume in this case that we start off with a very simple default Gradle application, e.g. created with
113-
`gradle init --type java-application --dsl groovy`.
110+
Let's assume in this case that we start off with a very simple default Gradle application, for example, a project
111+
created via `gradle init --type java-application --dsl groovy`.
114112

115-
With this setup, we replace the contents of the file `app/build.gradle` with the code below :
113+
With this setup, we replace the contents of the file `app/build.gradle` with the code below:
116114

117115
[source, groovy]
118116
-----
@@ -130,19 +128,19 @@ project: tools
130128
}
131129
-----
132130

133-
As a last precondition, we make sure that the above `hibernate.properties` file is present in
134-
folder `app/src/main/resources`.
131+
As a final precondition, we make sure that the above `hibernate.properties` file is present in folder
132+
`app/src/main/resources`.
135133

136-
With this in place, issuing
134+
With this in place, issuing:
137135
[source]
138136
-----
139137
gradle generateJava
140138
-----
141-
will use all the default settings to generate Java classes for all the tables in `app/generated-sources/`.
139+
will use all the default settings to generate Java classes for the tables in `app/generated-sources/`.
142140

143141
.feature-block
144142
:asciidoc
145-
== Using Good Old Ant
143+
== Using good old Ant
146144

147145
Creating an Ant project is very simple. We only need a `build.xml` file to be present in the root of the project.
148146
In order to manage the needed dependencies, the easiest way is to use the Ant tasks provided by Apache Ivy.
@@ -180,9 +178,9 @@ project: tools
180178
</project>
181179
-----
182180

183-
With the `hibernate.properties` file from above also present in the root of the project, simply issuing
181+
With the `hibernate.properties` file from above also present in the root of the project, simply issuing:
184182
[source]
185183
-----
186184
ant reveng
187185
-----
188-
would generate the Java files in the folder `generated-sources`.
186+
generates the Java files in the folder `generated-sources`.

0 commit comments

Comments
 (0)