JBoss Tools SVN: r28463 - trunk/hibernatetools/docs/reference/en-US.
by jbosstools-commits@lists.jboss.org
Author: mcaspers
Date: 2011-01-20 23:06:45 -0500 (Thu, 20 Jan 2011)
New Revision: 28463
Modified:
trunk/hibernatetools/docs/reference/en-US/codegenarchitecture.xml
Log:
General Updates
Modified: trunk/hibernatetools/docs/reference/en-US/codegenarchitecture.xml
===================================================================
--- trunk/hibernatetools/docs/reference/en-US/codegenarchitecture.xml 2011-01-21 03:57:48 UTC (rev 28462)
+++ trunk/hibernatetools/docs/reference/en-US/codegenarchitecture.xml 2011-01-21 04:06:45 UTC (rev 28463)
@@ -1,112 +1,92 @@
<?xml version="1.0" encoding="UTF-8"?>
<chapter id="codegenarchitecture">
- <title>Code generation architecture</title>
+ <title>Code generation architecture</title>
- <para>The code generation mechanism in the <property>Hibernate Tools</property> consists of a few
- core concepts. This section explains their overall structure which are the same for the Ant and
- Eclipse tools.</para>
+ <para>
+ The code generation mechanism in <productname>Hibernate Tools</productname> consists of a few core concepts. This section explains their overall structure, which are the same for the Ant and Eclipse tools.
+ </para>
- <section>
- <title>Hibernate Meta Model</title>
+ <section>
+ <title>Hibernate Meta Model</title>
- <para>The meta model is the model used by Hibernate Core to perform its object relational
- mapping. The model includes information about tables, columns, classes, properties,
- components, values, collections etc. The API is in <literal>org.hibernate.mapping</literal>
- and its main entry point is the <property>Configuration</property> class, the same class that is
- used to build a session factory.</para>
+ <para>
+ The meta model is the model used by <productname>Hibernate Core</productname> to perform its object relational mapping. The model includes information about tables, columns, classes, properties, components, values, collections etc. The API is in <code>org.hibernate.mapping</code> and its main entry point is the <code>Configuration</code> class, the same class that is used to build a session factory.
+ </para>
- <para>The model represented by the <property>Configuration</property> class can be build in many
- ways. The following list the currently supported ones in <property>Hibernate Tools</property>. </para>
+ <para>
+ The model represented by the <code>Configuration</code> class can be built in many ways. The following list the currently supported ones in <productname>Hibernate Tools</productname>.
+ </para>
- <para>
- <itemizedlist>
- <listitem>
- <para>A Core configuration uses Hibernate Core and supports reading <emphasis>
- <property>hbm.xml</property>
- </emphasis> files, requires a <emphasis>
- <property>hibernate.cfg.xml</property>
- </emphasis>. Named core in Eclipse and
- <code><configuration></code>
- in ant.</para>
- </listitem>
+ <para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ A Core configuration uses <productname>Hibernate Core</productname> and supports reading <filename>hbm.xml</filename> files, requires a <filename>hibernate.cfg.xml</filename> file. This is referred to as <productname>core</productname> in Eclipse and <code><configuration></code> in Ant.
+ </para>
+ </listitem>
- <listitem>
- <para>An Annotation configuration uses Hibernate Annotations and supports <emphasis>
- <property>hbm.xml</property>
- </emphasis> and annotated classes, requires a <emphasis>
- <property>hibernate.cfg.xml</property>
- </emphasis>. Named annotations in Eclipse and
- <code><annotationconfiguration></code>
- in ant.</para>
- </listitem>
+ <listitem>
+ <para>
+ An Annotation configuration uses <productname>Hibernate Annotations</productname> and supports <filename>hbm.xml</filename> files and annotated classes, and requires a <filename>hibernate.cfg.xml</filename> file. This is referred to as <productname>annotations</productname> in Eclipse and <code><annotationconfiguration></code> in Ant.</para>
+ </listitem>
- <listitem>
- <para>A JPA configuration uses a Hibernate EntityManager and supports <emphasis>
- <property>hbm.xml</property>
- </emphasis> and annotated classes requires that the project has a <emphasis>
- <property>META-INF/persistence.xml</property>
- </emphasis> in its classpath. Named JPA in Eclipse and
- <code><jpaconfiguration></code>
- in ant.</para>
- </listitem>
+ <listitem>
+ <para>
+ A JPA configuration uses a <productname>Hibernate EntityManager</productname> and supports <filename>hbm.xml</filename> files and annotated classes, and requires that the project has a <filename>META-INF/persistence.xml</filename> file in its classpath. This is referred to as <productname>JPA</productname> in Eclipse and <code><jpaconfiguration></code> in Ant.</para>
+ </listitem>
- <listitem>
- <para>A JDBC configuration uses <property>Hibernate Tools</property> reverse engineering
- and reads its mappings via JDBC metadata + additional reverse engineering files
- (reveng.xml). Automatically used in Eclipse when doing reverse engineering from JDBC and
- named
- <code><jdbcconfiguration></code>
- in ant.</para>
- </listitem>
- </itemizedlist>
- </para>
+ <listitem>
+ <para>
+ A JDBC configuration uses <property>Hibernate Tools</property> reverse engineering and reads its mappings via JDBC metadata + additional reverse engineering files (<filename>reveng.xml</filename>). Automatically used in Eclipse when doing reverse engineering from JDBC and referred to as <code><jdbcconfiguration></code> in Ant.</para>
+ </listitem>
+ </itemizedlist>
+ </para>
- <para>In most projects you will normally use only one of the Core, Annotation or JPA
- configuration and possibly the JDBC configuration if you are using the reverse engineering
- facilities of <property>Hibernate Tools</property>. </para>
+ <para>
+ In most projects you will normally use only one of the Core, Annotation or JPA configuration and possibly the JDBC configuration if you are using the reverse engineering facilities of <productname>Hibernate Tools</productname>.
+ </para>
- <note>
- <title>Note:</title>
- <para>No matter which Hibernate Configuration type you are using <property>Hibernate
- Tools</property> supports them.</para>
- </note>
+ <note>
+ <title>Note:</title>
+ <para>No matter which Hibernate Configuration type you are using <productname>Hibernate Tools</productname> supports them.</para>
+ </note>
- <para>The following drawing illustrates the core concepts:</para>
+ <para>The following drawing illustrates the core concepts:</para>
- <para>
- <figure>
- <title>Hibernate Core Concepts</title>
- <mediaobject>
- <imageobject role="fo">
- <imagedata fileref="images/code_generation/code_generation_1.png" format="PNG"/>
- </imageobject>
+ <para>
+ <figure>
+ <title>Hibernate Core Concepts</title>
+ <mediaobject>
+ <imageobject role="fo">
+ <imagedata fileref="images/code_generation/code_generation_1.png" format="PNG"/>
+ </imageobject>
- <imageobject role="html">
+ <imageobject role="html">
- <imagedata align="center" fileref="images/code_generation/code_generation_1.png" format="PNG"/>
- </imageobject>
- </mediaobject>
- </figure>
- </para>
+ <imagedata align="center" fileref="images/code_generation/code_generation_1.png" format="PNG"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </para>
- <para>The code generation is done based on the Configuration model no matter which type of
- configuration have been used to create the meta model, and thus the code generation is
- independent on the source of the meta model and represented via Exporters.</para>
- </section>
+ <para>
+ The code generation is done based on the Configuration model no matter which type of configuration have been used to create the meta model, and thus the code generation is independent on the source of the meta model and represented via Exporters.
+ </para>
+ </section>
- <section>
- <title>Exporters</title>
+ <section>
+ <title>Exporters</title>
- <para>Code generation is done in so called Exporters. An <code>Exporter</code> is handed a
- Hibernate Meta Model represented as a <code>Configuration</code> instance and it is then
- the job of the exporter to generate a set of code artifacts.</para>
+ <para>
+ Code generation is done in so called Exporters. An <code>Exporter</code> is handed a Hibernate Meta Model represented as a <code>Configuration</code> instance and it is then the job of the exporter to generate a set of code artifacts.
+ </para>
- <para>The tools provides a default set of Exporter's which can be used in both Ant and the
- Eclipse UI. Documentation for these Exporters is in the <xref linkend="ant"/>
- and <xref linkend="plugins"/> chapters.</para>
+ <para>
+ The tools provides a default set of Exporter's which can be used in both Ant and the Eclipse UI. Documentation for these Exporters is in the <xref linkend="ant"/> and <xref linkend="plugins"/> sections.
+ </para>
- <para>Users can provide their own customer Exporter's, either by custom classes implementing the
- Exporter interface or simply be providing custom templates. This is documented at <xref
- linkend="hbmtemplate"/></para>
- </section>
+ <para>
+ Users can provide their own customer Exporter's, either by custom classes implementing the Exporter interface or simply be providing custom templates. This is documented at in the <xref linkend="hbmtemplate"/> section.
+ </para>
+ </section>
</chapter>
13 years, 9 months
JBoss Tools SVN: r28462 - trunk/hibernatetools/docs/reference/en-US.
by jbosstools-commits@lists.jboss.org
Author: mcaspers
Date: 2011-01-20 22:57:48 -0500 (Thu, 20 Jan 2011)
New Revision: 28462
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:59:48 UTC (rev 28461)
+++ trunk/hibernatetools/docs/reference/en-US/ant.xml 2011-01-21 03:57:48 UTC (rev 28462)
@@ -218,34 +218,29 @@
<section>
<title>Hibernate Configurations</title>
- <para><emphasis>Hibernatetool</emphasis> supports four different Hibernate configurations: A
- standard Hibernate configuration
- (<code><configuration></code>), Annotation based
- configuration (<code><annotationconfiguration></code>),
- JPA persistence based configuration
- (<code><jpaconfiguration></code>) and a JDBC based
- configuration (<code><jdbcconfiguration></code>)
- for use when reverse engineering.</para>
+ <para>
+ <emphasis>Hibernatetool</emphasis> supports four different Hibernate configurations: A standard Hibernate configuration (<code><configuration></code>), Annotation based configuration (<code><annotationconfiguration></code>), JPA persistence based configuration (<code><jpaconfiguration></code>) and a JDBC based configuration (<code><jdbcconfiguration></code>) for use when reverse engineering.
+ </para>
- <para>Each have in common that they are able to build up a Hibernate Configuration object from
- which a set of exporters can be run to generate various output. </para>
+ <para>
+ Each have in common the fact that they are able to build up a Hibernate Configuration object, from which a set of exporters can be run in order to generate various output.
+ </para>
<note>
<title>Note:</title>
- <para>Output can be anything, e.g. specific files, statements execution against a database,
- error reporting or anything else that can be done in java code.</para>
+ <para>
+ Output can be anything, e.g. specific files, statements execution against a database, error reporting or anything else that can be done in java code.
+ </para>
</note>
- <para>The following sections describe what the various configurations can do, plus lists the
- individual settings they have.</para>
+ <para>The following sections describe what the various configurations can do, plus lists the individual settings they have.</para>
<section>
<title>Standard Hibernate Configuration (<configuration>)</title>
- <para>A
- <code><configuration></code>
- is used to define a standard Hibernate configuration. A standard Hibernate
- configuration reads the mappings from a <filename>cfg.xml</filename> and/or a fileset.</para>
+ <para>
+ A <code><configuration></code> is used to define a standard Hibernate configuration. A standard Hibernate configuration reads the mappings from a <filename>cfg.xml</filename> and/or a fileset.
+ </para>
<programlisting role="XML"><![CDATA[<configuration
configurationfile="hibernate.cfg.xml"
@@ -286,7 +281,7 @@
</entry>
<entry>
- <para>The name of a Hibernate configuration file, e.g. "hibernate.cfg.xml"</para>
+ <para>The name of a Hibernate configuration file, e.g. <filename>hibernate.cfg.xml</filename>.</para>
</entry>
<entry>
@@ -300,7 +295,7 @@
</entry>
<entry>
- <para>The name of a property file, e.g. "hibernate.properties"</para>
+ <para>The name of a property file, e.g. <filename>hibernate.properties</filename>.</para>
</entry>
<entry>
@@ -314,8 +309,7 @@
</entry>
<entry>
- <para>Name of a class that implements org.xml.sax.EntityResolver. Used if the
- mapping files require custom entity resolver</para>
+ <para>Name of a class that implements <code>org.xml.sax.EntityResolver</code>. Used if the mapping files require custom entity resolver.</para>
</entry>
<entry>
@@ -330,9 +324,9 @@
</entry>
<entry>
- <para>Name of a class that implements org.hibernate.cfg.NamingStrategy. Used for
- setting up the naming strategy in Hibernate which controls the automatic naming of
- tables and columns.In JPA projects naming strategy is supported for default Name/Columns mapping</para>
+ <para>
+ Name of a class that implements <code>org.hibernate.cfg.NamingStrategy</code>. Used for setting up the naming strategy in Hibernate which controls the automatic naming of tables and columns. In JPA projects naming strategy is supported for default Name/Columns mapping.
+ </para>
</entry>
<entry>
@@ -346,9 +340,9 @@
</entry>
<entry>
- <para>A standard Ant fileset. Used to include hibernate mapping files. Remember that
- if mappings are already specified in the <filename>hibernate.cfg.xml</filename> then it should not be
- included via the fileset as it will result in duplicate import exceptions.</para>
+ <para>
+ A standard Ant fileset. Used to include hibernate mapping files. Remember that if mappings are already specified in the <filename>hibernate.cfg.xml</filename> then it should not be included via the fileset as it will result in duplicate import exceptions.
+ </para>
</entry>
<entry>
@@ -364,14 +358,15 @@
<section>
<title>Example</title>
- <para>This example shows an example where no <filename>hibernate.cfg.xml</filename> exists, and a <filename> hibernate.properties </filename> and fileset is used instead. </para>
+ <para>
+ This example shows an example where no <filename>hibernate.cfg.xml</filename> exists, and a <filename> hibernate.properties</filename> file and fileset is used instead.
+ </para>
<note>
<title>Note:</title>
- <para> Hibernate will still read any global <emphasis>
- <property>hibernate.properties</property>
- </emphasis> available in the classpath, but the specified properties file here will
- override those values for any non-global property.</para>
+ <para>
+ Hibernate will still read any global <filename>hibernate.properties</filename> available in the classpath, but the specified properties file here will override those values for any non-global property.
+ </para>
</note>
<programlisting role="XML"><![CDATA[<hibernatetool destdir="${build.dir}/generated">
@@ -392,26 +387,18 @@
<section>
<title>Annotation based Configuration (<annotationconfiguration>)</title>
- <para>An
- <code><annotationconfiguration></code>
- is used when you want to read the metamodel from EJB3/Hibernate Annotations
- based POJO's.</para>
+ <para>An <code><annotationconfiguration></code> is used when you want to read the metamodel from EJB3/Hibernate Annotations based POJO's.</para>
<important>
<title>Important:</title>
- <para>To use it remember to put the jar files needed for using hibernate annotations in the
- classpath of the
- <code><taskdef></code>, i. e.
- hibernate-annotations.jar and hibernate-commons-annotations.jar.</para>
+ <para>
+ To use it remember to put the jar files needed for using hibernate annotations in the classpath of the <code><taskdef></code>, i.e. <filename>hibernate-annotations.jar</filename> and <filename>hibernate-commons-annotations.jar</filename>.
+ </para>
</important>
- <para>The
- <code><annotationconfiguration></code>
- supports the same attributes as a
- <code><configuration></code>
- except that the configurationfile attribute is now required as that is from
- where an <emphasis>AnnotationConfiguration</emphasis> gets the list of classes/packages it
- should load.</para>
+ <para>
+ The <code><annotationconfiguration></code> supports the same attributes as a <code><configuration></code> except that the configurationfile attribute is now required as that is from where an <emphasis>AnnotationConfiguration</emphasis> gets the list of classes/packages it should load.
+ </para>
<para>Thus the minimal usage is:</para>
@@ -429,26 +416,21 @@
<section>
<title>JPA based configuration (<jpaconfiguration>)</title>
- <para>A <code><jpaconfiguration></code>
- is used when you want to read the metamodel from JPA/Hibernate Annotation where
- you want to use the auto-scan configuration as defined in the JPA spec (part of EJB3). In
- other words, when you do not have a <filename>hibernate.cfg.xml</filename>, but instead have a setup where you use
- a <filename>persistence.xml</filename> packaged in a JPA compliant manner.</para>
+ <para>
+ A <code><jpaconfiguration></code> is used when you want to read the metamodel from JPA/Hibernate Annotation where you want to use the auto-scan configuration as defined in the JPA spec (part of EJB3). In other words, when you do not have a <filename>hibernate.cfg.xml</filename>, but instead have a setup where you use a <filename>persistence.xml</filename> file packaged in a JPA compliant manner.
+ </para>
- <para>The <code><jpaconfiguration></code>
- will simply just try and auto-configure it self based on the available
- classpath, e.g. look for <filename>META-INF/persistence.xml</filename>.</para>
+ <para>
+ The <code><jpaconfiguration></code> will simply try and auto-configure it self based on the available classpath, e.g. look for the <filename>META-INF/persistence.xml</filename> file.
+ </para>
- <para>The <emphasis>
- <property>persistenceunit</property>
- </emphasis> attribute can be used to select a specific persistence unit. If no <emphasis>
- <property>persistenceunit</property>
- </emphasis> is specified it will automatically search for one and if a unique one is found,
- use it, but if multiple persistence units are available it will error.</para>
+ <para>
+ The <code>persistenceunit</code> attribute can be used to select a specific persistence unit. If no <code>persistenceunit</code> is specified it will automatically search for one and if a unique one is found, use it, but having multiple persistence units will result in an error.
+ </para>
- <para>To use a <code><jpaconfiguration></code>
- you will need to specify some additional jars from Hibernate EntityManager in
- the <code><taskdef></code> of the hibernatetool. The following shows a full setup:</para>
+ <para>
+ To use a <code><jpaconfiguration></code> you will need to specify some additional jars from Hibernate EntityManager in the <code><taskdef></code> of the hibernatetool. The following shows a full setup:
+ </para>
<programlisting role="XML"><![CDATA[<path id="ejb3toolslib">
<path refid="jpatoolslib"/> <!-- ref to previously defined toolslib -->
@@ -479,8 +461,9 @@
<note>
<title>Note:</title>
- <para>ejb3configuration was the name used in previous versions. It still works but will emit
- a warning telling you to use <literal>jpaconfiguration</literal> instead.</para>
+ <para>
+ ejb3configuration was the name used in previous versions. It still works but will emit a warning telling you to use <literal>jpaconfiguration</literal> instead.
+ </para>
</note>
</section>
@@ -490,11 +473,13 @@
<para>A <code><jdbcconfiguration></code> is used to perform reverse engineering of the database from a JDBC connection.</para>
- <para>This configuration works by reading the connection properties either from <filename>hibernate.cfg.xml</filename> or <filename>hibernate.properties</filename> with a fileset.</para>
+ <para>
+ This configuration works by reading the connection properties either from a <filename>hibernate.cfg.xml</filename> file or a <filename>hibernate.properties</filename> file with a fileset.
+ </para>
- <para>The <code><jdbcconfiguration></code> has the same attributes as a
- <code><configuration></code>
- plus the following additional attributes:</para>
+ <para>
+ The <code><jdbcconfiguration></code> has the same attributes as a <code><configuration></code> plus the following additional attributes:
+ </para>
<programlisting role="XML"><![CDATA[<jdbcconfiguration
...
@@ -550,7 +535,7 @@
</entry>
<entry>
- <para>The name of a property file, e.g. "hibernate.properties"</para>
+ <para>The name of a property file, e.g. <filename>hibernate.properties</filename></para>
</entry>
<entry>
@@ -564,11 +549,9 @@
</entry>
<entry>
- <para>Name of a class that implements org.hibernate.cfg.reveng.ReverseEngineeringStrategy.
- Used for setting up the strategy the tools will use to control the reverse engineering, e.g. naming of
- properties, which tables to include/exclude etc. Using a class instead of (or as
- addition to) a <filename>reveng.xml</filename> file gives you full programmatic control of the reverse
- engineering.</para>
+ <para>
+ Name of a class that implements <filename>org.hibernate.cfg.reveng.ReverseEngineeringStrategy</filename>. Used for setting up the strategy the tools will use to control the reverse engineering, e.g. naming of properties, which tables to include or exclude etc. Using a class instead of (or as addition to) a <filename>reveng.xml</filename> file gives you full programmatic control of the reverse engineering.
+ </para>
</entry>
<entry>
@@ -583,9 +566,9 @@
</entry>
<entry>
- <para>If true, tables which are pure many-to-many link tables will be mapped as
- such. A pure many-to-many table is one which primary-key contains exactly two
- foreign-keys pointing to other entity tables and has no other columns.</para>
+ <para>
+ If true, tables which are pure many-to-many link tables will be mapped as such. A pure many-to-many table is one which primary-key contains exactly two foreign-keys pointing to other entity tables and has no other columns.
+ </para>
</entry>
<entry>
@@ -599,9 +582,10 @@
</entry>
<entry>
- <para>If true, columns named VERSION or TIMESTAMP with appropriate types will be
- mapped with the appropriate optimistic locking corresponding to
- <code><version></code> or <code><timestamp></code>.</para>
+ <para>
+ If true, columns named VERSION or TIMESTAMP with appropriate types will be mapped with the appropriate optimistic locking corresponding to
+ <code><version></code> or <code><timestamp></code>.
+ </para>
</entry>
<entry>
@@ -617,9 +601,9 @@
<section>
<title>Example</title>
- <para>Here is an example of using <code><jdbcconfiguration></code> to generate Hibernate xml mappings via
- <code><hbm2hbmxml></code>. The connection settings here
- is read from a <filename> hibernate.properties </filename> file but could just as well have been read from a <filename>hibernate.cfg.xml</filename></para>
+ <para>
+ Here is an example of using <code><jdbcconfiguration></code> to generate Hibernate xml mappings via <code><hbm2hbmxml></code>. The connection settings here is read from a <filename> hibernate.properties </filename> file but could just as well have been read from a <filename>hibernate.cfg.xml</filename> file.
+ </para>
<programlisting role="XML"><![CDATA[<hibernatetool>
<jdbcconfiguration propertyfile="etc/hibernate.properties" />
@@ -633,20 +617,16 @@
<section>
<title>Exporters</title>
- <para>Exporters are the parts that do the actual job of converting the hibernate metamodel into
- various artifacts, mainly code. The following section describes the current supported set of
- exporters in the <property>Hibernate Tool</property> distribution. It is also possible for
- userdefined exporters, that is done through the
- <code><hbmtemplate></code>
- exporter.</para>
+ <para>
+ Exporters do the actual job of converting the hibernate metamodel into various artifacts, mainly code. The following section describes the current supported set of exporters in the <productname>Hibernate Tool</productname> distribution. It is also possible to implement user defined exporters, which is done through the <code><hbmtemplate></code> exporter.
+ </para>
<section>
<title>Database schema exporter (<hbm2ddl>)</title>
- <para><code><hbm2ddl></code> lets you run schemaexport and schemaupdate which generates the appropriate SQL
- DDL and allow you to store the result in a file or export it directly to the database.
- Remember that if a custom naming strategy is needed it is placed on the configuration
- element.</para>
+ <para>
+ <code><hbm2ddl></code> lets you run schemaexport and schemaupdate which generates the appropriate SQL DDL and allow you to store the result in a file or export it directly to the database. Remember that if a custom naming strategy is needed it is defined in the configuration element.
+ </para>
<programlisting role="XML"><![CDATA[<hbm2ddl
export="true|false"
@@ -702,11 +682,9 @@
</entry>
<entry>
- <para>Try and create an update script representing the "delta"
- between what is in the database and what the mappings specify. Ignores
- create/update attributes. (<emphasis>Do *not* use against production databases, no
- guarantees at all that the proper delta can be generated nor that the underlying
- database can actually execute the needed operations</emphasis>).</para>
+ <para>
+ Try and create an update script representing the "delta" that is, between what is in the database and what the mappings specify. Ignores create and update attributes. (<emphasis>Do *not* use against production databases, as there are no guarantees that the proper delta can be generated nor that the underlying database can actually execute the required operations</emphasis>).
+ </para>
</entry>
<entry>
@@ -720,8 +698,7 @@
</entry>
<entry>
- <para>Output will contain drop statements for the tables, indices and
- constraints</para>
+ <para>Output will contain drop statements for the tables, indices and constraints</para>
</entry>
<entry>
@@ -736,8 +713,7 @@
</entry>
<entry>
- <para>Output will contain create statements for the tables, indices and
- constraints</para>
+ <para>Output will contain create statements for the tables, indices and constraints</para>
</entry>
<entry>
@@ -808,8 +784,9 @@
<section>
<title>Example</title>
- <para>Basic example of using <code><hbm2ddl></code>, which does not export to the
- database but simply dumps the sql to a file named <filename>sql.ddl</filename>.</para>
+ <para>
+ Basic example of using <code><hbm2ddl></code>, which does not export to the database but simply dumps the SQL to a file named <filename>sql.ddl</filename>.
+ </para>
<programlisting role="XML"><![CDATA[<hibernatetool destdir="${build.dir}/generated">
<configuration configurationfile="hibernate.cfg.xml"/>
@@ -821,8 +798,9 @@
<section>
<title>POJO java code exporter (<hbm2java>)</title>
- <para><code><hbm2java></code> is a java codegenerator. Options for controlling whether JDK 5 syntax can be
- used and whether the POJO should be annotated with EJB3/Hibernate Annotations.</para>
+ <para>
+ <code><hbm2java></code> is a Java code generator. Options for controlling whether JDK 5 syntax can be used and whether the POJO should be annotated with EJB3/Hibernate Annotations.
+ </para>
<programlisting role="XML"><![CDATA[<hbm2java
jdk5="true|false"
@@ -872,8 +850,9 @@
</entry>
<entry>
- <para>Code will contain EJB 3 features, e.g. using annotations from
- javax.persistence and org.hibernate.annotations</para>
+ <para>
+ Code will contain EJB 3 features, e.g. using annotations from <code>javax.persistence</code> and <code>org.hibernate.annotations</code>
+ </para>
</entry>
<entry>
@@ -889,7 +868,7 @@
<section>
<title>Example</title>
- <para>Basic example of using <code><hbm2java></code> to generate POJO's that utilize jdk5 constructs.</para>
+ <para>Basic example of using <code><hbm2java></code> to generate POJO's that utilize JDK5 constructs.</para>
<programlisting role="XML"><![CDATA[<hibernatetool destdir="${build.dir}/generated">
<configuration configurationfile="hibernate.cfg.xml"/>
@@ -901,15 +880,15 @@
<section>
<title>Hibernate Mapping files exporter (<hbm2hbmxml>)</title>
- <para><code><hbm2hbmxml></code> generates a set of .hbm files. Intended to be used together with a
- <code><jdbcconfiguration></code>
- when performing reverse engineering, but can be used with any kind of
- configuration. e.g. to convert from annotation based pojo's to <filename>hbm.xml</filename>.</para>
+ <para>
+ <code><hbm2hbmxml></code> generates a set of <filename>.hbm</filename> files. Intended to be used together with a <code><jdbcconfiguration></code> when performing reverse engineering, but can be used with any kind of configuration. e.g. to convert from annotation based POJO's to a <filename>hbm.xml</filename> file.
+ </para>
<note>
<title>Note:</title>
- <para>Not every possible mapping transformation is possible/implemented (contributions
- welcome) so some hand editing might be necessary.</para>
+ <para>
+ Not every possible mapping transformation is possible/implemented (contributions welcome) so some hand editing might be required.
+ </para>
</note>
<programlisting role="XML"><![CDATA[<hbm2hbmxml/>]]></programlisting>
@@ -924,15 +903,13 @@
<hbm2hbmxml/>
</hibernatetool>]]></programlisting>
- <para><code><hbm2hbmxml></code> is normally used with a <code><jdbcconfiguration></code> like in the above example, but any other configuration can also be used to
- convert between the different ways of performing mappings. Here is an example of that,
- using an <code><annotationconfiguration></code>
- .</para>
+ <para>
+ <code><hbm2hbmxml></code> is normally used with a <code><jdbcconfiguration></code> like in the above example, but any other configuration can also be used to convert between the different ways of performing mappings. Here is an example of that, using an <code><annotationconfiguration></code>.
+ </para>
<note>
<title>Note:</title>
- <para>Not all conversions are implemented (contributions welcome), so some hand editing
- might be necessary.</para>
+ <para>Not all conversions are implemented (contributions welcome), so some hand editing might be necessary.</para>
</note>
<programlisting role="XML"><![CDATA[<hibernatetool destdir="${build.dir}/generated">
@@ -945,9 +922,9 @@
<section>
<title>Hibernate Configuration file exporter (<hbm2cfgxml>)</title>
- <para><code><hbm2cfgxml></code> generates a <filename>hibernate.cfg.xml</filename>. Intended to be used together with a <code><jdbcconfiguration></code>
- when performing reverse engineering, but it can be used with any kind of
- configuration. The <code><hbm2cfgxml></code> will contain the properties used and adds mapping entries for each mapped class.</para>
+ <para>
+ <code><hbm2cfgxml></code> generates a <filename>hibernate.cfg.xml</filename> file. Intended to be used together with a <code><jdbcconfiguration></code> when performing reverse engineering, but it can be used with any kind of configuration. The <code><hbm2cfgxml></code> will contain the properties used and adds mapping entries for each mapped class.
+ </para>
<programlisting role="XML"><![CDATA[<hbm2cfgxml
ejb3="true|false"
@@ -984,8 +961,9 @@
</entry>
<entry>
- <para>The generated <filename>cfg.xml</filename> will have <mapping class=".."/>, opposed
- to <mapping resource="..."/> for each mapping.</para>
+ <para>
+ The generated <filename>cfg.xml</filename> will have <mapping class=".."/>, opposed to <mapping resource="..."/> for each mapping.
+ </para>
</entry>
<entry>
@@ -1003,8 +981,7 @@
<section>
<title>Documentation exporter (<hbm2doc>)</title>
- <para><code><hbm2doc></code>
- generates html documentation a'la javadoc for the database schema et.al.</para>
+ <para><code><hbm2doc></code> generates HTML documentation similar to Javadoc for the database schema et.al.</para>
<programlisting role="XML"><![CDATA[<hbm2doc/>]]></programlisting>
</section>
@@ -1012,8 +989,9 @@
<section>
<title>Query exporter (<query>)</title>
- <para><code><query></code> is used to execute a HQL query statements and optionally sends the output to a
- file. It can be used for verifying the mappings and for basic data extraction.</para>
+ <para>
+ <code><query></code> is used to execute HQL query statements and optionally redirects the output to a file. It can be used for verifying the mappings and for basic data extraction.
+ </para>
<programlisting role="XML"><![CDATA[<query
destfile="filename">
@@ -1021,29 +999,31 @@
</query>
]]></programlisting>
- <para>Currently one session is opened and used for all queries and the query is executed via
- the list() method. In the future more options might become available, like performing
- executeUpdate(), use named queries and etc.</para>
+ <para>
+ Currently one session is opened and used for all queries and the query is executed via the <code>list()</code> method. In the future more options might become available, like performing <code>executeUpdate()</code>, use named queries and etc.
+ </para>
<para/>
<section>
<title>Examples</title>
- <para>The simplest usage of <code><query></code> will just execute the query without dumping to a file. This can be used to
- verify that queries can actually be performed.</para>
+ <para>
+ The simplest usage of <code><query></code> will just execute the query without dumping to a file. This can be used to verify that queries can actually be performed.
+ </para>
<programlisting role="XML"><![CDATA[<hibernatetool>
<configuration configurationfile="hibernate.cfg.xml"/>
<query>from java.lang.Object</query>
</hibernatetool>]]></programlisting>
- <para>Multiple queries can be executed by nested <code><hql></code> elements.
- In this example we also let the output be dumped to <filename>queryresult.txt</filename>.</para>
+ <para>
+ Multiple queries can be executed by nested <code><hql></code> elements. In this example we also let the output be dumped to the <filename>queryresult.txt</filename> file.
+ </para>
<note>
<title>Note:</title>
- <para> Currently the dump is simply a call to toString on each element.</para>
+ <para> Currently the dump is simply a call to <code>toString()</code> on each element.</para>
</note>
<programlisting role="XML"><![CDATA[<hibernatetool>
@@ -1069,16 +1049,16 @@
<note>
<title>Note:</title>
- <para>Previous versions of the tools used Velocity. We are now using Freemarker which
- provides us much better exception and error handling.</para>
+ <para>Previous versions of the tools used <productname>Velocity</productname>. We are now using <productname>Freemarker</productname> which provides us much better exception and error handling.
+ </para>
</note>
<section>
<title>Exporter via <hbmtemplate></title>
- <para>The following is an example of reverse engineering via
- <code><jdbcconfiguration></code> and usage of a custom Exporter via the
- <code><hbmtemplate></code>.</para>
+ <para>
+ The following is an example of reverse engineering via <code><jdbcconfiguration></code> and usage of a custom Exporter via the <code><hbmtemplate></code>.
+ </para>
<programlisting role="XML"><![CDATA[ <hibernatetool destdir="${destdir}">
<jdbcconfiguration
@@ -1100,11 +1080,9 @@
<section>
<title>Relevant Resources Links</title>
- <para>Read more about <ulink url="http://velocity.apache.org/">Velocity</ulink> and <ulink
- url="http://freemarker.org/">Freemarker</ulink> to find out why using the last is better
- or refer to Max Andersen discussion on the topic in <ulink
- url="http://in.relation.to/2110.lace;jsessionid=3462F47B17556604C15DF1B96572E940"
- >"A story about FreeMarker and Velocity"</ulink>.</para>
+ <para>
+ Read more about <ulink url="http://velocity.apache.org/">Velocity</ulink> and <ulink url="http://freemarker.org/">Freemarker</ulink> to find out why using the last is better or refer to Max Andersen discussion on the topic in <ulink url="http://in.relation.to/2110.lace;jsessionid=3462F47B17556604C15DF1B96572E940">"A story about FreeMarker and Velocity"</ulink>.
+ </para>
</section>
</section>
</section>
@@ -1114,57 +1092,44 @@
<section>
<title>Using properties to configure Exporters</title>
- <para>Exporters can be controlled by user properties. The user properties are specified via
- <code><property></code>
- or
- <code><propertyset></code>
- and each exporter will have access to them directly in the templates and via
- <property>Exporter.setProperties()</property>.</para>
+ <para>
+ Exporters can be controlled by user properties. The user properties are specified via <code><property></code> or <code><propertyset></code> and each exporter will have access to them directly in the templates and via <code>Exporter.setProperties()</code>.
+ </para>
<section>
- <title><property> and
- <propertyset></title>
+ <title><property> and <propertyset></title>
- <para>The <code><property></code>
- allows you bind a string value to a key. The value will be available in the
- templates via <code>$<key></code>.
- The following example will assign the string value
- <code>"true"</code>
- to the variable
- <code>$descriptors</code>
- .</para>
+ <para>
+ The <code><property></code> allows you bind a string value to a key. The value will be available in the templates via <code>$<key></code>. The following example will assign the string value <code>"true"</code> to the variable <code>$descriptors</code>.
+ </para>
<programlisting role="XML"><![CDATA[<property key="descriptors" value="true"/>]]></programlisting>
- <para>Most times using <code><property></code> is enough for specifying the properties needed for the exporters. Still the ant
- tools supports the notion of <code><propertyset></code> that is used for grouping a set of properties. More about the functionality of <code><propertyset></code>
- is explained in detail in the <ulink url="http://ant.apache.org/manual/">Ant
- manual</ulink>.</para>
+ <para>
+ Most times using <code><property></code> is enough for specifying the properties needed for the exporters. Still the Ant tools supports the notion of a <code><propertyset></code> which is used for grouping a set of properties. More about the functionality of <code><propertyset></code> is explained in detail in the <ulink url="http://ant.apache.org/manual/">Ant manual</ulink>.
+ </para>
</section>
<section>
<title>Getting access to user specific classes</title>
- <para>If the templates need to access some user class it becomes possible by specifying a <code>
- "toolclass"</code> in the properties.</para>
+ <para>It is possible for the templates to access user classes by specifying a <code>"toolclass"</code> in the properties.</para>
- <programlisting role="XML"><![CDATA[<property key="hibernatetool.sometool.toolclass" value="x.y.z.NameOfToolClass"/>
-]]></programlisting>
+ <programlisting role="XML"><![CDATA[<property key="hibernatetool.sometool.toolclass" value="x.y.z.NameOfToolClass"/>]]></programlisting>
- <para>Placing the above <code><property></code> tag in <code><hibernatetool></code>
- or inside any exporter will automatically create an instance of
- <literal>x.y.z.NameOfToolClass</literal> and it will be available in the templates as
- <literal>$sometool</literal>. This is useful to delegate logic and code generation to java
- code instead of placing such logic in the templates.</para>
+ <para>
+ Placing the above <code><property></code> tag in <code><hibernatetool></code> or inside any exporter will automatically create an instance of <code>x.y.z.NameOfToolClass</code> and it will be available in the templates as <code>$sometool</code>. This is useful to delegate logic and code generation to Java code instead of placing such logic in the templates.
+ </para>
<section>
<title>Example</title>
- <para>Here is an example that uses <code><hbmtemplate></code>
- together with <code><property></code> which will be available to the templates/exporter. </para>
+ <para>
+ Here is an example that uses <code><hbmtemplate></code> together with <code><property></code>, which will be available to the templates/exporter.
+ </para>
<note>
<title>Note:</title>
- <para> This example actually simulates what <code><hbm2java></code> actually does.</para>
+ <para> This example actually simulates what <code><hbm2java></code> does.</para>
</note>
<programlisting role="XML"><![CDATA[<hibernatetool destdir="${build.dir}/generated">
13 years, 9 months
JBoss Tools SVN: r28461 - trunk/build/aggregate/site.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2011-01-20 21:59:48 -0500 (Thu, 20 Jan 2011)
New Revision: 28461
Modified:
trunk/build/aggregate/site/pom.xml
Log:
add org.apache.ant:ant-nodeps:1.7.1 to resolve echoproperties task
Modified: trunk/build/aggregate/site/pom.xml
===================================================================
--- trunk/build/aggregate/site/pom.xml 2011-01-21 02:37:45 UTC (rev 28460)
+++ trunk/build/aggregate/site/pom.xml 2011-01-21 02:59:48 UTC (rev 28461)
@@ -59,6 +59,11 @@
</dependency>
<dependency>
<groupId>org.apache.ant</groupId>
+ <artifactId>ant-nodeps</artifactId>
+ <version>1.7.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.ant</groupId>
<artifactId>ant-trax</artifactId>
<version>1.7.1</version>
</dependency>
@@ -105,4 +110,4 @@
</releases>
</repository>
</repositories>
-</project>
\ No newline at end of file
+</project>
13 years, 9 months
JBoss Tools SVN: r28460 - trunk/build/aggregate/site.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2011-01-20 21:37:45 -0500 (Thu, 20 Jan 2011)
New Revision: 28460
Modified:
trunk/build/aggregate/site/build.xml
Log:
add another test; refactor; add retries to wget
Modified: trunk/build/aggregate/site/build.xml
===================================================================
--- trunk/build/aggregate/site/build.xml 2011-01-21 02:09:23 UTC (rev 28459)
+++ trunk/build/aggregate/site/build.xml 2011-01-21 02:37:45 UTC (rev 28460)
@@ -60,25 +60,25 @@
<var unset="true" name="ALL_ZIPS" />
<var unset="true" name="wget.return" />
<exec executable="wget" dir="${aggregate.zips.dir}" failonerror="false" failifexecutionfails="false" resultproperty="wget.return" outputproperty="null">
- <arg line="${location.cleaned}/logs/zip.list.txt -q --no-clobber" />
+ <arg line="${location.cleaned}/logs/zip.list.txt -q --no-clobber --tries=3" />
</exec>
<echo level="verbose">Fetch SVN_REVISION.txt if it exists (return 8 if not found)</echo>
<var name="svnRevTXT" value="${aggregate.zips.dir}/SVN_REVISION.txt" />
<exec executable="wget" dir="${aggregate.zips.dir}" failonerror="false" failifexecutionfails="false" resultproperty="wget.return" outputproperty="null">
- <arg line="${location.cleaned}/logs/SVN_REVISION.txt -q --no-clobber" />
+ <arg line="${location.cleaned}/logs/SVN_REVISION.txt -q --no-clobber --tries=3" />
</exec>
<echo level="verbose">Fetch SVN_REVISION.xml if it exists (return 8 if not found)</echo>
<var name="svnRevXML" value="${aggregate.zips.dir}/SVN_REVISION.xml" />
<exec executable="wget" dir="${aggregate.zips.dir}" failonerror="false" failifexecutionfails="false" resultproperty="wget.return" outputproperty="null">
- <arg line="${location.cleaned}/logs/SVN_REVISION.xml -q --no-clobber" />
+ <arg line="${location.cleaned}/logs/SVN_REVISION.xml -q --no-clobber --tries=3" />
</exec>
<echo level="verbose">Fetch build.properties if it exists (return 8 if not found)</echo>
<var name="buildProperties" value="${aggregate.zips.dir}/build.properties" />
<exec executable="wget" dir="${aggregate.zips.dir}" failonerror="false" failifexecutionfails="false" resultproperty="wget.return" outputproperty="null">
- <arg line="${location.cleaned}/logs/build.properties -q --no-clobber" />
+ <arg line="${location.cleaned}/logs/build.properties -q --no-clobber --tries=3" />
</exec>
<if>
@@ -115,7 +115,7 @@
zipPath = @{zipPath}
DEST = ${aggregate.zips.dir}/@{zipPath}
</echo>
- <echo> Zip URL = ${location.cleaned}/@{zipPath}</echo>
+ <echo level="verbose"> Zip URL = ${location.cleaned}/@{zipPath}</echo>
<if>
<isset property="isTest" />
<then>
@@ -125,14 +125,14 @@
<else>
<var name="wget.return" unset="true" />
<exec executable="wget" dir="${aggregate.zips.dir}/${relativePath}" failonerror="false" failifexecutionfails="false" resultproperty="wget.return" outputproperty="null">
- <arg line="${location.cleaned}/@{zipPath} -q --no-clobber" />
+ <arg line="${location.cleaned}/@{zipPath} -q --no-clobber --tries=3" />
</exec>
<if>
<not>
<equals arg1="${wget.return}" arg2="0" />
</not>
<then>
- <echo> ** Error [${wget.return}] ** Could not wget ${location.cleaned}/@{zipPath}</echo>
+ <echo> ** Error(@{i}) [${wget.return}] ** Could not wget ${location.cleaned}/@{zipPath}</echo>
</then>
</if>
</else>
@@ -210,11 +210,12 @@
<macrodef name="fetchZipsFromMetadata">
<attribute name="repo" default="" />
<sequential>
- <echo level="verbose">repo = @{repo}</echo>
- <!-- if no zip.list.txt from the inputRepo, then fetch from @{repo}/compositeArtifacts.xml instead -->
+ <var name="location.cleaned" value="@{repo}" />
+ <echo level="verbose">repo = ${location.cleaned}</echo>
+ <!-- if no zip.list.txt from the inputRepo, then fetch from ${location.cleaned}/compositeArtifacts.xml instead -->
<var name="wget.return" unset="true" />
<exec executable="wget" dir="${aggregate.zips.dir}" failonerror="false" failifexecutionfails="false" resultproperty="wget.return" outputproperty="null">
- <arg line="@{repo}/compositeArtifacts.xml -q --no-clobber" />
+ <arg line="${location.cleaned}/compositeArtifacts.xml -q --no-clobber --tries=3" />
</exec>
<if>
<and>
@@ -235,7 +236,7 @@
<delete file="${aggregate.zips.dir}/compositeArtifacts.xml" quiet="true" />
</then>
<else>
- <echo> ** Error [${wget.return}] ** Could not wget @{repo}/compositeArtifacts.xml</echo>
+ <echo> ** Error [${wget.return}] ** Could not wget ${location.cleaned}/compositeArtifacts.xml</echo>
</else>
</if>
</sequential>
@@ -411,10 +412,11 @@
<target name="test.collect.zips.from.list.xml" depends="init">
<property name="isTest" value="true" />
<antcall target="collect.zips">
- <param name="inputRepos" value="1,2,3" />
+ <param name="inputRepos" value="1,2,3,4" />
<param name="inputRepo1" value="http://download.jboss.org/jbosstools/builds/staging/jbosstools-3.2_trunk...." />
<param name="inputRepo2" value="http://download.jboss.org/jbosstools/builds/staging/jbosstools-3.2_trunk...." />
<param name="inputRepo3" value="http://download.jboss.org/jbosstools/builds/staging/jbosstools-3.2_trunk...." />
+ <param name="inputRepo4" value="http://download.jboss.org/jbosstools/builds/staging/xulrunner-1.9.1.2" />
</antcall>
</target>
13 years, 9 months
JBoss Tools SVN: r28459 - trunk/hibernatetools/docs/reference/en-US.
by jbosstools-commits@lists.jboss.org
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>
13 years, 9 months
JBoss Tools SVN: r28458 - trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/filetransfer.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2011-01-20 21:00:46 -0500 (Thu, 20 Jan 2011)
New Revision: 28458
Modified:
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/filetransfer/ECFExamplesTransport.java
Log:
JBDS-1518 Teiid breaks down JBDS installation
Modified: trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/filetransfer/ECFExamplesTransport.java
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/filetransfer/ECFExamplesTransport.java 2011-01-21 01:57:52 UTC (rev 28457)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/filetransfer/ECFExamplesTransport.java 2011-01-21 02:00:46 UTC (rev 28458)
@@ -497,8 +497,9 @@
if (bundles != null && bundles.length > 0) {
for (int i = 0; i < bundles.length; i++) {
try {
- if ((bundles[0].getState() & Bundle.INSTALLED) == 0) {
- bundles[0].start();
+ if ((bundles[i].getState() & Bundle.INSTALLED) == 0) {
+ bundles[i].start(Bundle.START_ACTIVATION_POLICY);
+ bundles[i].start(Bundle.START_TRANSIENT);
return true;
}
} catch (BundleException e) {
13 years, 9 months
JBoss Tools SVN: r28457 - branches/jbosstools-3.2.0.CR1/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/filetransfer.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2011-01-20 20:57:52 -0500 (Thu, 20 Jan 2011)
New Revision: 28457
Modified:
branches/jbosstools-3.2.0.CR1/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/filetransfer/ECFExamplesTransport.java
Log:
JBDS-1518 Teiid breaks down JBDS installation
Modified: branches/jbosstools-3.2.0.CR1/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/filetransfer/ECFExamplesTransport.java
===================================================================
--- branches/jbosstools-3.2.0.CR1/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/filetransfer/ECFExamplesTransport.java 2011-01-21 01:57:04 UTC (rev 28456)
+++ branches/jbosstools-3.2.0.CR1/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/filetransfer/ECFExamplesTransport.java 2011-01-21 01:57:52 UTC (rev 28457)
@@ -497,8 +497,9 @@
if (bundles != null && bundles.length > 0) {
for (int i = 0; i < bundles.length; i++) {
try {
- if ((bundles[0].getState() & Bundle.INSTALLED) == 0) {
- bundles[0].start();
+ if ((bundles[i].getState() & Bundle.INSTALLED) == 0) {
+ bundles[i].start(Bundle.START_ACTIVATION_POLICY);
+ bundles[i].start(Bundle.START_TRANSIENT);
return true;
}
} catch (BundleException e) {
13 years, 9 months
JBoss Tools SVN: r28456 - trunk/build/aggregate/site.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2011-01-20 20:57:04 -0500 (Thu, 20 Jan 2011)
New Revision: 28456
Modified:
trunk/build/aggregate/site/build.xml
Log:
check if zip exists before trying to get size and md5sum
Modified: trunk/build/aggregate/site/build.xml
===================================================================
--- trunk/build/aggregate/site/build.xml 2011-01-21 01:56:41 UTC (rev 28455)
+++ trunk/build/aggregate/site/build.xml 2011-01-21 01:57:04 UTC (rev 28456)
@@ -105,7 +105,7 @@
<propertyregex override="true" property="buildPropertiesPath" defaultvalue="${buildPropertiesPath}" input="${buildPropertiesPath}" regexp="-Sources-|-Update-" replace="-" />
<propertyregex override="true" property="filePrefix" defaultvalue="@{zipPath}" input="@{zipPath}" regexp="(.+)/([^/]+)\.zip" replace="\2.build.properties" />
-
+
<mkdir dir="${aggregate.zips.dir}/${relativePath}" />
<!-- fetch zips to local dir -->
<echo level="verbose">repoNum = @{repoNum}
@@ -138,26 +138,31 @@
</else>
</if>
- <!-- set variable for filename -->
- <echo file="${aggregate.zips.dir}/build.properties.file.txt" append="true">${filePrefix}.filename = @{zipPath}
+ <if>
+ <available file="${aggregate.zips.dir}/@{zipPath}" type="file" />
+ <then>
+ <!-- set variable for filename -->
+ <echo file="${aggregate.zips.dir}/build.properties.file.txt" append="true">${filePrefix}.filename = @{zipPath}
</echo>
- <!-- set variable for filesize in Kb -->
- <length file="${aggregate.zips.dir}/@{zipPath}" property="fs.length.b" />
- <math operand2="${fs.length.b}" operation="/" operand1="1024" result="fs.length.kb" datatype="float" />
- <!-- <math operand2="${fs.length.b}" operation="/" operand1="1048576" result="fs.length.mb" datatype="float"/> -->
- <echo level="verbose">${aggregate.zips.dir}/@{zipPath}: ${fs.length.kb} Kb, ${fs.length.mb} Mb</echo>
- <echo file="${aggregate.zips.dir}/build.properties.file.txt" append="true">${filePrefix}.filesize = ${fs.length.kb} Kb
+ <!-- set variable for filesize in Kb -->
+ <length file="${aggregate.zips.dir}/@{zipPath}" property="fs.length.b" />
+ <math operand2="${fs.length.b}" operation="/" operand1="1024" result="fs.length.kb" datatype="float" />
+ <!-- <math operand2="${fs.length.b}" operation="/" operand1="1048576" result="fs.length.mb" datatype="float"/> -->
+ <echo level="verbose">${aggregate.zips.dir}/@{zipPath}: ${fs.length.kb} Kb, ${fs.length.mb} Mb</echo>
+ <echo file="${aggregate.zips.dir}/build.properties.file.txt" append="true">${filePrefix}.filesize = ${fs.length.kb} Kb
</echo>
- <var name="fs.length.b" unset="true" />
- <var name="fs.length.kb" unset="true" />
+ <var name="fs.length.b" unset="true" />
+ <var name="fs.length.kb" unset="true" />
- <!-- set variable for filemd5 -->
- <checksum file="${aggregate.zips.dir}/@{zipPath}" property="${filePrefix}.filemd5" />
- <propertycopy from="${filePrefix}.filemd5" property="tempmd5" />
- <echo file="${aggregate.zips.dir}/build.properties.file.txt" append="true">${filePrefix}.filemd5 = ${tempmd5}
+ <!-- set variable for filemd5 -->
+ <checksum file="${aggregate.zips.dir}/@{zipPath}" property="${filePrefix}.filemd5" />
+ <propertycopy from="${filePrefix}.filemd5" property="tempmd5" />
+ <echo file="${aggregate.zips.dir}/build.properties.file.txt" append="true">${filePrefix}.filemd5 = ${tempmd5}
</echo>
- <var name="${filePrefix}.filemd5" unset="true" />
- <var name="tempmd5" unset="true" />
+ <var name="${filePrefix}.filemd5" unset="true" />
+ <var name="tempmd5" unset="true" />
+ </then>
+ </if>
<!-- rename the svn and build properties files so they align with the zip names -->
<if>
13 years, 9 months
JBoss Tools SVN: r28455 - trunk/build/aggregate/site.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2011-01-20 20:56:41 -0500 (Thu, 20 Jan 2011)
New Revision: 28455
Modified:
trunk/build/aggregate/site/build.xml
Log:
set failifexecutionfails=false for meta file checks
Modified: trunk/build/aggregate/site/build.xml
===================================================================
--- trunk/build/aggregate/site/build.xml 2011-01-21 01:20:39 UTC (rev 28454)
+++ trunk/build/aggregate/site/build.xml 2011-01-21 01:56:41 UTC (rev 28455)
@@ -59,25 +59,25 @@
<!-- fetch zip.list.txt file, if available -->
<var unset="true" name="ALL_ZIPS" />
<var unset="true" name="wget.return" />
- <exec executable="wget" dir="${aggregate.zips.dir}" failonerror="false" failifexecutionfails="true" resultproperty="wget.return" outputproperty="null">
+ <exec executable="wget" dir="${aggregate.zips.dir}" failonerror="false" failifexecutionfails="false" resultproperty="wget.return" outputproperty="null">
<arg line="${location.cleaned}/logs/zip.list.txt -q --no-clobber" />
</exec>
<echo level="verbose">Fetch SVN_REVISION.txt if it exists (return 8 if not found)</echo>
<var name="svnRevTXT" value="${aggregate.zips.dir}/SVN_REVISION.txt" />
- <exec executable="wget" dir="${aggregate.zips.dir}" failonerror="false" failifexecutionfails="true" resultproperty="wget.return" outputproperty="null">
+ <exec executable="wget" dir="${aggregate.zips.dir}" failonerror="false" failifexecutionfails="false" resultproperty="wget.return" outputproperty="null">
<arg line="${location.cleaned}/logs/SVN_REVISION.txt -q --no-clobber" />
</exec>
<echo level="verbose">Fetch SVN_REVISION.xml if it exists (return 8 if not found)</echo>
<var name="svnRevXML" value="${aggregate.zips.dir}/SVN_REVISION.xml" />
- <exec executable="wget" dir="${aggregate.zips.dir}" failonerror="false" failifexecutionfails="true" resultproperty="wget.return" outputproperty="null">
+ <exec executable="wget" dir="${aggregate.zips.dir}" failonerror="false" failifexecutionfails="false" resultproperty="wget.return" outputproperty="null">
<arg line="${location.cleaned}/logs/SVN_REVISION.xml -q --no-clobber" />
</exec>
<echo level="verbose">Fetch build.properties if it exists (return 8 if not found)</echo>
<var name="buildProperties" value="${aggregate.zips.dir}/build.properties" />
- <exec executable="wget" dir="${aggregate.zips.dir}" failonerror="false" failifexecutionfails="true" resultproperty="wget.return" outputproperty="null">
+ <exec executable="wget" dir="${aggregate.zips.dir}" failonerror="false" failifexecutionfails="false" resultproperty="wget.return" outputproperty="null">
<arg line="${location.cleaned}/logs/build.properties -q --no-clobber" />
</exec>
@@ -208,7 +208,7 @@
<echo level="verbose">repo = @{repo}</echo>
<!-- if no zip.list.txt from the inputRepo, then fetch from @{repo}/compositeArtifacts.xml instead -->
<var name="wget.return" unset="true" />
- <exec executable="wget" dir="${aggregate.zips.dir}" failonerror="false" failifexecutionfails="true" resultproperty="wget.return" outputproperty="null">
+ <exec executable="wget" dir="${aggregate.zips.dir}" failonerror="false" failifexecutionfails="false" resultproperty="wget.return" outputproperty="null">
<arg line="@{repo}/compositeArtifacts.xml -q --no-clobber" />
</exec>
<if>
13 years, 9 months
JBoss Tools SVN: r28454 - in trunk/download.jboss.org/jbosstools/updates: requirements/helios and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2011-01-20 20:20:39 -0500 (Thu, 20 Jan 2011)
New Revision: 28454
Added:
trunk/download.jboss.org/jbosstools/updates/helios/compositeArtifacts.xml
trunk/download.jboss.org/jbosstools/updates/helios/compositeContent.xml
trunk/download.jboss.org/jbosstools/updates/helios/site_empty.xml
Removed:
trunk/download.jboss.org/jbosstools/updates/helios/site.xml
trunk/download.jboss.org/jbosstools/updates/requirements/helios/index.html
trunk/download.jboss.org/jbosstools/updates/requirements/helios/site.xml
Modified:
trunk/download.jboss.org/jbosstools/updates/helios/README.txt
trunk/download.jboss.org/jbosstools/updates/helios/index.html
trunk/download.jboss.org/jbosstools/updates/requirements/helios/README.txt
Log:
make /updates/helios composite site for helios + orbit; make requirements/helios a helios mirror from eclipse.org; update README.txt and fix redirects in index.html
Modified: trunk/download.jboss.org/jbosstools/updates/helios/README.txt
===================================================================
--- trunk/download.jboss.org/jbosstools/updates/helios/README.txt 2011-01-21 01:20:16 UTC (rev 28453)
+++ trunk/download.jboss.org/jbosstools/updates/helios/README.txt 2011-01-21 01:20:39 UTC (rev 28454)
@@ -1 +1,3 @@
-Instead of mirroring Helios here, this site is now a no-op empty placeholder.
+Instead of mirroring Helios here, redirect from here to ../requirements/helios/ and ../requirements/orbit/
+
+See ../requirements/helios/README.txt for how to mirror from eclipse.org to here.
Added: trunk/download.jboss.org/jbosstools/updates/helios/compositeArtifacts.xml
===================================================================
--- trunk/download.jboss.org/jbosstools/updates/helios/compositeArtifacts.xml (rev 0)
+++ trunk/download.jboss.org/jbosstools/updates/helios/compositeArtifacts.xml 2011-01-21 01:20:39 UTC (rev 28454)
@@ -0,0 +1,16 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<?compositeArtifactRepository version='1.0.0'?>
+<repository name='JBoss Tools Staging Repository' type='org.eclipse.equinox.internal.p2.artifact.repository.CompositeArtifactRepository' version='1.0.0'>
+<properties size='2'>
+<property name='p2.compressed' value='true'/>
+<!--
+ get new time w/
+ date +%s000
+-->
+<property name='p2.timestamp' value='1295563511000'/>
+</properties>
+<children size='2'>
+<child location='http://download.jboss.org/jbosstools/updates/requirements/helios/20100623...'/>
+<child location='http://download.jboss.org/jbosstools/updates/requirements/orbit/R20100519...'/>
+</children>
+</repository>
Added: trunk/download.jboss.org/jbosstools/updates/helios/compositeContent.xml
===================================================================
--- trunk/download.jboss.org/jbosstools/updates/helios/compositeContent.xml (rev 0)
+++ trunk/download.jboss.org/jbosstools/updates/helios/compositeContent.xml 2011-01-21 01:20:39 UTC (rev 28454)
@@ -0,0 +1,16 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<?compositeMetadataRepository version='1.0.0'?>
+<repository name='JBoss Tools Staging Repository' type='org.eclipse.equinox.internal.p2.metadata.repository.CompositeMetadataRepository' version='1.0.0'>
+<properties size='2'>
+<property name='p2.compressed' value='true'/>
+<!--
+ get new time w/
+ date +%s000
+-->
+<property name='p2.timestamp' value='1295563511000'/>
+</properties>
+<children size='2'>
+<child location='http://download.jboss.org/jbosstools/updates/requirements/helios/20100623...'/>
+<child location='http://download.jboss.org/jbosstools/updates/requirements/orbit/R20100519...'/>
+</children>
+</repository>
Modified: trunk/download.jboss.org/jbosstools/updates/helios/index.html
===================================================================
--- trunk/download.jboss.org/jbosstools/updates/helios/index.html 2011-01-21 01:20:16 UTC (rev 28453)
+++ trunk/download.jboss.org/jbosstools/updates/helios/index.html 2011-01-21 01:20:39 UTC (rev 28454)
@@ -1,6 +1,6 @@
<html>
<head>
-<meta http-equiv="refresh" content="0;url=http://download.jboss.org/jbosstools/updates/target-platform/latest/">
+<meta http-equiv="refresh" content="0;url=http://download.jboss.org/jbosstools/updates/requirements/helios/">
</head>
</html>
Deleted: trunk/download.jboss.org/jbosstools/updates/helios/site.xml
===================================================================
--- trunk/download.jboss.org/jbosstools/updates/helios/site.xml 2011-01-21 01:20:16 UTC (rev 28453)
+++ trunk/download.jboss.org/jbosstools/updates/helios/site.xml 2011-01-21 01:20:39 UTC (rev 28454)
@@ -1,3 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<site/>
-
Copied: trunk/download.jboss.org/jbosstools/updates/helios/site_empty.xml (from rev 28449, trunk/download.jboss.org/jbosstools/updates/helios/site.xml)
===================================================================
--- trunk/download.jboss.org/jbosstools/updates/helios/site_empty.xml (rev 0)
+++ trunk/download.jboss.org/jbosstools/updates/helios/site_empty.xml 2011-01-21 01:20:39 UTC (rev 28454)
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<site/>
+
Modified: trunk/download.jboss.org/jbosstools/updates/requirements/helios/README.txt
===================================================================
--- trunk/download.jboss.org/jbosstools/updates/requirements/helios/README.txt 2011-01-21 01:20:16 UTC (rev 28453)
+++ trunk/download.jboss.org/jbosstools/updates/requirements/helios/README.txt 2011-01-21 01:20:39 UTC (rev 28454)
@@ -1 +1,14 @@
-Instead of mirroring Helios here, this site is now a no-op empty placeholder.
+To rsync a mirror from eclipse.org to here, do the following:
+
+1. ssh to qa01, then sudo to hudson:
+
+$ ssh nboldt(a)qa01.qa.atl2.redhat.com
+$ sudo su - hudson
+
+2. rsync build.eclipse.org to reports.qa:
+
+$ rsync -aP --delete nickb@build.eclipse.org:~/downloads/releases/helios/* /qa/services/http/binaries/RHDS/updates/requirements/helios/
+
+3. rsync reports.qa to download.jboss.org:
+
+$ rsync -aP --delete /qa/services/http/binaries/RHDS/updates/requirements/helios/* jbossqa@filemgmt.jboss.org:/htdocs/jbosstools/updates/requirements/helios/
Deleted: trunk/download.jboss.org/jbosstools/updates/requirements/helios/index.html
===================================================================
--- trunk/download.jboss.org/jbosstools/updates/requirements/helios/index.html 2011-01-21 01:20:16 UTC (rev 28453)
+++ trunk/download.jboss.org/jbosstools/updates/requirements/helios/index.html 2011-01-21 01:20:39 UTC (rev 28454)
@@ -1,6 +0,0 @@
-<html>
-<head>
-<meta http-equiv="refresh" content="0;url=http://download.jboss.org/jbosstools/updates/target-platform/latest/">
-</head>
-</html>
-
Deleted: trunk/download.jboss.org/jbosstools/updates/requirements/helios/site.xml
===================================================================
--- trunk/download.jboss.org/jbosstools/updates/requirements/helios/site.xml 2011-01-21 01:20:16 UTC (rev 28453)
+++ trunk/download.jboss.org/jbosstools/updates/requirements/helios/site.xml 2011-01-21 01:20:39 UTC (rev 28454)
@@ -1,3 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<site/>
-
13 years, 9 months