JAVA_HOME is not set. Updated building ant section and README. Submitted by: Jeff Martin <jeff.martin@synamic.co.uk>, Barrie Treloar <Barrie.Treloar@camtech.com.au> git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@267846 13f79535-47bb-0310-9956-ffa450edef68master
@@ -53,6 +53,8 @@ | |||||
------------- | ------------- | ||||
Documentation is available in HTML format, in the docs/ directory. | Documentation is available in HTML format, in the docs/ directory. | ||||
For building see docs/index.html#buildingant. | |||||
For installing see docs/index.html#installing. | |||||
Licensing | Licensing | ||||
@@ -19,12 +19,19 @@ else | |||||
CLASSPATH=$LOCALCLASSPATH | CLASSPATH=$LOCALCLASSPATH | ||||
fi | fi | ||||
if test -f $JAVA_HOME/lib/tools.jar ; then | |||||
CLASSPATH=$CLASSPATH:$JAVA_HOME/lib/tools.jar | |||||
fi | |||||
if test -f $JAVA_HOME/lib/classes.zip ; then | |||||
CLASSPATH=$CLASSPATH:$JAVA_HOME/lib/classes.zip | |||||
if [ "$JAVA_HOME" != "" ] ; then | |||||
if test -f $JAVA_HOME/lib/tools.jar ; then | |||||
CLASSPATH=$CLASSPATH:$JAVA_HOME/lib/tools.jar | |||||
fi | |||||
if test -f $JAVA_HOME/lib/classes.zip ; then | |||||
CLASSPATH=$CLASSPATH:$JAVA_HOME/lib/classes.zip | |||||
fi | |||||
else | |||||
echo "Warning: JAVA_HOME environment variable not set." | |||||
echo " If build fails because sun.* classes could not be found" | |||||
echo " you will need to set the JAVA_HOME environment variable" | |||||
echo " to the installation directory of java." | |||||
fi | fi | ||||
TOOLS=src/main/org/apache/tools | TOOLS=src/main/org/apache/tools | ||||
@@ -268,6 +268,7 @@ | |||||
<!-- Run testcase --> | <!-- Run testcase --> | ||||
<!-- =================================================================== --> | <!-- =================================================================== --> | ||||
<target name="runtests" depends="compiletests" if="junit.present"> | <target name="runtests" depends="compiletests" if="junit.present"> | ||||
<!-- | <!-- | ||||
This would make the buildprocess fail if using an Ant version | This would make the buildprocess fail if using an Ant version | ||||
without the junit task | without the junit task | ||||
@@ -280,7 +281,11 @@ | |||||
<pathelement path="${java.class.path}" /> | <pathelement path="${java.class.path}" /> | ||||
</classpath> | </classpath> | ||||
<test name="org.apache.tools.ant.AllJUnitTests" /> | |||||
<test name="org.apache.tools.ant.IntrospectionHelperTest" /> | |||||
<test name="org.apache.tools.ant.types.CommandlineTest" /> | |||||
<test name="org.apache.tools.ant.types.CommandlineJavaTest" /> | |||||
<test name="org.apache.tools.ant.types.EnumeratedAttributeTest" /> | |||||
<test name="org.apache.tools.ant.types.PathTest" /> | |||||
</junit> | </junit> | ||||
--> | --> | ||||
@@ -24,7 +24,7 @@ | |||||
<li>Dave Walend (<a href="mailto:dwalend@cs.tufts.edu">dwalend@cs.tufts.edu</a>)</li> | <li>Dave Walend (<a href="mailto:dwalend@cs.tufts.edu">dwalend@cs.tufts.edu</a>)</li> | ||||
</ul> | </ul> | ||||
<p>Version 1.2 - 2000/07/27</p> | |||||
<p>Version 1.2 - 2000/07/28</p> | |||||
<hr> | <hr> | ||||
<h2>Table of Contents</h2> | <h2>Table of Contents</h2> | ||||
@@ -585,6 +585,7 @@ If you do not want these default excludes applied, you may disable them with the | |||||
<li><a href="#taskdef">Taskdef</a></li> | <li><a href="#taskdef">Taskdef</a></li> | ||||
<li><a href="#touch">Touch</a></li> | <li><a href="#touch">Touch</a></li> | ||||
<li><a href="#tstamp">Tstamp</a></li> | <li><a href="#tstamp">Tstamp</a></li> | ||||
<li><a href="sql.html">Sql</a></li> | |||||
<li><a href="#style">Style</a></li> | <li><a href="#style">Style</a></li> | ||||
<li><a href="#unzip">Unjar</a></li> | <li><a href="#unzip">Unjar</a></li> | ||||
<li><a href="#untar">Untar</a></li> | <li><a href="#untar">Untar</a></li> | ||||
@@ -0,0 +1,99 @@ | |||||
<html> | |||||
<head> | |||||
</head> | |||||
<body> | |||||
<h2><a name="sql">Sql</a></h2> | |||||
<h3>Description</h3> | |||||
<p>Executes a series of sql statement via JDBC to a database. Statements can either be read in from a text file using the src attribute or from between the enclosing sql tags.</p> | |||||
<p>Multiple statements can be set and each statement is delimited from the next use a semi-colon. Individual lines within the statements can be commented using either -- or // at the start of the line.</p> | |||||
<p>The auto-commit attribute specifies whether auto commit should be turned on or off whilst executing the statements. If auto-commit is turned on each statement will be executed and commited. If it is turned off the statements will all be executed as one transaction.</p> | |||||
<h3>Parameters</h3> | |||||
<table border="1" cellpadding="2" cellspacing="0"> | |||||
<tr> | |||||
<td width="12%" valign="top"><b>Attribute</b></td> | |||||
<td width="78%" valign="top"><b>Description</b></td> | |||||
<td width="10%" valign="top"><b>Required</b></td> | |||||
</tr> | |||||
<tr> | |||||
<td width="12%" valign="top">driver</td> | |||||
<td width="78%" valign="top">Class name of the jdbc driver</td> | |||||
<td width="10%" valign="top">Yes</td> | |||||
</tr> | |||||
<tr> | |||||
<td width="12%" valign="top">url</td> | |||||
<td width="78%" valign="top">Database connection url</td> | |||||
<td width="10%" valign="top">Yes</td> | |||||
</tr> | |||||
<tr> | |||||
<td width="12%" valign="top">userid</td> | |||||
<td width="78%" valign="top">Database user name</td> | |||||
<td width="10%" valign="top">Yes</td> | |||||
</tr> | |||||
<tr> | |||||
<td width="12%" valign="top">password</td> | |||||
<td width="78%" valign="top">Database password</td> | |||||
<td width="10%" valign="top">Yes</td> | |||||
</tr> | |||||
<tr> | |||||
<td width="12%" valign="top">src</td> | |||||
<td width="78%" valign="top">File containing sql statements</td> | |||||
<td width="10%" valign="top">Yes, unless statements enclosed within tags</td> | |||||
</tr> | |||||
<tr> | |||||
<td width="12%" valign="top">autocommit</td> | |||||
<td width="78%" valign="top">Auto commit flag for database connection (default false)</td> | |||||
<td width="10%" valign="top">No, default "false"</td> | |||||
</tr> | |||||
</table> | |||||
<h3>Examples</h3> | |||||
<pre><blockquote><sql | |||||
driver="org.database.jdbcDriver" | |||||
url="jdbc:database-url" | |||||
userid="sa" | |||||
password="pass" | |||||
src="data.sql" | |||||
/> | |||||
</pre></blockquote> | |||||
<p>Connects to the database given in url as the sa user using the org.database.jdbcDriver and executes the sql statements contained within the file data.sql</p> | |||||
<blockquote><pre><sql | |||||
driver="org.database.jdbcDriver" | |||||
url="jdbc:database-url" | |||||
userid="sa" | |||||
password="pass" | |||||
> | |||||
insert | |||||
into table some_table | |||||
values(1,2,3,4); | |||||
truncate table some_other_table; | |||||
</sql> | |||||
</pre></blockquote> | |||||
<p>Connects to the database given in url as the sa user using the org.database.jdbcDriver and executes the two sql statements inserting data into some_table and truncating some_other_table</p> | |||||
<p>Note that you may want to enclose your statements in | |||||
<code><![CDATA[</code> ... <code>]]></code> sections so you don't | |||||
need to escape <code><</code>, <code>></code> <code>&</code> | |||||
or other special characters. For exampe:</p> | |||||
<blockquote><pre><sql | |||||
driver="org.database.jdbcDriver" | |||||
url="jdbc:database-url" | |||||
userid="sa" | |||||
password="pass" | |||||
><![CDATA[ | |||||
update some_table set column1 = column1 + 1 where column2 < 42; | |||||
]]></sql> | |||||
</pre></blockquote> | |||||
</body> | |||||
</html> |
@@ -51,6 +51,11 @@ if [ "$JAVA_HOME" != "" ] ; then | |||||
if test -f $JAVA_HOME/lib/classes.zip ; then | if test -f $JAVA_HOME/lib/classes.zip ; then | ||||
LOCALCLASSPATH=$LOCALCLASSPATH:$JAVA_HOME/lib/classes.zip | LOCALCLASSPATH=$LOCALCLASSPATH:$JAVA_HOME/lib/classes.zip | ||||
fi | fi | ||||
else | |||||
echo "Warning: JAVA_HOME environment variable not set." | |||||
echo " If build fails because sun.* classes could not be found" | |||||
echo " you will need to set the JAVA_HOME environment variable" | |||||
echo " to the installation directory of java." | |||||
fi | fi | ||||
$JAVACMD -classpath $LOCALCLASSPATH -Dant.home=${ANT_HOME} $ANT_OPTS org.apache.tools.ant.Main $@ | $JAVACMD -classpath $LOCALCLASSPATH -Dant.home=${ANT_HOME} $ANT_OPTS org.apache.tools.ant.Main $@ | ||||