You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by jv...@apache.org on 2001/07/19 05:26:20 UTC

cvs commit: jakarta-turbine-torque/build build.properties build.xml

jvanzyl     01/07/18 20:26:20

  Modified:    build    build.properties build.xml
  Added:       .        README.txt
  Log:
  - added a simple README.txt
  - the following properties must now be specified in order
    to build and create the Torque distribution:
  
    velocity.jar
    xerces.jar
    village.jar
  
    you can either set these properties in the supplied build.properties
    file or in your ${user.home}/build.properties file.
  
    there is also a property dectection system that will let you
    know exactly which requirements are missing.
  
  Revision  Changes    Path
  1.1                  jakarta-turbine-torque/README.txt
  
  Index: README.txt
  ===================================================================
  --------------------------------------------------------------------------
  T O R Q U E
  --------------------------------------------------------------------------
  
  Torque is an Object/Relational persistence layer.
  
  bin/        Temporary directory for building the project.
  build/      Location of Ant build.xml and build.properties files.
  examples/   Example XML Torque schemas that are part of the distribution.
  src/        Location of Java sources and Torque templates.
  xdocs/      Torque documention in Anakia formatted tags.
  
  --------------------------------------------------------------------------
  B U I L D I N G
  --------------------------------------------------------------------------
  
  In order to build Torque you must must set the following properties in
  either your ${user.home}/build.properties file, or the build.properties
  file provided in the Torque build/ directory:
  
  velocity.jar
  xerces.jar
  village.jar
  
  Torque uses Velocity to generate the OM sources, and Torque
  XML schema parsing requires Xerces. We will soon move to using
  the Digester to parse the XML schema, and at that point any
  SAX parser will be sufficient.
  
  Village is required to build the distribution. Village isn't
  needed for building, but the generated classes are dependent
  on Village.
  
  
  
  1.2       +7 -0      jakarta-turbine-torque/build/build.properties
  
  Index: build.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-torque/build/build.properties,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- build.properties	2001/07/18 12:54:20	1.1
  +++ build.properties	2001/07/19 03:26:20	1.2
  @@ -21,3 +21,10 @@
   optimize = off
   deprecation = off
   jdom.jar = jdom-b6.jar
  +
  +# You must set these values here, or in your
  +# ${user.home}/build.properties file in order
  +# to build Torque:
  +#velocity.jar = 
  +#xerces.jar = 
  +#village.jar =
  
  
  
  1.2       +106 -38   jakarta-turbine-torque/build/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-torque/build/build.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- build.xml	2001/07/18 12:54:20	1.1
  +++ build.xml	2001/07/19 03:26:20	1.2
  @@ -4,12 +4,12 @@
   
   <project name="Torque" default="jar" basedir=".">
   
  -  <!-- Set default values for the build -->
  -  <property file="build.properties" />
  -
     <!-- Allow any user specific values to override the defaults -->
     <property file="${user.home}/build.properties" />
   
  +  <!-- Set default values for the build -->
  +  <property file="build.properties" />
  +
     <property name="build.src" value="${build.dir}/src"/>
     <property name="build.dest" value="${build.dir}/classes"/>
     <property name="src.java.dir" value="${src.dir}/java"/>
  @@ -18,34 +18,113 @@
     <property name="final.name" value="${project}-${version}"/>
     <property name="final.dir" value="../${final.name}/"/>
   
  +  <!-- Construct compile classpath -->
  +  <path id="classpath">
  +    <pathelement location="${xerces.jar}"/>
  +    <pathelement location="${velocity.jar}"/>
  +    <pathelement location="${village.jar}"/>
  +  </path>
  +
     <!-- ================================================================== -->
  -  <!-- Prints useful build environment values                             -->
  +  <!-- E N V I R O N M E N T                                             -->
     <!-- ================================================================== -->
     
     <target name="env">
  -    
       <echo message="java.home = ${java.home}"/>
       <echo message="user.home = ${user.home}"/>
  -    <echo message="java.class.path = ${java.class.path}"/>
  +    <echo message="velocity.jar = ${velocity.jar}"/>
  +    <echo message="xerces.jar = ${xerces.jar}"/>
       <echo message=""/>
  -  
     </target>
   
     <!-- ================================================================== -->
  -  <!-- Help on usage                                                      -->
  +  <!-- U S A G E                                                          -->
     <!-- ================================================================== -->
     
     <target name="usage">
  -    
       <echo message="use -projecthelp to see the available targets"/>
  -  
  +  </target>
  +
  +  <!-- ================================================================== -->
  +  <!-- I N I T                                                            -->
  +  <!-- ================================================================== -->
  +
  +  <target name="init">
  +    <available 
  +      classname="org.apache.velocity.anakia.AnakiaTask"
  +      property="AnakiaTask.present"
  +      classpathref="classpath"
  +    />
  +    
  +    <available 
  +      classname="org.apache.velocity.runtime.Runtime"
  +      property="velocity.present"
  +      classpathref="classpath"
  +    />
  +    
  +    <available 
  +      classname="org.apache.xerces.parsers.SAXParser"
  +      property="xerces.present"
  +      classpathref="classpath"
  +    />
  +
  +    <available 
  +      classname="com.workingdogs.village.Column"
  +      property="village.present"
  +      classpathref="classpath"
  +    />
     </target>
   
     <!-- ================================================================== -->
  -  <!-- Prepares the build directory                                       -->
  +  <!-- P R O P E R T Y  C H E C K S  A N D  W A R N I N G S               -->
     <!-- ================================================================== -->
  +
  +  <target name="check.velocity" unless="velocity.present">
  +    <antcall target="property-warning">
  +      <param name="name" value="velocity.jar"/>
  +      <param name="value" value="${velocity.jar}"/>
  +    </antcall>
  +  </target>
  +
  +  <target name="check.xerces" unless="xerces.present">
  +    <antcall target="property-warning">
  +      <param name="name" value="xerces.jar"/>
  +      <param name="value" value="${xerces.jar}"/>
  +    </antcall>
  +  </target>
  +
  +  <target name="check.village" unless="village.present">
  +    <antcall target="property-warning">
  +      <param name="name" value="village.jar"/>
  +      <param name="value" value="${village.jar}"/>
  +    </antcall>
  +  </target>
  +
  +  <target name="property-warning">
  +    <echo>
  +      +----------------------------------------------------------------+
  +      + F A I L E D  R E Q U I R E M E N T                             |
  +      +----------------------------------------------------------------+
  +      | You must define the following property in order                |
  +      | to build Torque:                                               |
  +      |                                                                |
  +      | ${name} 
  +      |                                                                |
  +      | You can set this property in the provided build.properties     |
  +      | file, or you may set this property in your                     |
  +      | ${user.home}/build.properties file.                            
  +      +----------------------------------------------------------------+
  +    </echo>
  +    <fail message="Failed Requirement"/>
  +  </target>
  +
  +  <!-- ================================================================== -->
  +  <!-- P R E P A R E                                                      -->
  +  <!-- ================================================================== -->
     
  -  <target name="prepare" depends="env">
  +  <target name="prepare" 
  +    depends="init,check.velocity,check.xerces,env">
  +    
       <mkdir dir="${build.dir}"/>
       <mkdir dir="${build.dest}"/>
       <mkdir dir="${build.src}"/>
  @@ -55,31 +134,25 @@
       <copy todir="${build.src}/org" filtering="yes">
         <fileset dir="${src.java.dir}/org"/>
       </copy>
  -        
  -    <available classname="org.apache.velocity.anakia.AnakiaTask"
  -      property="AnakiaTask.present"/>
  -    
     </target>
   
     <!-- ================================================================== -->
  -  <!-- Compiles the source directory                                      -->
  +  <!-- C O M P I L E                                                      -->
     <!-- ================================================================== -->
     
  -  <target name="compile" depends="prepare"
  -          description="--> compiles the source code">
  -        
  +  <target name="compile" depends="prepare" description="--> compiles the source code">
       <javac srcdir="${build.src}"
         destdir="${build.dest}"
         excludes="**/package.html"
         debug="${debug}"
         deprecation="${deprecation}"
         optimize="${optimize}">
  +      <classpath refid="classpath"/>
       </javac>
  -
     </target>
   
     <!-- ================================================================== -->
  -  <!-- Compiles the source directory and creates a .jar file              -->
  +  <!-- J A R                                                              -->
     <!-- ================================================================== -->
     
     <target name="jar" depends="compile" description="--> generates the torque.jar">
  @@ -89,7 +162,7 @@
     </target>
   
     <!-- ================================================================== -->
  -  <!-- Creates the API documentation                                      -->
  +  <!-- J A V A D O C S                                                    -->
     <!-- ================================================================== -->
     
     <target name="javadocs"
  @@ -114,17 +187,15 @@
     </target>
   
     <!-- ================================================================== -->
  -  <!-- Cleans up the build directory                                      -->
  +  <!-- C L E A N                                                          -->
     <!-- ================================================================== -->
     
     <target name="clean" description="--> cleans up the build directory">
  -    
       <delete dir="${build.dir}"/>
  -  
     </target>
   
     <!-- ================================================================== -->
  -  <!-- Make Turbine documentation                                         -->
  +  <!-- A N A K I A  D O C U M E N T A T I O N                             -->
     <!-- ================================================================== -->
     
     <target name="check_for_jdom">
  @@ -187,22 +258,20 @@
          </fileset>
        </copy>
        -->
  -
     </target>
   
  -  <target name="dist" depends="compile">
  -    
  +  <!-- ================================================================== -->
  +  <!-- D I S T                                                            -->
  +  <!-- ================================================================== -->
  +
  +  <target name="dist" depends="compile,check.village">
       <property name="torque.dir" value="${build.dir}/torque/torque"/>
       <mkdir dir="${torque.dir}"/>
       <mkdir dir="${torque.dir}/lib"/>
   
  -    <copy todir="${torque.dir}/lib">
  -      <fileset dir="../../jakarta-turbine/lib">
  -        <include name="xerces-*.jar"/>
  -        <include name="velocity-*.jar"/>
  -        <include name="village-*.jar"/>
  -      </fileset>
  -    </copy>
  +    <copy file="${velocity.jar}" todir="${torque.dir}/lib"/>
  +    <copy file="${xerces.jar}" todir="${torque.dir}/lib"/>
  +    <copy file="${village.jar}" todir="${torque.dir}/lib"/>
   
       <filter token="TORQUE_HOME" value="."/>
           
  @@ -225,7 +294,6 @@
       <zip zipfile="${build.dir}/torque.zip"
         basedir="${build.dir}/torque"
       />
  -        
     </target>
   
   </project>
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-dev-help@jakarta.apache.org