commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From prick...@apache.org
Subject cvs commit: jakarta-commons-sandbox/periodicity/conf/build build.db.properties
Date Sat, 05 Oct 2002 21:56:10 GMT
prickett    2002/10/05 14:56:09

  Modified:    periodicity build-legacy.xml maven.xml
               periodicity/conf/build build.db.properties
  Log:
  Added Jelly processing to define a set of derived properties for the database
  goals
  
  Revision  Changes    Path
  1.6       +9 -1      jakarta-commons-sandbox/periodicity/build-legacy.xml
  
  Index: build-legacy.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/periodicity/build-legacy.xml,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- build-legacy.xml	5 Oct 2002 01:16:45 -0000	1.5
  +++ build-legacy.xml	5 Oct 2002 21:56:09 -0000	1.6
  @@ -1,4 +1,6 @@
  -<project name="Periodicity" default="core" basedir=".">
  +<?xml version="1.0"?>
  +<project name="Periodicity" default="om" basedir=".">
  +
   
     <path id="classpath">
       <fileset dir="${maven.home}/repository">
  @@ -50,5 +52,11 @@
       </sql>
   
     </target>  
  +
  +  <target name="test-for-echo">
  +    <echo>periodicity.database.port = '${periodicity.database.port}'</echo>
  +    <echo>periodicity.postgresql.db.name = '${periodicity.postgresql.db.name}'</echo>
  +  </target>  
  +
   
   </project>  
  
  
  
  1.5       +35 -5     jakarta-commons-sandbox/periodicity/maven.xml
  
  Index: maven.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/periodicity/maven.xml,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- maven.xml	5 Oct 2002 01:16:45 -0000	1.4
  +++ maven.xml	5 Oct 2002 21:56:09 -0000	1.5
  @@ -1,18 +1,48 @@
   <?xml version="1.0" encoding="UTF-8"?>
  -<project default="java:jar"
  -         xmlns:j="jelly:core">
  +<project default="java:jar" xmlns:j="jelly:core">
   
     <property file="./conf/build/build.properties"/>
     <property file="./conf/build/build.jars.properties"/>
     <property file="./conf/build/build.torque.properties"/>
     <property file="./conf/build/build.torque.default.properties"/>
     <property file="./conf/build/build.torque.period.properties"/>
  -  
  -  
  -  
  +  <property file="./conf/build/build.db.properties"/>
  +
  +  <j:set var="periodicityDatabase" value="${periodicity.database}"/>
  +
  +  <j:choose>
  +    <j:when test="${periodicityDatabase == 'mysql'}">
  +      <property name="derived.db.url.scheme"
  +                value="${periodicity.mysql.url.scheme}"/>
  +      <property name="derived.db.admin.path"
  +                value="${periodicity.mysql.admin.path}"/>
  +      <property name="derived.db.default.port"
  +                value="${periodicity.mysql.default.port}"/>
  +      <property name="derived.db.driver" 
  +                value="${periodicity.mysql.driver}"/>
  +    </j:when>
  +    <j:when test="${periodicityDatabase == 'postgresql'}">
  +      <property name="derived.db.url.scheme"
  +                value="${periodicity.postgresql.url.scheme}"/>
  +      <property name="derived.db.admin.path"
  +                value="${periodicity.postgresql.admin.path}"/>
  +      <property name="derived.db.default.port"
  +                value="${periodicity.postgresql.default.port}"/>
  +      <property name="derived.db.driver" 
  +                value="${periodicity.postgresql.driver}"/>
  +    </j:when>
  +  </j:choose>  
  +
     <preGoal name="java:compile">
       <ant antfile="build-legacy.xml" target="om"/>
     </preGoal>
  +
  +  <goal name="view-derived-properties">
  +    <echo>derived.db.url.scheme="${derived.db.url.scheme}"</echo>
  +    <echo>derived.db.admin.path="${derived.db.admin.path}"</echo>
  +    <echo>derived.db.default.port="${derived.db.default.port}"</echo>
  +    <echo>derived.db.driver="${derived.db.driver}"</echo>
  +  </goal>  
   
     <goal name="sql">
       <ant antfile="build-torque.xml" target="sql"/>
  
  
  
  1.4       +9 -2      jakarta-commons-sandbox/periodicity/conf/build/build.db.properties
  
  Index: build.db.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/periodicity/conf/build/build.db.properties,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- build.db.properties	5 Oct 2002 01:16:45 -0000	1.3
  +++ build.db.properties	5 Oct 2002 21:56:09 -0000	1.4
  @@ -4,7 +4,7 @@
   # 
   # -------------------------------------------------------------------
   
  -
  +periodicity.database.port
   
   # -------------------------------------------------------------------
   #
  @@ -12,10 +12,11 @@
   #
   # -------------------------------------------------------------------
   
  +periodicity.mysql.db.name=mysql
   periodicity.mysql.url.scheme=jdbc:mysql
   periodicity.mysql.admin.path=mysql
   periodicity.mysql.default.port=
  -periodicity.mysql.databaseDriver=org.gjt.mm.mysql.Driver
  +periodicity.mysql.driver=org.gjt.mm.mysql.Driver
   
   periodicity.mysql.admin.url=${periodicity.mysql.url.scheme}://${periodicity.database.host}/${periodicity.mysql.admin.path}
   
  @@ -26,6 +27,12 @@
   # P O S T G R E S Q L  D A T A B A S E  S E T T I N G S
   #
   # -------------------------------------------------------------------
  +
  +periodicity.postgresql.db.name=postgresql
  +periodicity.postgresql.url.scheme=jdbc:postgresql
  +periodicity.postgresql.admin.path=template1
  +periodicity.postgresql.default.port=5432
  +periodicity.postgresql.driver=org.postgresql.Driver
   
   postgresql.createDatabaseUrl=jdbc:postgresql://${databaseHost}:5432/template1
   postgresql.databaseUrl=jdbc:postgresql://${databaseHost}:5432/periodicity
  
  
  

--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message