ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@locus.apache.org
Subject cvs commit: jakarta-ant/src/bin ant
Date Fri, 28 Jul 2000 08:57:30 GMT
bodewig     00/07/28 01:57:30

  Modified:    .        README bootstrap.sh build.xml
               docs     index.html
               src/bin  ant
  Added:       docs     sql.html
  Log:
  Added documentation for the sql task. bootstrap.sh and ant complain if
  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>
  
  Revision  Changes    Path
  1.6       +2 -0      jakarta-ant/README
  
  Index: README
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/README,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- README	2000/01/27 03:47:58	1.5
  +++ README	2000/07/28 08:57:28	1.6
  @@ -53,6 +53,8 @@
     -------------
   
     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
  
  
  
  1.21      +13 -6     jakarta-ant/bootstrap.sh
  
  Index: bootstrap.sh
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/bootstrap.sh,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- bootstrap.sh	2000/07/24 15:52:50	1.20
  +++ bootstrap.sh	2000/07/28 08:57:28	1.21
  @@ -19,12 +19,19 @@
     CLASSPATH=$LOCALCLASSPATH
   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
   
   TOOLS=src/main/org/apache/tools
  
  
  
  1.48      +6 -1      jakarta-ant/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/build.xml,v
  retrieving revision 1.47
  retrieving revision 1.48
  diff -u -r1.47 -r1.48
  --- build.xml	2000/07/25 08:44:08	1.47
  +++ build.xml	2000/07/28 08:57:28	1.48
  @@ -268,6 +268,7 @@
     <!-- Run testcase                                                        -->
     <!-- =================================================================== -->
     <target name="runtests" depends="compiletests" if="junit.present">
  +
   <!--
       This would make the buildprocess fail if using an Ant version
       without the junit task
  @@ -280,7 +281,11 @@
           <pathelement path="${java.class.path}" />
         </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>
   -->
   
  
  
  
  1.58      +2 -1      jakarta-ant/docs/index.html
  
  Index: index.html
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/docs/index.html,v
  retrieving revision 1.57
  retrieving revision 1.58
  diff -u -r1.57 -r1.58
  --- index.html	2000/07/28 03:34:14	1.57
  +++ index.html	2000/07/28 08:57:29	1.58
  @@ -24,7 +24,7 @@
     <li>Dave Walend (<a href="mailto:dwalend@cs.tufts.edu">dwalend@cs.tufts.edu</a>)</li>
   </ul>
   
  -<p>Version 1.2 - 2000/07/27</p>
  +<p>Version 1.2 - 2000/07/28</p>
   
   <hr>
   <h2>Table of Contents</h2>
  @@ -585,6 +585,7 @@
     <li><a href="#taskdef">Taskdef</a></li>
     <li><a href="#touch">Touch</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="#unzip">Unjar</a></li>
     <li><a href="#untar">Untar</a></li>
  
  
  
  1.1                  jakarta-ant/docs/sql.html
  
  Index: sql.html
  ===================================================================
  <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>&lt;sql
      driver="org.database.jdbcDriver"
      url="jdbc:database-url"
      userid="sa"
      password="pass"
      src="data.sql"
  /&gt;
  </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>&lt;sql
      driver="org.database.jdbcDriver"
      url="jdbc:database-url"
      userid="sa"
      password="pass"
      &gt;
  insert
  into table some_table
  values(1,2,3,4);
  
  truncate table some_other_table;
  &lt;/sql&gt;
  </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>&lt;![CDATA[</code> ... <code>]]&gt;</code> sections
so you don't
  need to escape <code>&lt;</code>, <code>&gt;</code> <code>&amp;</code>
  or other special characters. For exampe:</p>
  
  <blockquote><pre>&lt;sql
      driver="org.database.jdbcDriver"
      url="jdbc:database-url"
      userid="sa"
      password="pass"
      &gt;&lt;![CDATA[
  
  update some_table set column1 = column1 + 1 where column2 &lt; 42;
  
  ]]&gt;&lt;/sql&gt;
  </pre></blockquote>
  
  
  </body>
  </html>
  
  
  
  1.4       +5 -0      jakarta-ant/src/bin/ant
  
  Index: ant
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/bin/ant,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ant	2000/07/13 15:23:48	1.3
  +++ ant	2000/07/28 08:57:29	1.4
  @@ -51,6 +51,11 @@
     if test -f $JAVA_HOME/lib/classes.zip ; then
       LOCALCLASSPATH=$LOCALCLASSPATH:$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
   
   $JAVACMD -classpath $LOCALCLASSPATH -Dant.home=${ANT_HOME} $ANT_OPTS org.apache.tools.ant.Main
$@
  
  
  

Mime
View raw message