jvanzyl     01/09/20 23:49:00

  Modified:    .        build.properties build.xml
               src/tdk  build.properties build.xml
               src/tdk/apps/2 build.properties build.xml
               src/tdk/apps/3 build.properties build.xml
  Log:
  - bringing the 3.x builds in line with the 2.x builds
  
  - we allow allow the use of a profile to define what sample application
    is to be built. the profile will allow the following to be specified:
  
    turbine version
    servlet container
  
    the database specification is almost there and we will also allow
    the specification of the application name. the next step will
    be to allow the processing of a profile set where a profile set
    might consist of all turbine version/servlet container/database
    combinations. if this could be coupled with cactus than we could
    quickly test a running turbine application on all purportedly
    supported platforms to look for anomolies.
  
  Revision  Changes    Path
  1.13      +1 -1      jakarta-turbine-tdk/build.properties
  
  Index: build.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-tdk/build.properties,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- build.properties  2001/09/19 16:48:57     1.12
  +++ build.properties  2001/09/21 06:49:00     1.13
  @@ -12,7 +12,7 @@
   tdk.ancillary2.dir = ${tdk.share.dir}/ancillary/2
   tdk.ancillary3.dir = ${tdk.share.dir}/ancillary/3
   tdk.site = ${tdk.dist}/webapps/site
  -tdk.servlet.container = tomcat4
  +tdk.defaultProfile = t3-tc4-hsqldb
   
   # -------------------------------------------------------------------
   # T U R B I N E  P R O P E R T I E S
  
  
  
  1.17      +22 -3     jakarta-turbine-tdk/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-tdk/build.xml,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- build.xml 2001/09/21 02:11:50     1.16
  +++ build.xml 2001/09/21 06:49:00     1.17
  @@ -5,6 +5,7 @@
   
     <property file="${user.home}/build.properties" />
     <property file="build.properties" />
  +  <property file="profile/${tdk.defaultProfile}.profile"/>
     
     <!-- ================================================================== -->
     <!-- E N V I R O N M E N T                                              -->
  @@ -32,13 +33,27 @@
       <copy todir="${tdk.share.dir}">
         <fileset dir="${tdk.src}"/>
       </copy>        
  +    
  +    <!-- We want to substitue the turbine version from the
  +         specified profile. -->
  +    
  +    <filter token="TURBINE_VERSION" value="${tdk.turbineVersion}"/>
  +    
  +    <copy 
  +      todir="${tdk.share.dir}"
  +      file="${tdk.src}/build.properties"
  +      filtering="yes" 
  +      overwrite="yes"
  +    />
   
       <!-- We need to move the build files up one directory -->
       <move file="${tdk.share.dir}/build.properties" todir="${tdk.root.dir}"/>
       <move file="${tdk.share.dir}/build.xml" todir="${tdk.root.dir}"/>
       <move file="${tdk.share.dir}/GETTING_STARTED.txt" todir="${tdk.root.dir}"/>
  -
  -    <ant antfile="build-${tdk.servlet.container}.xml"/>
  +    
  +    <echo message="Servlet Container: ${tdk.servletContainer}"/>
  +    
  +    <ant antfile="build-${tdk.servletContainer}.xml"/>
       <ant antfile="build-libs.xml"/>
       <ant antfile="build-turbine2.xml"/>
       <ant antfile="build-turbine3.xml"/>
  @@ -54,7 +69,7 @@
       name="production-dist" 
       depends="docs,test-dist"
       description="--> generates the full TDK distribution">
  -    <ant antfile="build-${tdk.servlet.container}.xml" target="production-dist"/>
  +    <ant antfile="build-${tdk.servletContainer}.xml" target="production-dist"/>
     </target>
   
     <!-- =================================================================== -->
  @@ -100,6 +115,10 @@
         <property 
           name="build.properties" 
           value="${tdk.home}/webapps/newapp/WEB-INF/build/build.properties"
  +      />
  +      <property
  +        name="build.webappRoot"
  +        value="${tdk.home}/webapps/newapp"
         />
       </ant>
     </target>
  
  
  
  1.7       +2 -2      jakarta-turbine-tdk/src/tdk/build.properties
  
  Index: build.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-tdk/src/tdk/build.properties,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- build.properties  2001/09/17 21:27:49     1.6
  +++ build.properties  2001/09/21 06:49:00     1.7
  @@ -3,7 +3,7 @@
   # sample webapp. 
   # -------------------------------------------------------------------------
   
  -turbine.version = 2
  +tdk.turbineVersion = @TURBINE_VERSION@
   turbine.app = newapp
   target.package = org.mycompany.newapp
   target.directory = org/mycompany/newapp
  @@ -20,6 +20,6 @@
   # This is for external turbine app integration.
   # -------------------------------------------------------------------------
   
  -app.src = tdk/apps/${turbine.version}
  +app.src = tdk/apps/${tdk.turbineVersion}
   ancillary.dir = tdk/ancillary
   lib.dir = tdk/lib
  
  
  
  1.13      +6 -10     jakarta-turbine-tdk/src/tdk/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-tdk/src/tdk/build.xml,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- build.xml 2001/09/21 01:57:14     1.12
  +++ build.xml 2001/09/21 06:49:00     1.13
  @@ -190,8 +190,8 @@
     
       <copy todir="webapps/${turbine.app}/WEB-INF/lib">
         <fileset dir="${lib.dir}">
  -        <include name="turbine-${turbine.version}*.jar"/>
  -        <include name="flux-${turbine.version}*.jar"/>
  +        <include name="turbine-${tdk.turbineVersion}*.jar"/>
  +        <include name="flux-${tdk.turbineVersion}*.jar"/>
         </fileset>
       </copy>
     </target>
  @@ -213,7 +213,7 @@
       <filter token="BUILD_DEST" value="${build.dest}"/>
       <filter token="SRC_DIR" value="${src.dir}"/>
       <filter token="CONF_DIR" value="${conf.dir}"/>
  -    <filter token="TURBINE_VERSION" value="${turbine.version}"/>
  +    <filter token="TURBINE_VERSION" value="${tdk.turbineVersion}"/>
       
       <echo message="${app.home}"/>
       
  @@ -239,16 +239,12 @@
            tdk.home on the machine where the sample app was
            built and packaged. We obviously don't want this. -->
       
  -    <echo message="!!!!!!!!!!!!"/>
  -    
       <replace dir="${app.home}">
         <include name="**/build.properties"/>
         <replacetoken><![CDATA[@TDK_HOME@]]></replacetoken>
         <replacevalue><![CDATA[${tdk.home}]]></replacevalue>
       </replace>
   
  -    <echo message="!!!!!!!!!!!!"/>
  -
       <!-- Now we have to adjust the the location of the src files
            to correspond the specified package structure. -->
            
  @@ -299,9 +295,9 @@
   
       <property name="flux.modules" value="org.apache.turbine.flux.modules"/>
   
  -    <ant antfile="${ancillary.dir}/${turbine.version}/src/conf/build.xml" 
target="tr-props-without-db-values">
  -      <property name="conf.home" 
value="${ancillary.dir}/${turbine.version}/src/conf"/>
  -      <property name="master.home" 
value="${ancillary.dir}/${turbine.version}/src/conf/master"/>
  +    <ant antfile="${ancillary.dir}/${tdk.turbineVersion}/src/conf/build.xml" 
target="tr-props-without-db-values">
  +      <property name="conf.home" 
value="${ancillary.dir}/${tdk.turbineVersion}/src/conf"/>
  +      <property name="master.home" 
value="${ancillary.dir}/${tdk.turbineVersion}/src/conf/master"/>
         <property name="target.dir" value="${abs.conf.dir}"/>
         <property name="turbine.log" value="/logs/turbine.log"/>
         <property name="database.name" value="${turbine.app}"/>
  
  
  
  1.8       +11 -11    jakarta-turbine-tdk/src/tdk/apps/2/build.properties
  
  Index: build.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-tdk/src/tdk/apps/2/build.properties,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- build.properties  2001/09/21 01:57:14     1.7
  +++ build.properties  2001/09/21 06:49:00     1.8
  @@ -4,22 +4,22 @@
   # 
   # -------------------------------------------------------------------
   
  -turbine.version=@TURBINE_VERSION@
  -project=@PROJECT@
  +tdk.turbineVersion = 2
  +project = @PROJECT@
   turbine.app = @PROJECT@
   app.root = ../@PROJECT@
  -build.webappRoot = @TDK_HOME@/webapps/${turbine.app}
  +build.webappRoot = ${tdk.home}/webapps/${turbine.app}
   target.package = @TARGET_PACKAGE@
   target.directory = @TARGET_DIRECTORY@
   build.dest = ${build.webappRoot}/WEB-INF/classes
  -version=0.1
  -src.dir=@SRC_DIR@
  -conf.dir=@CONF_DIR@
  -master.conf.dir=@TDK_HOME@/tdk/ancillary/${turbine.version}/src/conf
  -templatePath=${master.conf.dir}/torque/templates
  -debug=on
  -optimize=off
  -deprecation=on
  +version = 0.1
  +src.dir = @SRC_DIR@
  +conf.dir = @CONF_DIR@
  +master.conf.dir = @TDK_HOME@/tdk/ancillary/${tdk.turbineVersion}/src/conf
  +templatePath = ${master.conf.dir}/torque/templates
  +debug = on
  +optimize = off
  +deprecation = on
   
   # -------------------------------------------------------------------
   # 
  
  
  
  1.15      +1 -1      jakarta-turbine-tdk/src/tdk/apps/2/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-tdk/src/tdk/apps/2/build.xml,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- build.xml 2001/09/21 02:19:20     1.14
  +++ build.xml 2001/09/21 06:49:00     1.15
  @@ -3,7 +3,7 @@
   <project name="peer" default="compile" basedir=".">
   
     <property file="${user.home}/build.properties"/>
  -  <property file="build.properties"/>
  +  <property file="${build.properties}"/>
     
     <!-- This value is currently set as a property because
          the top level tdk build.xml file runs the "init" target
  
  
  
  1.6       +10 -11    jakarta-turbine-tdk/src/tdk/apps/3/build.properties
  
  Index: build.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-tdk/src/tdk/apps/3/build.properties,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- build.properties  2001/09/21 01:57:15     1.5
  +++ build.properties  2001/09/21 06:49:00     1.6
  @@ -4,19 +4,18 @@
   # 
   # -------------------------------------------------------------------
   
  -turbine.version=@TURBINE_VERSION@
  -tdk.home=@TDK_HOME@
  +tdk.turbineVersion = 3
   project=@PROJECT@
   turbine.app = @PROJECT@
   app.root = ../@PROJECT@
  -webappRoot = ${tdk.home}/webapps/${turbine.app}
  +build.webappRoot = ${tdk.home}/webapps/${turbine.app}
   target.package = @TARGET_PACKAGE@
   target.directory = @TARGET_DIRECTORY@
  -build.dest = ${webappRoot}/WEB-INF/classes
  +build.dest = ${build.webappRoot}/WEB-INF/classes
   version=0.1
   src.dir=@SRC_DIR@
   conf.dir=@CONF_DIR@
  -master.conf.dir=${tdk.home}/tdk/ancillary/${turbine.version}/src/conf
  +master.conf.dir=@TDK_HOME@/tdk/ancillary/${tdk.turbineVersion}/src/conf
   templatePath=${master.conf.dir}/torque/templates
   debug=on
   optimize=off
  @@ -28,12 +27,12 @@
   #
   # -------------------------------------------------------------------
   
  -database=mysql
  -#database.manual.creation = true
  -databaseUrl = jdbc:mysql://127.0.0.1/newapp
  -databaseDriver = org.gjt.mm.mysql.Driver
  -databaseUser = user
  -databasePassword = password
  +database=hypersonic
  +databaseUrl = jdbc:hsqldb:${webappRoot}/WEB-INF/db/@PROJECT@
  +build.databaseUrl = jdbc:hsqldb:${build.webappRoot}/WEB-INF/db/@PROJECT@
  +databaseDriver = org.hsqldb.jdbcDriver
  +databaseUser = sa
  +databasePassword = 
   databaseHost = 127.0.0.1
   
   # -------------------------------------------------------------------
  
  
  
  1.10      +20 -6     jakarta-turbine-tdk/src/tdk/apps/3/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-tdk/src/tdk/apps/3/build.xml,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- build.xml 2001/09/19 01:54:42     1.9
  +++ build.xml 2001/09/21 06:49:00     1.10
  @@ -4,7 +4,15 @@
   
     <property file="${user.home}/build.properties"/>
     <property file="build.properties"/>
  -  
  +
  +  <!-- This value is currently set as a property because
  +       the top level tdk build.xml file runs the "init" target
  +       as part of testing and texen doesn't obey the ${basedir}
  +       property so we must pass in the full path to the
  +       build.properties for use with the contextProperties attribute.
  +  -->
  +  <property name="build.properties" value="build.properties"/>
  +
     <!-- Build classpath -->
     <path id="classpath">
       <fileset dir="${tdk.home}/webapps/${project}/WEB-INF/lib">
  @@ -178,7 +186,7 @@
       <echo message="+------------------------------------------+"/>
   
       <torque-sql
  -      contextProperties="build.properties"
  +      contextProperties="${build.properties}"
         controlTemplate="${SQLControlTemplate}"
         outputDirectory="${src.dir}/sql"
         useClasspath="true"
  @@ -207,7 +215,7 @@
       <echo message="+------------------------------------------+"/>
   
       <torque-om
  -      contextProperties="build.properties"
  +      contextProperties="${build.properties}"
         controlTemplate="${OMControlTemplate}"
         outputDirectory="${src.dir}/java"
         useClasspath="true"
  @@ -400,12 +408,18 @@
     </target>
   
     <!-- ================================================================ -->
  -  <!-- INSERT SINGLE SQL FILE                                           -->
  +  <!-- I N S E R T  S I N G L E  S Q L  F I L E                         -->
     <!-- ================================================================ -->
  -  <target name="insert-sql-file">
  +
  +  <target name="setDatabaseUrl" if="build.databaseUrl">
  +    <property name="sqlInsert.databaseUrl" value="${build.databaseUrl}"/>
  +  </target>
  +  
  +  <target name="insert-sql-file" depends="setDatabaseUrl">
  +    <property name="sqlInsert.databaseUrl" value="${databaseUrl}"/>
       <sql
         driver="${databaseDriver}"
  -      url="${databaseUrl}"
  +      url="${sqlInsert.databaseUrl}"
         userid="${databaseUser}"
         password="${databasePassword}"
         src="${sqlFile}"
  
  
  

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

Reply via email to