Author: mcaspers
Date: 2011-01-20 21:09:23 -0500 (Thu, 20 Jan 2011)
New Revision: 28459
Modified:
trunk/hibernatetools/docs/reference/en-US/ant.xml
Log:
General Updates
Modified: trunk/hibernatetools/docs/reference/en-US/ant.xml
===================================================================
--- trunk/hibernatetools/docs/reference/en-US/ant.xml 2011-01-21 02:00:46 UTC (rev 28458)
+++ trunk/hibernatetools/docs/reference/en-US/ant.xml 2011-01-21 02:09:23 UTC (rev 28459)
@@ -2,36 +2,30 @@
<chapter id="ant">
<title>Ant Tools</title>
- <para>Maybe somebody will find it more preferable to use Ant for generation
purposes. Thus, this
- chapter is intended to get you ready to start using Hibernate Tools via Ant
tasks.</para>
+ <para>This chapter demonstrates how to use Hibernate Tools via Ant
tasks.</para>
<section>
<title>Introduction</title>
- <para>The <filename>hibernate-tools.jar</filename> contains the
core for the <property>Hibernate Tools</property>. It is used as the
- basis for both the Ant tasks described in this document and the eclipse plugins
both available
- from
tools.hibernate.org. The <filename>hibernate-tools.jar</filename>
is located in your eclipse plugins directory at
<filename>/plugins/org.hibernate.eclipse.x.x.x/lib/tools/hibernate-tools.jar</filename>.
+ <para>
+ The <filename>hibernate-tools.jar</filename> contains the core for the
<productname>Hibernate Tools</productname>. It is used as the basis for both
the Ant tasks described in this document and the eclipse plugins both available from
tools.hibernate.org. The <filename>hibernate-tools.jar</filename> file is
located in your eclipse plugins directory at
<filename>/plugins/org.hibernate.eclipse.x.x.x/lib/tools/hibernate-tools.jar</filename>.
</para>
- <para>This jar is 100% independent from the eclipse platform and can thus be
used independently
- of eclipse.</para>
+ <para>This jar is 100% independent from the Eclipse platform and can thus be
used independently of Eclipse.</para>
<note>
<title>Note:</title>
- <para>There might be incompatibilities with respect to the
<filename>Hibernate3.jar</filename> bundled with the
- tools and your own jar. Thus to avoid any confusion it is recommended to use the
- <filename>hibernate3.jar</filename> and
<filename>hibernate-annotations.jar</filename> bundled with the tools when you
want to use the
- Ant tasks. Do not worry about using e.g. Hibernate 3.2 jar's with e.g. a
Hibernate 3.1
- project since the output generated will work with previous Hibernate 3 versions.
</para>
+ <para>
+ There might be incompatibilities with respect to the
<filename>Hibernate3.jar</filename> bundled with the tools and your own jar.
Thus to avoid any confusion it is recommended that you use the
<filename>hibernate3.jar</filename> and
<filename>hibernate-annotations.jar</filename> files bundled with the tools
when you want to use the Ant tasks. Do not worry about using the jar's from a later
version of Hibernate (e.g. Hibernate 3.2) with a project using an earlier version of
Hibernate (e.g. a Hibernate 3.1) since the output generated will work with previous
Hibernate 3 versions.
+ </para>
</note>
</section>
<section>
<title>The <hibernatetool> Ant Task</title>
- <para>To use the ant tasks you need to have the <emphasis>
- <property>hibernatetool</property>
- </emphasis> task defined. That is done in your
<filename>build.xml</filename> by inserting the following xml (assuming the
jars are in the
- <filename>lib</filename> directory): </para>
+ <para>
+ To use the ant tasks you need to have the
<emphasis><property>hibernatetool</property></emphasis> task
defined. That is done in your <filename>build.xml</filename> by inserting the
following xml (assuming the jars are in the <filename>lib</filename>
directory):
+ </para>
<programlisting role="XML"><![CDATA[<path
id="toolslib">
<path location="lib/hibernate-tools.jar" />
@@ -45,21 +39,17 @@
classpathref="toolslib" />
]]></programlisting>
- <para>This
- <code><taskdef></code>
- defines an Ant task called <emphasis>
- <property> hibernatetool </property>
- </emphasis> which now can be used anywhere in your ant
<filename>build.xml</filename> files. It is important to include all the
<property>Hibernate Tools</property>
- dependencies as well as the jdbc driver.</para>
+ <para>
+ This <code><taskdef></code> defines an Ant task called
<emphasis><property> hibernatetool </property></emphasis> which
now can be used anywhere in your Ant <filename>build.xml</filename> files. It
is important to include all the <productname>Hibernate Tools</productname>
dependencies as well as the JDBC driver.
+ </para>
- <para>Notice that to use the annotation based Configuration you must <ulink
- url="http://annotations.hibernate.org">get a release</ulink>.
</para>
+ <para>
+ Notice that to use the annotation based Configuration you must <ulink
url="http://annotations.hibernate.org">get a release</ulink>.
+ </para>
<para/>
- <para>When using the <emphasis>
- <property> hibernatetool </property>
- </emphasis> task you have to specify one or more of the
following:</para>
+ <para>When using the <emphasis><property> hibernatetool
</property></emphasis> task you have to specify one or more of the
following:</para>
<programlisting role="XML"><![CDATA[<hibernatetool
destdir="defaultDestinationDirectory"
@@ -116,7 +106,7 @@
</entry>
<entry>
- <para>A path to be used to look up user-edited
templates</para>
+ <para>A path used for looking up user-edited templates</para>
</entry>
<entry>
@@ -130,8 +120,7 @@
</entry>
<entry>
- <para>A classpath to be used to resolve resources, such as mappings
and
- usertypes</para>
+ <para>A classpath to be used to resolve resources, such as mappings
and usertypes</para>
</entry>
<entry>
@@ -146,8 +135,7 @@
</entry>
<entry>
- <para>Used to set properties to control the exporters. Mostly
relevant for providing
- custom properties to user defined templates</para>
+ <para>Used to set properties to control the exporters. Mostly
relevant for providing custom properties to user defined templates</para>
</entry>
<entry>
@@ -157,13 +145,11 @@
<row>
<entry>
- <para>configuration (annotationconfiguration, jpaconfiguration,
- jdbcconfiguration)</para>
+ <para>configuration (annotationconfiguration, jpaconfiguration,
jdbcconfiguration)</para>
</entry>
<entry>
- <para>One of four different ways of configuring the Hibernate Meta
Model must be
- specified</para>
+ <para>One of four different ways of configuring the Hibernate Meta
Model must be specified</para>
</entry>
<entry>
@@ -193,10 +179,9 @@
<section>
<title>Basic examples</title>
- <para>The following example shows the most basic setup for generating
pojo's via <code><hbm2java></code> from a normal
<emphasis>
- <property>
- <filename>hibernate.cfg.xml</filename>
- </property>. </emphasis> The output will be put in the
<filename>${build.dir}/generated</filename> directory.</para>
+ <para>
+ The following example shows the most basic setup for generating pojo's via
<code><hbm2java></code> from a normal
<filename>hibernate.cfg.xml</filename>. The output will be put in the
<filename>${build.dir}/generated</filename> directory.
+ </para>
<programlisting role="XML"><![CDATA[<hibernatetool
destdir="${build.dir}/generated">
<classpath>
@@ -208,11 +193,9 @@
</hibernatetool>]]></programlisting>
- <para>The following example is similar, but now we are performing multiple
exports from the
- same configuration. We are exporting the schema via
<code><hbm2dll></code>, generates some DAO code via
<code><hbm2dao></code>
- and finally runs a custom code generation via
<code><hbmtemplate></code>. This is again from a normal
<filename>hibernate.cfg.xml</filename> and the output is still put in the
<filename>${build.dir}/generated</filename> directory. Furthermore the example
also shows where a classpath is specified
- when you e.g. have custom usertypes or some mappings that is needed to be looked
up as a
- classpath resource.</para>
+ <para>
+ The following example is similar, but now we are performing multiple exports from
the same configuration. We are exporting the schema via
<code><hbm2dll></code>, generating some DAO code via
<code><hbm2dao></code> and finally running a custom code
generation via <code><hbmtemplate></code>. This is again from a
normal <filename>hibernate.cfg.xml</filename> file and the output is still
placed in the <filename>${build.dir}/generated</filename> directory.
Furthermore the example also shows how a classpath is specified, which is useful when you
have custom usertypes or some mappings that is needed to be looked up as a classpath
resource.
+ </para>
<programlisting role="XML"><![CDATA[<hibernatetool
destdir="${build.dir}/generated">
<classpath>