You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by jm...@apache.org on 2001/03/03 00:33:42 UTC

cvs commit: jakarta-turbine/conf/torque torque.xml

jmcnally    01/03/02 15:33:42

  Modified:    build    build-torque.xml
               conf/torque torque.xml
  Log:
  taskdefs needed classpath definition in order to be called from other build.xml
  files.  This could not be achieved with them at the global level, so they
  were moved into a target that is a prerequisite for the other targets now.
  
  I added the TurbineDB class to the torque jar, so that the full turbine jar
  does not need to be located in torque's lib directory.  It's possible
  other classes may be needed.  If the problem is still present for some
  schemas the additional classes can be added to torque.jar or we can just
  use turbine.jar, but there should not be a reason to have both.
  
  Revision  Changes    Path
  1.7       +6 -7      jakarta-turbine/build/build-torque.xml
  
  Index: build-torque.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine/build/build-torque.xml,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- build-torque.xml	2001/02/15 16:46:52	1.6
  +++ build-torque.xml	2001/03/02 23:33:41	1.7
  @@ -25,9 +25,6 @@
           <include name="xerces-*.jar"/>
           <include name="velocity-*.jar"/>
         </fileset>
  -      <fileset dir="../bin">
  -        <include name="turbine-*.jar"/>
  -      </fileset>
       </copy>
   
   
  @@ -43,10 +40,12 @@
         <fileset dir="../conf/torque"/>
       </copy>
   
  -    <jar jarfile="${torque.dir}/lib/torque.jar"
  -      basedir="${build.dest}"
  -      includes="org/apache/turbine/torque/**"
  -    />
  +    <jar jarfile="${torque.dir}/lib/torque.jar" basedir="${build.dest}">
  +      <fileset dir="${build.dest}/org/apache/turbine/">
  +        <include name="torque/**"/>
  +        <include name="services/db/TurbineDB.class"/>
  +      </fileset>
  +    </jar>
           
       <!-- fix permissions -->
       <chmod dir="${torque.dir}" perm="ugo+rx" includes="**/*.sh" />
  
  
  
  1.17      +55 -15    jakarta-turbine/conf/torque/torque.xml
  
  Index: torque.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine/conf/torque/torque.xml,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- torque.xml	2001/02/28 23:57:41	1.16
  +++ torque.xml	2001/03/02 23:33:41	1.17
  @@ -1,15 +1,18 @@
   <project name="Torque" default="main" basedir=".">
   
  -  <taskdef name="torque-sql" classname="org.apache.turbine.torque.TorqueSQLTask"/>
  -  <taskdef name="torque-om" classname="org.apache.turbine.torque.TorqueObjectModelTask"/>
  -  <taskdef name="torque-intake" classname="org.apache.turbine.torque.TorqueIntakeTask"/>
  -  <taskdef name="sql-xml" classname="org.apache.turbine.torque.TorqueSQLTransformTask"/>
  -  <taskdef name="texen" classname="org.apache.velocity.texen.ant.TexenTask"/>
  -
     <property name="torque.home" value="@TORQUE_HOME@"/>
  +  <property name="torque.dir" value="torque.home"/>
     <property name="torque.config" value="${torque.home}/config"/>
     <property name="torque.props" value="${torque.config}/torque.props"/>
     <property name="torque.macros" value="${torque.config}/torque.macros"/>
  +
  +    <!-- Build classpath -->
  +    <path id="classpath">
  +        <fileset dir="lib">
  +            <include name="**/*.jar"/>
  +        </fileset>
  +    </path>
  +
     
     <!-- 
          Load the torque properties file. All the targets use the
  @@ -34,7 +37,38 @@
       <antcall target="project-om"/>
     </target>
   
  +
     <!-- ================================================================ -->
  +  <!-- I N I T  T A S K  T A R G E T                                    -->
  +  <!-- ================================================================ -->
  +  <!-- Taskdefs are defined inside this target as Ant seems to have     -->
  +  <!-- problems defining them at the top level.                         -->
  +  <!-- ================================================================ -->
  +
  +  <target name="init-tasks">
  +    <taskdef name="torque-sql" 
  +           classname="org.apache.turbine.torque.TorqueSQLTask">
  +        <classpath refid="classpath"/>
  +    </taskdef>
  +    <taskdef name="torque-om" 
  +           classname="org.apache.turbine.torque.TorqueObjectModelTask">
  +        <classpath refid="classpath"/>
  +    </taskdef>
  +    <taskdef name="torque-intake" 
  +           classname="org.apache.turbine.torque.TorqueIntakeTask">
  +        <classpath refid="classpath"/>
  +    </taskdef>
  +    <taskdef name="sql-xml" 
  +           classname="org.apache.turbine.torque.TorqueSQLTransformTask">
  +        <classpath refid="classpath"/>
  +    </taskdef>
  +    <taskdef name="texen" classname="org.apache.velocity.texen.ant.TexenTask">
  +        <classpath refid="classpath"/>
  +    </taskdef>
  +  </target>
  +
  +
  +  <!-- ================================================================ -->
     <!-- G E N E R A T E  P R O J E C T  S Q L                            -->
     <!-- ================================================================ -->
     <!-- Generate the SQL for your project, these are in addition         -->
  @@ -42,7 +76,7 @@
     <!-- project should be specified in project-schema.xml.               -->
     <!-- ================================================================ -->
   
  -  <target name="project-sql">
  +  <target name="project-sql" depends="init-tasks">
   
       <echo message="+------------------------------------------+"/>
       <echo message="|                                          |"/>
  @@ -51,13 +85,15 @@
       <echo message="|                                          |"/>
       <echo message="+------------------------------------------+"/>
   
  +    <property name="xmlFile" 
  +        value="${torque.home}/${schemaDirectory}/${project}-schema.xml"/>
       <torque-sql
         contextProperties="${torque.props}"
         controlTemplate="${SQLControlTemplate}"
         outputDirectory="${outputDirectory}"
         templatePath="${templatePath}"
         outputFile="report.${project}.sql.generation"
  -      xmlFile="${schemaDirectory}/${project}-schema.xml"
  +      xmlFile="${xmlFile}"
         targetDatabase="${database}"
       />
   
  @@ -71,7 +107,7 @@
     <!-- ================================================================ -->
   
   
  -  <target name="project-om">
  +  <target name="project-om" depends="init-tasks">
   
       <echo message="+------------------------------------------+"/>
       <echo message="|                                          |"/>
  @@ -79,11 +115,12 @@
       <echo message="| YOUR Turbine project! Woo hoo!           |"/>
       <echo message="|                                          |"/>
       <echo message="+------------------------------------------+"/>
  -
   
  +    <property name="xmlFile" 
  +              value="${schemaDirectory}/${project}-schema.xml"/>
       <torque-om
         contextProperties="${torque.props}"
  -      xmlFile="${schemaDirectory}/${project}-schema.xml"
  +      xmlFile="${xmlFile}"
         controlTemplate="${OMControlTemplate}"
         outputDirectory="${outputDirectory}"
         templatePath="${templatePath}"
  @@ -92,6 +129,7 @@
         addSaveMethod="${addSaveMethod}"
         addGetByNameMethod="${addGetByNameMethod}"
         objectModelType="${objectModelType}"
  +      basePrefix="${basePrefix}"
       />
     
     </target>
  @@ -103,7 +141,7 @@
     <!-- These are in addition to the base Turbine OM!                    -->
     <!-- ================================================================ -->
   
  -  <target name="project-inputs">
  +  <target name="project-inputs" depends="init-tasks">
   
       <echo message="+------------------------------------------+"/>
       <echo message="|                                          |"/>
  @@ -112,9 +150,10 @@
       <echo message="|                                          |"/>
       <echo message="+------------------------------------------+"/>
   
  +    <property name="xmlFile" value="${xmlDirectory}/${project}-intake.xml"/>
       <torque-intake
         contextProperties="${torque.props}"
  -      xmlFile="${xmlDirectory}/${project}-intake.xml"
  +      xmlFile="${xmlFile}"
         controlTemplate="${IntakeControlTemplate}"
         outputDirectory="${outputDirectory}"
         templatePath="${templatePath}"
  @@ -132,7 +171,7 @@
     <!-- Generate turbine service code.                                   -->
     <!-- ================================================================ -->
     
  -  <target name="turbine-service">
  +  <target name="turbine-service" depends="init-tasks">
     
       <texen 
         contextProperties="service.props"
  @@ -152,7 +191,7 @@
     <!-- outputFile: The file where the xml schema will be written           -->
     <!-- =================================================================== -->
   
  -  <target name="sql2xml">
  +  <target name="sql2xml" depends="init-tasks">
       <sql-xml
         inputFile="schema/schema.sql"
         outputFile="schema/schema.xml"
  @@ -160,3 +199,4 @@
     </target>
   
   </project>
  +