james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From charl...@apache.org
Subject cvs commit: jakarta-james build.xml
Date Thu, 10 May 2001 11:16:49 GMT
charlesb    01/05/10 04:16:48

  Modified:    .        build.xml
  Log:
  Updating buildfile closer to avalon style
  
  Revision  Changes    Path
  1.57      +146 -54   jakarta-james/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-james/build.xml,v
  retrieving revision 1.56
  retrieving revision 1.57
  diff -u -r1.56 -r1.57
  --- build.xml	2001/05/09 14:45:07	1.56
  +++ build.xml	2001/05/10 11:16:42	1.57
  @@ -34,7 +34,7 @@
   
   =========================================================================== -->
   
  -<project default="sar" basedir=".">
  +<project default="main" basedir=".">
   
     <!--
       Give user a chance to override without editing this file
  @@ -44,16 +44,17 @@
     <property file="${user.home}/.ant.properties"/>
   
     <property name="name" value="james"/>
  +  <property name="Name" value="James"/>
     <property name="version" value="1.2.2-dev"/>
     <property name="year" value="1999-2001"/>
   
  -  <property name="build.compiler" value="classic"/>
  +<!-- There should be no need to override default compiler but need to change javac task
to run without this -->
  +  <property name="build.compiler" value="classic"/> 
     <property name="debug" value="on"/>
     <property name="optimize" value="on"/>
     <property name="deprecation" value="on"/>
   
   
  -
     <!--
       these are here only for those who use jikes compiler. For other
       developers this part makes no difference.
  @@ -64,39 +65,97 @@
     <property name="build.compiler.depend" value="true"/>
     <property name="build.compiler.fulldepend" value="true"/>
   
  -  <!-- The properties in the init section should not normally be changed -->
  +  <!--
  +       ===================================================================
  +       Set the properties for intermediate directory
  +       ===================================================================
  +  -->
  +  <property name="build.dir" value="build"/>
  +  <property name="build.lib" value="${build.dir}/lib"/>
  +  <property name="build.src" value="${build.dir}/src"/>
  +  <property name="build.classes" value="${build.dir}/classes"/>
  +  <property name="build.javadocs" value="${build.dir}/javadocs"/>
  +  <property name="build.docs" value="${build.dir}/docs"/>
  +  <property name="build.xdocs" value="${build.dir}/xdocs"/>
  +  <property name="build.mailetdocs" value="${build.dir}/mailetdocs"/>
  +  <property name="build.conf" value="${build.dir}/conf"/>
   
  -  <target name="init">
  -    <tstamp/>
  +  <!--
  +       ===================================================================
  +       Set the properties for source directories
  +       ===================================================================
  +  -->
   
  -    <property name="classpath" value="./lib/avalon-framework.jar;./lib/avalon-excalibur.jar;./lib/avalon-scratchpad.jar;./lib/logkit.jar;./lib/phoenix-client.jar;./lib/cornerstone.bar;./lib/activation.jar;./lib/mail_1_2.jar;./lib/xerces.jar;./lib/dnsjava.jar;./lib/town.jar;./lib/velocity-0.71.jar;./lib/jakarta-oro-2.0.1.jar"/>
  +  <property name="src.dir" value="src"/>
  +  <property name="java.dir" value="${src.dir}"/>
  +  <property name="conf.dir" value="conf"/>
  +  <property name="lib.dir" value="lib"/>
  +  <property name="tools.dir" value="tools"/>
  +  <property name="xdocs.dir" value="xdocs"/>
  +
  +  <property name="dist.name" value="${name}-${version}"/>
  +
  +  <property name="constants.file" value="org/apache/james/Constants.java"/>
  +  <property name="conf.file" value="james.conf.xml"/>
  +  <property name="server.file" value="james.server.xml"/>
   
  -    <property name="src.dir" value="src"/>
  -    <property name="conf.dir" value="conf"/>
  -    <property name="lib.dir" value="lib"/>
  -
  -    <property name="build.dir" value="build"/>
  -    <property name="build.src" value="${build.dir}/src"/>
  -    <property name="build.classes" value="${build.dir}/classes"/>
  -    <property name="build.docs" value="${build.dir}/docs"/>
  -    <property name="build.mailetdocs" value="${build.dir}/mailetdocs"/>
  -    <property name="build.javadocs" value="${build.dir}/javadocs"/>
  -    <property name="build.lib" value="${build.dir}/lib"/>
  -    <property name="build.conf" value="${build.dir}/conf"/>
  -
  -    <property name="constants.file" value="org/apache/james/Constants.java"/>
  -    <property name="conf.file" value="james.conf.xml"/>
  -    <property name="server.file" value="james.server.xml"/>
  -
  -    <property name="dist.dir" value="./dist"/>
  -    <property name="dist.name" value="${name}-${version}"/>
  -    <property name="site.dir" value="../xml-site/sources/james"/>
  -    <property name="site.docs" value="../xml-site/targets/james"/>
  +  <property name="site.dir" value="../xml-site/sources/james"/>
  +  <property name="site.docs" value="../xml-site/targets/james"/>
   
  -    <property name="docs.src" value="./xdocs"/>
  -    <property name="docs.dest" value="./docs"/>
  +  <property name="docs.src" value="./xdocs"/>
  +  <property name="docs.dest" value="./docs"/>
   
  +  <!--
  +       ===================================================================
  +       Set the classpath
  +       ===================================================================
  +  -->
  +  <property name="xerces.jar" value="${lib.dir}/xerces.jar"/>
  +  <property name="framework.jar" value="${lib.dir}/avalon-framework.jar"/>
  +  <property name="excalibur.jar" value="${lib.dir}/avalon-excalibur.jar"/>
  +  <property name="scratchpad.jar" value="${lib.dir}/avalon-scratchpad.jar"/>
  +  <property name="logkit.jar" value="${lib.dir}/logkit.jar"/>
  +  <property name="cornerstone.bar" value="${lib.dir}/cornerstone.bar"/>
  +<!--
  +  <property name="phoenix.client.jar" value="${lib.dir}/phoenix-client.jar"/>
  +
  +  <property name="activation.jar" value="${lib.dir}/activation.jar"/>
  +-->
  +  <path id="project.class.path">
  +    <pathelement location="${xerces.jar}"/>
  +    <pathelement location="${framework.jar}"/>
  +    <pathelement location="${excalibur.jar}"/>
  +    <pathelement location="${scratchpad.jar}"/>
  +    <pathelement location="${logkit.jar}"/>
  +    <pathelement location="${cornerstone.bar}"/>
  +    <pathelement path="${java.class.path}" />
  +    <fileset dir="${lib.dir}">
  +      <include name="*.jar" />
  +      <exclude name="xerces.jar"/>
  +      <exclude name="framework.jar"/>
  +      <exclude name="excalibur.jar"/>
  +      <exclude name="scratchpad.jar"/>
  +      <exclude name="logkit.jar"/>
  +    </fileset>
  +    <pathelement path="${build.classes}" />
  +  </path>
  +
  +  <!--
  +       ===================================================================
  +                                  Main target
  +       ===================================================================
  +  -->
  +  <target name="main" depends="dist-lite" />
  +
  +
  +  <!-- The properties in the init section should not normally be changed 
  +
  +  <target name="init">
  +
  +    <property name="classpath" value="./lib/avalon-framework.jar;./lib/avalon-excalibur.jar;./lib/avalon-scratchpad.jar;./lib/logkit.jar;./lib/phoenix-client.jar;./lib/cornerstone.bar;./lib/activation.jar;./lib/mail_1_2.jar;./lib/xerces.jar;./lib/dnsjava.jar;./lib/town.jar;./lib/velocity-0.71.jar;./lib/jakarta-oro-2.0.1.jar"/>
  +
     </target>
  +-->
   
     <!-- =================================================================== -->
     <!-- Help on usage                                                       -->
  @@ -125,13 +184,53 @@
       <echo message=""/>
     </target>
   
  +  <target name="help" depends="usage"/>
  +
  +  <!--
  +       ===================================================================
  +       Set up dist properties
  +       ===================================================================
  +  -->
  +  <target name="setup-properties" >
  +
  +    <tstamp/>
  +
  +    <property name="dist.dir" value="dist"/>
  +    <property name="dist.bin" value="${dist.dir}/bin"/>
  +    <property name="dist.apps" value="${dist.dir}/apps"/>
  +    <property name="dist.lib" value="${dist.dir}/lib"/>
  +    <property name="dist.docs" value="${dist.dir}/docs"/>
  +    <property name="dist.javadocs" value="${dist.dir}/docs/api"/>
  +
  +    <property name="src.dist.dir" value="dist-src"/>
  +    <property name="src.dist.src" value="${src.dist.dir}/src"/>
  +    <property name="src.dist.docs" value="${src.dist.dir}/docs"/>
  +    <property name="src.dist.javadocs" value="${src.dist.dir}/docs/api"/>
  +    <property name="src.dist.lib" value="${src.dist.dir}/lib"/>
  +    <property name="src.dist.tools" value="${src.dist.dir}/tools"/>
  +  </target>
  +
  +
     <!-- =================================================================== -->
     <!-- Prepares the build directory                                        -->
     <!-- =================================================================== -->
  -  <target name="prepare" depends="init">
  -    <mkdir dir="${build.dir}"/>
  +  <target name="prepare" depends="setup-properties">
  +
  +    <mkdir dir="${build.src}"/>
  +    <copy todir="${build.src}">
  +      <fileset dir="${java.dir}">
  +        <include name="${constants.file}" />
  +      </fileset>
  +    </copy>
  +
  +
       <available classname="org.apache.velocity.anakia.AnakiaTask"
           property="AnakiaTask.present"/>
  +
  +    <replace file="${build.src}/${constants.file}" token="@@VERSION@@" value="${version}"/>
  +    <replace file="${build.src}/${constants.file}" token="@@NAME@@" value="${Name}"/>
  +    <replace file="${build.src}/${constants.file}" token="@@DATE@@" value="${TODAY}"/>
  +
     </target>
   
     <target name="prepare-error" depends="prepare" unless="AnakiaTask.present">
  @@ -141,35 +240,26 @@
       </echo>
     </target>
   
  -  <!-- =================================================================== -->
  -  <!-- Copies the source code                                              -->
  -  <!-- =================================================================== -->
  -  <target name="prepare-src" depends="prepare">
  -    <!-- create directories -->
  -    <mkdir dir="${build.src}"/>
  -    <mkdir dir="${build.classes}"/>
  -    <mkdir dir="${build.lib}"/>
  -    <mkdir dir="${build.conf}"/>
  -
  -    <!-- copy src files -->
  -    <copy file="${src.dir}/${constants.file}" tofile="${build.src}/${constants.file}"/>
   
  -    <!-- substitute tokens as needed -->
  -    <replace file="${build.src}/${constants.file}" token="@@version@@" value="${version}"/>
  -  </target>
  -
     <!-- =================================================================== -->
     <!-- Compiles the source directory                                       -->
     <!-- =================================================================== -->
  -  <target name="compile" depends="prepare-src">
  -    <javac srcdir="${src.dir}" 
  +  <target name="compile" depends="prepare">
  +    <mkdir dir="${build.dir}"/>
  +    <available property="jndi.present" classname="javax.naming.InitialContext" />
  +
  +    <mkdir dir="${build.classes}"/>
  + 
  +    <javac srcdir="${java.dir}" 
              destdir="${build.classes}" 
  -           classpath="${classpath}"
              debug="${debug}"
              optimize="${optimize}"
              deprecation="${deprecation}">
  +      <classpath refid="project.class.path" />
         <src path="${build.src}" />
         <exclude name="${constants.file}" />
  +      <exclude name="org/apache/james/userrepository/UsersLDAPRepository.java"
  +               unless="jndi.present" />
       </javac>
   
       <copy todir="${build.classes}">
  @@ -186,6 +276,8 @@
     <!-- =================================================================== -->
     <target name="block-archive" depends="compile">
   
  +    <mkdir dir="${build.lib}"/>
  +
       <jar jarfile="${build.lib}/${name}.bar"
            basedir="${build.classes}"
            manifest="${src.dir}/Manifest.mf">
  @@ -307,7 +399,7 @@
     <!-- =================================================================== -->
     <!-- Cleans everything                                                   -->
     <!-- =================================================================== -->
  -  <target name="clean" depends="init">
  +  <target name="clean" depends="setup-properties">
       <delete dir="${build.dir}"/>
       <delete dir="${dist.dir}"/>
       <delete file="${name}-${version}-${DSTAMP}.zip"/>
  @@ -318,7 +410,7 @@
     <!-- =================================================================== -->
     <!-- Generates the javadoc                                               -->
     <!-- =================================================================== -->
  -  <target name="javadoc" depends="prepare-src">
  +  <target name="javadoc" depends="prepare">
       <mkdir dir="${build.docs}"/>
       <javadoc sourcepath="${build.src}"
           destdir="${build.docs}"
  @@ -331,7 +423,7 @@
     <!-- =================================================================== -->
     <!-- Generates the javadoc for the mailet API                            -->
     <!-- =================================================================== -->
  -  <target name="javadocmailet" depends="prepare-src">
  +  <target name="javadocmailet" depends="prepare">
       <mkdir dir="${build.mailetdocs}"/>
       <javadoc sourcepath="${build.src}"
           destdir="${build.mailetdocs}"
  
  
  

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


Mime
View raw message