You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by pr...@apache.org on 2002/10/05 03:16:45 UTC

cvs commit: jakarta-commons-sandbox/periodicity/conf/build build.db.properties

prickett    2002/10/04 18:16:45

  Modified:    periodicity build-legacy.xml maven.xml project.xml
               periodicity/conf/build build.db.properties
  Log:
  Changed torque.dir to torque.home in the build-legacy.xml file
  
  Added a create-db task to the build-legacy.xml file
  
  Removed all property definitions from xml files and distributed them to
  property files.
  
  Moved declaration of property files to maven.xml
  
  Reworked the db properties file to be more sophisticated
  
  Revision  Changes    Path
  1.5       +38 -2     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.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- build-legacy.xml	4 Oct 2002 16:11:34 -0000	1.4
  +++ build-legacy.xml	5 Oct 2002 01:16:45 -0000	1.5
  @@ -6,13 +6,49 @@
       </fileset>  
     </path>
   
  +  <taskdef
  +    name="torque-data-model"
  +    classpathref="classpath"
  +    classname="org.apache.torque.task.TorqueDataModelTask"/>
  +
     <target name="extract-torque-files">
  -    <mkdir dir="${torque.dir}"/>
  -    <unjar src="${torque.jar}" dest="${torque.dir}"/>
  +    <mkdir dir="${torque.home}"/>
  +    <unjar src="${torque.jar}" dest="${torque.home}"/>
     </target>  
     
     <target name="om" depends="extract-torque-files">
       <ant antfile="build-torque.xml" target="om"/>
  +  </target>  
  +
  +  <target name="create-db">  
  +    <torque-data-model
  +      controlTemplate="${torque.template.sqlDbInit}"
  +      outputDirectory="${torque.sql.dir}"
  +      outputFile="create-db.sql"
  +      targetDatabase="${torque.database}"
  +      templatePath="${torque.templatePath}"
  +      useClasspath="${torque.useClasspath}">
  +      <fileset dir="${torque.schema.dir}"
  +        includes="${torque.schema.create-db.includes}"
  +        excludes="${torque.schema.create-db.excludes}"
  +      />
  +    </torque-data-model>
  +
  +    <echo>
  +      Executing the create-db.sql script ...
  +    </echo>
  +
  +    <sql
  +      autocommit="true"
  +      driver="${periodicity.database.driver}"
  +      onerror="continue"
  +      password="${periodicity.database.password}"
  +      src="${torque.sql.dir}/create-db.sql"
  +      url="${periodicity.database.createUrl}"
  +      userid="${periodicity.database.user}">
  +      <classpath refid="classpath"/>
  +    </sql>
  +
     </target>  
   
   </project>  
  
  
  
  1.4       +15 -7     jakarta-commons-sandbox/periodicity/maven.xml
  
  Index: maven.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/periodicity/maven.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- maven.xml	4 Oct 2002 16:11:34 -0000	1.3
  +++ maven.xml	5 Oct 2002 01:16:45 -0000	1.4
  @@ -1,19 +1,27 @@
   <?xml version="1.0" encoding="UTF-8"?>
  -<project default="java:jar">
  +<project default="java:jar"
  +         xmlns:j="jelly:core">
   
  -  <property file="./conf/build/build.om.properties"/>
  -  <property file="./conf/build/build.db.properties"/>
  +  <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"/>
  +  
  +  
  +  
     <preGoal name="java:compile">
  -    <ant antfile="build-legacy.xml"
  -         target="om"/>
  +    <ant antfile="build-legacy.xml" target="om"/>
     </preGoal>
   
     <goal name="sql">
       <ant antfile="build-torque.xml" target="sql"/>
     </goal>  
  -  
  +
  +  <goal name="create-db">  
  +    <ant antfile="build-legacy.xml" target="create-db"/>
  +  </goal>  
  +
   </project>  
     
   
  
  
  
  1.4       +3 -1      jakarta-commons-sandbox/periodicity/project.xml
  
  Index: project.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/periodicity/project.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- project.xml	3 Oct 2002 21:39:41 -0000	1.3
  +++ project.xml	5 Oct 2002 01:16:45 -0000	1.4
  @@ -1,6 +1,8 @@
   <?xml version="1.0" encoding="UTF-8"?>
   <project>
  -  <pomVersion>0</pomVersion>
  +
  +
  +  <pomVersion>3</pomVersion>
     <name>Periodicity</name>
     <id>periodicity</id>
     <currentVersion>0.0.1-dev</currentVersion>
  
  
  
  1.3       +9 -3      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.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- build.db.properties	13 May 2002 06:07:08 -0000	1.2
  +++ build.db.properties	5 Oct 2002 01:16:45 -0000	1.3
  @@ -5,15 +5,21 @@
   # -------------------------------------------------------------------
   
   
  +
   # -------------------------------------------------------------------
   #
   #  M Y S Q L  D A T A B A S E  S E T T I N G S
   #
   # -------------------------------------------------------------------
   
  -mysql.createDatabaseUrl=jdbc:mysql://${databaseHost}/mysql
  -mysql.databaseUrl=jdbc:mysql://${databaseHost}/periodicity
  -mysql.databaseDriver=org.gjt.mm.mysql.Driver
  +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.admin.url=${periodicity.mysql.url.scheme}://${periodicity.database.host}/${periodicity.mysql.admin.path}
  +
  +periodicity.mysql.admin.url=${periodicity.mysql.url.scheme}://${periodicity.database.host}:${periodicity.database.port}/${torque.project}
   
   # -------------------------------------------------------------------
   # 
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>