jvanzyl     01/05/14 11:44:04

  Modified:    conf/torque build.xml
  Added:       conf/torque build.properties
  Removed:     conf/torque/config torque.props
  Log:
  - standardizing the torque build. cleaned everything up after
    discovering the stand-alone version of torque doesn't work.
  
  - using build.properties instead of torque.props. move to:
  
    build.sh
    build.bat
    build.properties
    build.xml
  
    which will eventually evolve to:
  
    build.properties
    build.xml
  
  - the torque stand-alone version now is truly stand-alone. the
    village jar has been added, and a 'compile' target has been
    added so that you can generate your OM and compile the class
    files with the stand-alone version.
  
  Revision  Changes    Path
  1.2       +44 -19    jakarta-turbine/conf/torque/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine/conf/torque/build.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- build.xml 2001/05/13 06:31:29     1.1
  +++ build.xml 2001/05/14 18:43:45     1.2
  @@ -1,10 +1,6 @@
   <project name="Torque" default="main" basedir=".">
   
     <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">
  @@ -14,13 +10,12 @@
     </path>
   
     <!--
  -       Load the torque properties file. All the targets use the
  -       information stored in the properties file. Edit the properties
  -       file! Not this build file!
  +       Load the build.properties file. All the targets use the
  +       information stored in the properties file. 
     -->
  -
  -  <property file="${torque.props}"/>
  -
  +  
  +  <property name="build.properties" value="build.properties"/>
  +  <property file="${build.properties}"/>
   
     <!-- ================================================================ -->
     <!-- M A I N  T A R G E T                                             -->
  @@ -100,10 +95,10 @@
       <echo message="| Woo hoo!                                      |"/>
       <echo message="|                                               |"/>
       <echo message="+-----------------------------------------------+"/>
  -    <echo message=" taking torque.props from: ${torque.props}"/>
  +    <echo message=" taking build.properties from: ${build.properties}"/>
   
       <torque-datasql
  -      contextProperties="${torque.props}"
  +      contextProperties="${build.properties}"
         controlTemplate="${DataSQLControlTemplate}"
         outputDirectory="${torque.home}/${outputDirectory}"
         templatePath="${templatePath}"
  @@ -129,10 +124,10 @@
       <echo message="| Woo hoo!                                      |"/>
       <echo message="|                                               |"/>
       <echo message="+-----------------------------------------------+"/>
  -    <echo message=" taking torque.props from: ${torque.props}"/>
  +    <echo message=" taking build.properties from: ${build.properties}"/>
   
       <torque-datadump
  -      contextProperties="${torque.props}"
  +      contextProperties="${build.properties}"
         controlTemplate="${DataDumpControlTemplate}"
         outputDirectory="${torque.home}/${outputDirectory}"
         templatePath="${templatePath}"
  @@ -159,7 +154,7 @@
       <echo message="+-----------------------------------------------+"/>
   
       <torque-datadtd
  -      contextProperties="${torque.props}"
  +      contextProperties="${build.properties}"
         controlTemplate="${DataDTDControlTemplate}"
         outputDirectory="${torque.home}/${outputDirectory}"
         templatePath="${templatePath}"
  @@ -188,9 +183,9 @@
       <echo message="+------------------------------------------+"/>
   
       <torque-sql
  -      contextProperties="${torque.props}"
  +      contextProperties="${build.properties}"
         controlTemplate="${SQLControlTemplate}"
  -      outputDirectory="${torque.home}/${outputDirectory}"
  +      outputDirectory="${torque.home}/${outputDirectory}/sql"
         templatePath="${templatePath}"
         outputFile="report.${project}.sql.generation"
         xmlFile="${torque.home}/${schemaDirectory}/${project}-schema.xml"
  @@ -217,9 +212,9 @@
       <echo message="+------------------------------------------+"/>
   
       <torque-om
  -      contextProperties="${torque.props}"
  +      contextProperties="${build.properties}"
         controlTemplate="${OMControlTemplate}"
  -      outputDirectory="${torque.home}/${outputDirectory}"
  +      outputDirectory="${torque.home}/${outputDirectory}/java"
         templatePath="${templatePath}"
         outputFile="report.${project}.om.generation"
         targetPackage="${targetPackage}.om"
  @@ -227,6 +222,36 @@
       />
     
     </target>
  +
  +  <!-- =================================================================== -->
  +  <!-- C O M P I L E  O M                                                  -->
  +  <!-- =================================================================== -->  
  +  <target name="compile">
  +    
  +    <!-- 
  +      This should be moved to the top of the file, and
  +      the values should come from the build.properties file.
  +    -->
  +    
  +    <property name="src.dir" value="${outputDirectory}/java"/>
  +    <property name="build.dest" value="bin/classes"/>
  +    <property name="debug" value="on"/>
  +    <property name="deprecation" value="off"/>
  +    <property name="optimize" value="off"/>
  +    
  +    <mkdir dir="${build.dest}"/>
  +    
  +    <javac srcdir="${src.dir}"
  +      destdir="${build.dest}"
  +      debug="${debug}"
  +      deprecation="${deprecation}"
  +      optimize="${optimize}">
  +            
  +      <classpath refid="classpath"/>
  +
  +    </javac>
  +  </target>
  +
   
     <!-- ================================================================ -->
     <!-- G E N E R A T E  T U R B I N E  S E R V I C E                    -->
  
  
  
  1.1                  jakarta-turbine/conf/torque/build.properties
  
  Index: build.properties
  ===================================================================
  # -------------------------------------------------------------------
  # 
  # T O R Q U E  C O N F I G U R A T I O N  F I L E
  # 
  # -------------------------------------------------------------------
  
  # -------------------------------------------------------------------
  # 
  #  T U R B I N E  P R O J E C T
  #
  # -------------------------------------------------------------------
  # This is the name of your Turbine project. Your generated sources
  # will be named using the project name selected below. If your
  # project=killerapp then you will have a generated:
  #
  # killerapp-schema.sql
  #
  # IMPORTANT!
  # This means that your project schema MUST be named
  # killerapp-schema.xml and it MUST be placed in the
  # schema directory for Torque to work property.
  #
  # The object model sources generated are independent of
  # the project name selected.
  # -------------------------------------------------------------------
  
  project=project
  
  # -------------------------------------------------------------------
  # 
  #  T A R G E T  D A T A B A S E
  #
  # -------------------------------------------------------------------
  # This is the target database, only considered when generating
  # the SQL for your Turbine project. Your possible choices are
  #
  # db2
  # hypersonic
  # mysql
  # oracle
  # postgresql
  # mssql
  #
  # Default: none
  # -------------------------------------------------------------------
  
  database=mysql
  
  # -------------------------------------------------------------------
  # 
  #  O B J E C T  M O D E L  I N F O R M A T I O N
  #
  # -------------------------------------------------------------------
  # These settings will allow you to customize the way your
  # Peer-based object model is created.
  # -------------------------------------------------------------------
  # addSaveMethod=true, adds tracking code to determine how to save an
  # object
  # set objectModelType=complex to generate an om with collection
  # support, (not tested - please help to debug)
  # -------------------------------------------------------------------
  
  extend=TurbineMapBuilder
  mapname=TurbineMap
  suffix=MapBuilder
  targetPackage=org.apache.turbine
  addSaveMethod=true
  addGetByNameMethod=true
  complexObjectModel=true
  basePrefix=Base
  
  # -------------------------------------------------------------------
  # 
  #  D A T A B A S E  S E T T I N G S
  #
  # -------------------------------------------------------------------
  # JDBC connection settings. This is used by the JDBCToXML task that
  # will create an XML database schema from JDBC metadata. These
  # settings are also used by the SQL Ant task to initialize your
  # Turbine system with the generated SQL.
  # -------------------------------------------------------------------
  
  databaseUrl = jdbc:mysql://127.0.0.1/turbine
  databaseDriver = org.gjt.mm.mysql.Driver
  databaseUser = user
  databasePassword = password
  databaseHost = 127.0.0.1
  
  # -------------------------------------------------------------------
  # You should NOT have to edit anything below here.
  # -------------------------------------------------------------------
  
  # -------------------------------------------------------------------
  # 
  #  C O N F I G U R A T I O N  D I R E C T O R Y
  #
  # -------------------------------------------------------------------
  # This is the directory that Torque looks in the find
  # its torque.props file.
  #
  # Default: none
  # -------------------------------------------------------------------
  
  configDir=./config
  
  # -------------------------------------------------------------------
  # 
  #  T E M P L A T E  P A T H
  #
  # -------------------------------------------------------------------
  
  templatePath = templates
  
  # -------------------------------------------------------------------
  # 
  #  C O N T R O L  T E M P L A T E S
  #
  # -------------------------------------------------------------------
  
  SQLControlTemplate = sql/base/Control.vm
  OMControlTemplate = om/Control.vm
  IntakeControlTemplate = intake/Control.vm
  ServiceControlTemplate = service/Control.vm
  idTableControlTemplate = sql/id-table/Control.vm
  DataDTDControlTemplate = data/Control.vm
  DataDumpControlTemplate = data/dump/Control.vm
  DataSQLControlTemplate = sql/load/Control.vm
  
  # -------------------------------------------------------------------
  # 
  #  O U T P U T  D I R E C T O R Y
  #
  # -------------------------------------------------------------------
  
  outputDirectory=src
  
  # -------------------------------------------------------------------
  # 
  #  S C H E M A  D I R E C T O R Y
  #
  # -------------------------------------------------------------------
  
  schemaDirectory=schema
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to