Author: jgbutler
Date: Sat Aug 19 16:16:34 2006
New Revision: 432894
URL: http://svn.apache.org/viewvc?rev=432894&view=rev
Log:
Abator build and documentation updates
Modified:
ibatis/trunk/java/mapper/mapper2/tools/abator/core/build/build.xml
ibatis/trunk/java/mapper/mapper2/tools/abator/core/build/version.properties
ibatis/trunk/java/mapper/mapper2/tools/abator/core/doc/README.txt
ibatis/trunk/java/mapper/mapper2/tools/abator/core/doc/ReleaseNotes.txt
ibatis/trunk/java/mapper/mapper2/tools/abator/core/htmldoc/configreference/properties.html
ibatis/trunk/java/mapper/mapper2/tools/abator/core/htmldoc/whatsNew.html
Modified: ibatis/trunk/java/mapper/mapper2/tools/abator/core/build/build.xml
URL:
http://svn.apache.org/viewvc/ibatis/trunk/java/mapper/mapper2/tools/abator/core/build/build.xml?rev=432894&r1=432893&r2=432894&view=diff
==============================================================================
--- ibatis/trunk/java/mapper/mapper2/tools/abator/core/build/build.xml
(original)
+++ ibatis/trunk/java/mapper/mapper2/tools/abator/core/build/build.xml Sat Aug
19 16:16:34 2006
@@ -15,8 +15,10 @@
ant clean
- Important: the build requires a JSE 5.0 or greater compiler!!!
- Abator itself is compiled for JSE 1.4, but the tests require 5.0.
+ Important: the build will run with either JDK 1.4, or JDK 5.0.
+ If you use JDK 5.0, more tests will run - this is the only way to
+ effectively test that the Java5 generator set is functioning properly.
+ But we should still run with JDK 1.4 for a release build.
Note: to update the version of Abator, change the
version.properties file (the "version" property).
@@ -37,12 +39,21 @@
<target name="clean" unless="${TSTAMP}">
<tstamp/>
+ <available classname="java.lang.annotation.Annotation"
property="usingJava5"/>
<delete dir="${work.dir}" />
<delete dir="${deploy.dir}" />
<delete dir="${reports.dir}" />
</target>
+
+ <target name="sayJava5" depends="clean" if="usingJava5">
+ <echo message="Using Java 5 for compilation! This is not suitable for a
release build." />
+ </target>
- <target name="build.prepare" depends="clean">
+ <target name="sayJava2" depends="clean" unless="usingJava5">
+ <echo message="Not Using Java 5 for compilation! This is suitable for
a release build, but fewer test will be run." />
+ </target>
+
+ <target name="build.prepare" depends="clean, sayJava5, sayJava2">
<mkdir dir="${deploy.dir}"/>
<mkdir dir="${work.dir}"/>
<mkdir dir="${work.classes}"/>
@@ -121,31 +132,19 @@
</target>
<target name="test.prepare" depends="build.compile">
- <mkdir dir="${generated.source.dir.java5}"/>
<mkdir dir="${generated.source.dir.java2}"/>
+ <mkdir dir="${generated.source.dir.java5}"/>
<mkdir dir="${reports.dir}"/>
<mkdir dir="${reports.junit}"/>
- <copy todir="${generated.source.dir.java5}">
- <fileset dir="${basedir}/../testJava5" />
- </copy>
-
<copy todir="${generated.source.dir.java2}">
<fileset dir="${basedir}/../testJava2" />
</copy>
- </target>
-
- <target name="test.generate.test.code" depends="test.prepare">
- <!-- note that the class does not exist until the build runs.
- Validating Ant editors will complain that the task cannot be
- found, but it's not really an error. -->
- <taskdef name="abator"
- classname="org.apache.ibatis.abator.ant.AbatorAntTask">
- <classpath>
- <pathelement location="${work.classes}"/>
- </classpath>
- </taskdef>
-
+
+ <copy todir="${generated.source.dir.java5}">
+ <fileset dir="${basedir}/../testJava5" />
+ </copy>
+
<!-- create the test database -->
<sql driver="org.hsqldb.jdbcDriver"
url="jdbc:hsqldb:mem:aname"
@@ -153,12 +152,20 @@
password=""
src="${generated.source.dir.java5}/abatortest/CreateDB.sql"/>
- <abator
configfile="${generated.source.dir.java5}/abatortest/abatorConfig.xml" >
- <propertyset>
- <propertyref name="generated.source.dir.java5"/>
- </propertyset>
- </abator>
+ </target>
+
+ <target name="test.generate.test.code.java2" depends="test.prepare">
+ <!-- note that the class does not exist until the build runs.
+ Validating Ant editors will complain that the task cannot be
+ found, but it's not really an error. -->
+ <taskdef name="abator"
+ classname="org.apache.ibatis.abator.ant.AbatorAntTask">
+ <classpath>
+ <pathelement location="${work.classes}"/>
+ </classpath>
+ </taskdef>
+
<abator
configfile="${generated.source.dir.java2}/abatortest/java2/abatorConfig.xml" >
<propertyset>
<propertyref name="generated.source.dir.java2"/>
@@ -166,14 +173,25 @@
</abator>
</target>
- <target name="test.compile.test.code" depends="test.generate.test.code">
- <javac srcdir="${generated.source.dir.java5}"
- deprecation="true"
- debug="true"
- source="1.5"
- target="1.5">
- </javac>
-
+ <target name="test.generate.test.code.java5" depends="test.prepare"
if="usingJava5">
+ <!-- note that the class does not exist until the build runs.
+ Validating Ant editors will complain that the task cannot be
+ found, but it's not really an error. -->
+ <taskdef name="abator"
+ classname="org.apache.ibatis.abator.ant.AbatorAntTask">
+ <classpath>
+ <pathelement location="${work.classes}"/>
+ </classpath>
+ </taskdef>
+
+ <abator
configfile="${generated.source.dir.java5}/abatortest/abatorConfig.xml" >
+ <propertyset>
+ <propertyref name="generated.source.dir.java5"/>
+ </propertyset>
+ </abator>
+ </target>
+
+ <target name="test.compile.test.code.java2"
depends="test.generate.test.code.java2">
<javac srcdir="${generated.source.dir.java2}"
deprecation="true"
debug="true"
@@ -182,32 +200,43 @@
</javac>
</target>
- <target name="test.run" depends="test.compile.test.code">
+ <target name="test.compile.test.code.java5"
depends="test.generate.test.code.java5" if="usingJava5">
+ <javac srcdir="${generated.source.dir.java5}"
+ deprecation="true"
+ debug="true"
+ source="1.5"
+ target="1.5">
+ </javac>
+ </target>
+
+ <target name="test.run.java2" depends="test.compile.test.code.java2">
<junit printsummary="true" showoutput="true">
<formatter type="xml"/>
<batchtest todir="${reports.junit}" fork="yes" haltonerror="no"
failureproperty="testsFailed">
- <fileset dir="${generated.source.dir.java5}">
+ <fileset dir="${generated.source.dir.java2}">
<include name="**/*Tests.class"/>
</fileset>
</batchtest>
<classpath>
- <pathelement location="${generated.source.dir.java5}"/>
+ <pathelement location="${generated.source.dir.java2}"/>
<pathelement
location="${basedir}/../devlib/ibatis-common-2.jar" />
<pathelement location="${basedir}/../devlib/ibatis-dao-2.jar" />
<pathelement
location="${basedir}/../devlib/ibatis-sqlmap-2.jar" />
<pathelement location="${basedir}/../devlib/hsqldb.jar" />
</classpath>
</junit>
-
+ </target>
+
+ <target name="test.run.java5" depends="test.compile.test.code.java5"
if="usingJava5">
<junit printsummary="true" showoutput="true">
<formatter type="xml"/>
<batchtest todir="${reports.junit}" fork="yes" haltonerror="no"
failureproperty="testsFailed">
- <fileset dir="${generated.source.dir.java2}">
+ <fileset dir="${generated.source.dir.java5}">
<include name="**/*Tests.class"/>
</fileset>
</batchtest>
<classpath>
- <pathelement location="${generated.source.dir.java2}"/>
+ <pathelement location="${generated.source.dir.java5}"/>
<pathelement
location="${basedir}/../devlib/ibatis-common-2.jar" />
<pathelement location="${basedir}/../devlib/ibatis-dao-2.jar" />
<pathelement
location="${basedir}/../devlib/ibatis-sqlmap-2.jar" />
@@ -215,7 +244,7 @@
</classpath>
</junit>
</target>
-
+
<target name="test.run.no.compile" >
<junit printsummary="true" showoutput="true">
<formatter type="xml"/>
@@ -250,7 +279,7 @@
</junit>
</target>
- <target name="test.report" depends="test.run" >
+ <target name="test.report" depends="test.run.java2, test.run.java5" >
<junitreport todir="${reports.junit}">
<fileset dir="${reports.junit}">
<include name="TEST-*.xml"/>
Modified:
ibatis/trunk/java/mapper/mapper2/tools/abator/core/build/version.properties
URL:
http://svn.apache.org/viewvc/ibatis/trunk/java/mapper/mapper2/tools/abator/core/build/version.properties?rev=432894&r1=432893&r2=432894&view=diff
==============================================================================
--- ibatis/trunk/java/mapper/mapper2/tools/abator/core/build/version.properties
(original)
+++ ibatis/trunk/java/mapper/mapper2/tools/abator/core/build/version.properties
Sat Aug 19 16:16:34 2006
@@ -1,4 +1,4 @@
#Abator build version info
-#Thu Aug 17 17:45:34 CDT 2006
+#Sat Aug 19 18:13:14 CDT 2006
version=1.0.0
-buildNum=223
+buildNum=234
Modified: ibatis/trunk/java/mapper/mapper2/tools/abator/core/doc/README.txt
URL:
http://svn.apache.org/viewvc/ibatis/trunk/java/mapper/mapper2/tools/abator/core/doc/README.txt?rev=432894&r1=432893&r2=432894&view=diff
==============================================================================
--- ibatis/trunk/java/mapper/mapper2/tools/abator/core/doc/README.txt (original)
+++ ibatis/trunk/java/mapper/mapper2/tools/abator/core/doc/README.txt Sat Aug
19 16:16:34 2006
@@ -1,7 +1,7 @@
===============================================================================
Overview
--------
-Abator is a code generator for the iBATIS data mapping framefork.
+Abator is a code generator for the iBATIS SQL mapping framefork.
Abator will introspect database tables (through JDBC DatabaseMetaData) and
generate SQL Map XML files, Java model object (POJOs) tha match the table,
and (optionally) DAO classes that use the other generated objects.
Modified:
ibatis/trunk/java/mapper/mapper2/tools/abator/core/doc/ReleaseNotes.txt
URL:
http://svn.apache.org/viewvc/ibatis/trunk/java/mapper/mapper2/tools/abator/core/doc/ReleaseNotes.txt?rev=432894&r1=432893&r2=432894&view=diff
==============================================================================
--- ibatis/trunk/java/mapper/mapper2/tools/abator/core/doc/ReleaseNotes.txt
(original)
+++ ibatis/trunk/java/mapper/mapper2/tools/abator/core/doc/ReleaseNotes.txt Sat
Aug 19 16:16:34 2006
@@ -21,6 +21,9 @@
14. Allowed the Ant task to accept a property set
15. Added a <properties> element to the XML configuration
+For full details, see the user's guid at doc\index.html in this
+distribution - then look at the "What's New" page.
+
-------------------------------------------------------------------------------
Version 0.6.5:
1. Added support for specifying rootClass for the model objects and
Modified:
ibatis/trunk/java/mapper/mapper2/tools/abator/core/htmldoc/configreference/properties.html
URL:
http://svn.apache.org/viewvc/ibatis/trunk/java/mapper/mapper2/tools/abator/core/htmldoc/configreference/properties.html?rev=432894&r1=432893&r2=432894&view=diff
==============================================================================
---
ibatis/trunk/java/mapper/mapper2/tools/abator/core/htmldoc/configreference/properties.html
(original)
+++
ibatis/trunk/java/mapper/mapper2/tools/abator/core/htmldoc/configreference/properties.html
Sat Aug 19 16:16:34 2006
@@ -31,7 +31,7 @@
<tr>
<td valign="top">resource</td>
<td>The qualified name of the property file. When specifying the
resource, the
- classpath will be search for the properties file. So a file specified as
+ classpath will be searched for the properties file. So a file specified as
<code>com/myproject/abatorConfig.properties</code> must exist in the
<code>com.myproject</code> package.</td>
</tr>
Modified:
ibatis/trunk/java/mapper/mapper2/tools/abator/core/htmldoc/whatsNew.html
URL:
http://svn.apache.org/viewvc/ibatis/trunk/java/mapper/mapper2/tools/abator/core/htmldoc/whatsNew.html?rev=432894&r1=432893&r2=432894&view=diff
==============================================================================
--- ibatis/trunk/java/mapper/mapper2/tools/abator/core/htmldoc/whatsNew.html
(original)
+++ ibatis/trunk/java/mapper/mapper2/tools/abator/core/htmldoc/whatsNew.html
Sat Aug 19 16:16:34 2006
@@ -128,6 +128,11 @@
See the <a
href="configreference/abatorContext.html"><abatorContext></a>
reference page for more information.
</li>
+ <li>Added the ability to specify an external properties file for passing
+ parameters into an Abator configuration file (like the iBATIS properties
+ file). See the <a
href="configreference/properties.html"><properties></a>
+ reference page for more information.
+ </li>
<li>The Ant task now supports a "verbose" attribute. See the
<a href="running.html">Running Abator</a> page for more information.
</li>