avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@apache.org
Subject cvs commit: jakarta-avalon-cornerstone build.xml
Date Sat, 22 Jun 2002 10:51:40 GMT
donaldp     2002/06/22 03:51:40

  Modified:    .        build.xml
  Log:
  Update build.xml so that the .xinfo and manifest for jars is autocreated.
  
  Also made it so that there is only one type of distribution. Tihs distribution was like
old binary distribution except that it also contains src.zip containing source for cornerstone.
  
  Revision  Changes    Path
  1.106     +92 -180   jakarta-avalon-cornerstone/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-cornerstone/build.xml,v
  retrieving revision 1.105
  retrieving revision 1.106
  diff -u -r1.105 -r1.106
  --- build.xml	16 Jun 2002 12:20:04 -0000	1.105
  +++ build.xml	22 Jun 2002 10:51:40 -0000	1.106
  @@ -6,7 +6,7 @@
       Give user a chance to override without editing this file
       (and without typing -D each time he compiles it)
     -->
  -  <property file=".ant.properties"/>
  +  <property file="ant.properties"/>
     <property file="${user.home}/.ant.properties"/>
   
     <property name="name" value="cornerstone"/>
  @@ -33,6 +33,7 @@
     <property name="build.context" value="${build.dir}/documentation"/>
   
     <!-- Set the properties for source directories -->
  +  <property name="gen.dir" value="gen"/>
     <property name="src.dir" value="src"/>
     <property name="lib.dir" value="lib"/>
     <property name="java.dir" value="${src.dir}/java"/>
  @@ -68,6 +69,7 @@
       <pathelement location="${tools.jar}"/>
       <fileset dir="${tools.dir}/lib"/>
       <fileset dir="${tools.dir}/ext"/>
  +    <fileset dir="${jakarta-site.dir}/lib"/>
     </path>
   
     <path id="test.class.path">
  @@ -78,14 +80,6 @@
     <!-- Main target -->
     <target name="main" depends="jars" description="Generates the files minus documentation"
/>
   
  -  <target name="all" depends="main,docs" description="Generates the files including
documentation"/>
  -
  -  <!-- Help on usage -->
  -  <target name="help" depends="usage"/>
  -  <target name="usage">
  -    <echo message="Run ant -projecthelp to get a list of targets to run"/>
  -  </target>
  -
     <!-- Compile the project -->
     <target name="compile">
   
  @@ -93,6 +87,10 @@
           classname="javax.net.ssl.SSLServerSocket"
           classpathref="project.class.path"/>
   
  +    <available property="event.present"
  +        classname="org.apache.excalibur.event.EventHandler"
  +        classpathref="project.class.path"/>
  +
       <available classname="electric.registry.Registry"
           classpathref="project.class.path"
           property="glue.present"/>
  @@ -125,7 +123,9 @@
         <exclude name="org/apache/avalon/cornerstone/blocks/sockets/TLSServerSocketFactory.java"
                  unless="jsse.present" />
         <exclude name="org/apache/avalon/cornerstone/blocks/sockets/TLSSocketFactory.java"
  -               unless="jsse.present" />               
  +               unless="jsse.present" />
  +      <exclude name="org/apache/avalon/cornerstone/services/silk/**.java"
  +               unless="event.present" />
         <exclude name="org/apache/avalon/cornerstone/blocks/soapification/glue/**.java"
                  unless="glue.present" />
         <exclude name="org/apache/avalon/cornerstone/blocks/dom/**.java"
  @@ -139,54 +139,58 @@
         <exclude name="org/apache/avalon/cornerstone/blocks/masterstore/xml/**.java"
                  unless="LTPJB.present" />
         <exclude name="org/apache/avalon/cornerstone/blocks/transport/**/*.java"
  -               unless="AltRMI.present" />               
  -
  -
  +               unless="AltRMI.present" />
       </javac>
  -
  -    <copy todir="${build.classes}">
  -      <fileset dir="${java.dir}">
  -        <include name="**/*.xinfo"/>
  -      </fileset>
  -    </copy>
  -
     </target>
   
     <!-- Creates all the .jar file -->
  -  <target name="jars" depends="compile">
  +  <target name="jars" depends="compile,xdoclet">
   
       <mkdir dir="${build.lib}"/>
   
       <jar jarfile="${build.lib}/cornerstone.jar"
            basedir="${build.classes}"
  -         manifest="${manifest.dir}/cornerstone.mf">
  +         manifest="${gen.dir}/manifest.mf">
         <include name="org/apache/avalon/cornerstone/blocks/**"/>
         <include name="org/apache/avalon/cornerstone/services/**"/>
  +        <fileset dir="${gen.dir}">
  +            <include name="**/*.xinfo"/>
  +        </fileset>
       </jar>
  -    
  +
       <jar jarfile="${build.lib}/cornerstone-api.jar"
  -         basedir="${build.classes}"
  -         manifest="${manifest.dir}/cornerstone.mf">
  +         basedir="${build.classes}">
         <include name="org/apache/avalon/cornerstone/services/**"/>
       </jar>
   
       <jar jarfile="${build.lib}/cornerstone-refimpl.jar"
            basedir="${build.classes}"
  -         manifest="${manifest.dir}/cornerstone.mf">
  +         manifest="${gen.dir}/manifest.mf">
         <include name="org/apache/avalon/cornerstone/blocks/**"/>
  +      <fileset dir="${gen.dir}">
  +          <include name="**/*.xinfo"/>
  +      </fileset>
       </jar>
  -
  -
  -
     </target>
   
     <target name="xdoclet" description="Generates the XML descriptors">
  -    <ant antfile="gen-blockinfo.xml"/>
  +      <taskdef name="phoenix-blocks"
  +               classname="org.apache.avalon.phoenix.tools.xdoclet.PhoenixXDoclet"
  +               classpathref="project.class.path"/>
  +
  +      <phoenix-blocks
  +          destdir="${gen.dir}"
  +          classpathref="project.class.path">
  +        <fileset dir="${java.dir}">
  +          <include name="**/*.java" />
  +        </fileset>
  +        <blockinfo/>
  +        <manifest manifestFile="manifest.mf" />
  +      </phoenix-blocks>
     </target>
   
     <!-- Performs unit tests -->
  -  <target name="test" depends="check"/>
  -  <target name="check" depends="compile" >
  +  <target name="test" depends="compile" description="Perform unit tests">
       <mkdir dir="${build.reports}"/>
   
       <echo message="Performing Unit Tests" />
  @@ -203,10 +207,8 @@
           </fileset>
         </batchtest>
       </junit>
  -
     </target>
   
  -
     <target name="test-report" depends="compile" >
       <mkdir dir="${build.testdocs}"/>
       <mkdir dir="${build.reports}"/>
  @@ -251,155 +253,89 @@
          <param name="-doctitle" value="${Name}"/>
          <param name="-windowtitle" value="${Name} API"/>
          <param name="-bottom"
  -              value="&quot;Copyright &#169; 2001 Apache Jakarta Project. All Rights
Reserved.&quot;"/>
  +              value="&quot;Copyright &#169; 1999-2002 Apache Jakarta Project. All
Rights Reserved.&quot;"/>
         </doclet>
       </javadoc>
   
     </target>
   
  -  <!-- prepares printer friendly documentation -->
  -  <target name="printerdocs" description="Generates the printer-friendly Docs">
  -    <echo message="Printer friendly docs are not yet implemented"/>
  -  </target>
  -
  -  <!-- Prepares the documentation directory -->
  -  <target name="xdocs" description="Generates the Docs">
  -
  -    <mkdir dir="${build.context}"/>
  -    <mkdir dir="${build.xdocs}"/>
  -    <mkdir dir="${build.dir}/work"/>
  -
  -    <!-- Base pointers for non-xdocs documentation. Override these
  -         in .ant.properties to link to local docs -->
  -    <property name="avalon.base" value="http://jakarta.apache.org/avalon"/>
  -    <property name="framework.base" value="http://jakarta.apache.org/avalon/framework"/>
  -    <property name="phoenix.base" value="http://jakarta.apache.org/avalon/phoenix"/>
  -    <property name="cornerstone.base" value="http://jakarta.apache.org/avalon/cornerstone"/>
  -    <property name="logkit.base" value="http://jakarta.apache.org/avalon/logkit"/>
  -    <property name="testlet.base" value="http://jakarta.apache.org/avalon/testlet"/>
  -
  -    <filter token="year" value="${year}"/>
  -    <filter token="AVALON_BASE" value="${avalon.base}"/>
  -    <filter token="FRAMEWORK_BASE" value="${framework.base}"/>
  -    <filter token="PHOENIX_BASE" value="${phoenix.base}"/>
  -    <filter token="CORNERSTONE_BASE" value="${cornerstone.base}"/>
  -    <filter token="LOGKIT_BASE" value="${logkit.base}"/>
  -    <filter token="TESTLET_BASE" value="${testlet.base}"/>
  -
  -    <copy todir="${build.context}" filtering="on">
  -      <fileset dir="${context.dir}">
  -        <exclude name="resources/**"/>
  -        <exclude name="xdocs"/>
  -      </fileset>
  -    </copy>
  -
  -    <copy todir="${build.context}/xdocs" filtering="on" overwrite="yes">
  -      <fileset dir="${xdocs.dir}"/>
  -    </copy>
  +    <target name="anakia-avail">
  +        <available classname="org.apache.velocity.anakia.AnakiaTask"
  +            property="AnakiaTask.present">
  +            <classpath refid="tools.class.path"/>
  +        </available>
  +    </target>
  +
  +    <target name="anakia-check" depends="anakia-avail" unless="AnakiaTask.present">
  +        <echo>
  +            AnakiaTask is not present! Please check to make sure that
  +            velocity.jar is in your classpath. The easiest way to build
  +            the documentation is to checkout jakarta-site CVS and specify
  +            jakarta-site.dir property.
  +        </echo>
  +    </target>
  +
  +    <target name="xdocs" depends="anakia-check" description="Generate documentation
and website">
  +        <taskdef name="anakia"
  +            classname="org.apache.velocity.anakia.AnakiaTask">
  +            <classpath refid="tools.class.path"/>
  +        </taskdef>
  +
  +        <anakia basedir="${xdocs.dir}"
  +            destdir="${docs.dir}"
  +            style="docs.vsl"
  +            projectfile="stylesheets/project.xml"
  +            includes="**/*.xml"
  +            excludes="stylesheets/** changes.xml"
  +            velocitypropertiesfile="${xdocs.dir}/stylesheets/velocity.properties"
  +            />
  +
  +        <anakia basedir="${xdocs.dir}"
  +            destdir="${docs.dir}"
  +            style="changes.vsl"
  +            projectfile="stylesheets/project.xml"
  +            includes="changes.xml"
  +            velocitypropertiesfile="${xdocs.dir}/stylesheets/velocity.properties"
  +            />
   
  -    <copy todir="${build.context}/resources" filtering="off" overwrite="yes">
  -      <fileset dir="${context.dir}/resources"/>
  +     <copy todir="${docs.dir}" filtering="off">
         <fileset dir="${xdocs.dir}">
           <include name="**/images/**"/>
  +        <include name="**/*.gif"/>
  +        <include name="**/*.jpg"/>
  +        <include name="**/*.png"/>
  +        <include name="**/*.css"/>
  +        <include name="**/*.js"/>
         </fileset>
       </copy>
  -
  -    <delete>
  -      <fileset dir="${docs.dir}">
  -        <exclude name="api/**"/>
  -      </fileset>
  -    </delete>
  -    <mkdir dir="${docs.dir}"/>
  -
  -    <java classname="org.apache.cocoon.Main" fork="true">
  -      <arg value="-c${build.context}/"/>
  -      <arg value="-d${docs.dir}"/>
  -      <arg value="-w${build.dir}/work"/>
  -      <arg value="-l${build.dir}/work/cocoon.log"/>
  -      <arg value="-uINFO"/>
  -      <arg value="-f${xdocs.dir}/cornerstone.uris"/>
  -      <classpath refid="tools.class.path"/>
  -    </java>
  -
  -  </target>
  +    </target>
   
     <target name="docs" depends="javadocs,xdocs"/>
   
     <!-- Create the binary distribution -->
  -  <target name="bin-dist" depends="all">
  +  <target name="dist-lite" depends="main, docs, javadocs">
   
       <!-- bin.dist.dir usually already specified -->
       <property name="bin.dist.dir" value="dist"/>
       <property name="bin.dist.docs" value="${bin.dist.dir}/docs"/>
   
  -
       <copy todir="${bin.dist.docs}">
         <fileset dir="${docs.dir}"/>
       </copy>
   
  -    <copy file="${build.lib}/cornerstone.jar" tofile="${bin.dist.dir}/cornerstone-${version}.jar"/>
  -
  -    <chmod dir="${bin.dist.dir}" perm="go-rwx" />
  -  </target>
  -
  -  <!-- Create the source distribution -->
  -  <target name="src-dist" depends="docs">
  -
  -    <!-- src.dist.dir usually already specified -->
  -    <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.lib" value="${src.dist.dir}/lib"/>
  -    <property name="src.dist.tools" value="${src.dist.dir}/tools"/>
  -
  -    <mkdir dir="${src.dist.dir}" />
  -    <mkdir dir="${src.dist.docs}"/>
  -
  -    <copy todir="${src.dist.tools}">
  -      <fileset dir="${tools.dir}"/>
  -    </copy>
  -
  -    <copy todir="${src.dist.lib}">
  -      <fileset dir="lib">
  -        <include name="*.jar"/>
  -      </fileset>
  -    </copy>
  -
  -    <copy todir="${src.dist.src}">
  -      <fileset dir="${src.dir}"/>
  -    </copy>
  -
  -    <copy todir="${src.dist.docs}">
  -      <fileset dir="${docs.dir}"/>
  -    </copy>
  -
  -    <copy todir="${src.dist.dir}">
  +    <copy todir="${bin.dist.dir}">
         <fileset dir=".">
  -        <include name="README.txt"/>
  -        <include name="WARNING"/>
  -        <include name="LICENSE"/>
  -        <include name="build.bat"/>
  -        <include name="build.sh"/>
  -        <include name="build.xml"/>
  +          <include name="LICENSE.txt"/>
         </fileset>
       </copy>
   
  -    <fixcrlf srcdir="${src.dist.dir}" includes="build.sh" eol="lf"/>
  -    <fixcrlf srcdir="${src.dist.dir}" includes="build.bat" eol="crlf"/>
  -    <fixcrlf srcdir="${src.dist.tools}/bin" includes="*.sh" eol="lf"/>
  -    <fixcrlf srcdir="${src.dist.tools}/bin" includes="ant" eol="lf"/>
  -    <fixcrlf srcdir="${src.dist.tools}/bin" includes="antRun" eol="lf"/>
  -    <fixcrlf srcdir="${src.dist.tools}/bin" includes="*.bat" eol="crlf"/>
  -
  -    <chmod perm="+x">
  -      <fileset dir="${src.dist.dir}">
  -        <include name="build.sh" />
  -      </fileset>
  -    </chmod>
  +    <zip zipfile="${bin.dist.dir}/src.zip" compress="false">
  +        <zipfileset dir="src/java"/>
  +    </zip>
   
  -    <fixcrlf srcdir="${src.dist.src}/java" includes="**/*.java" eol="lf"/>
  +    <copy file="${build.lib}/cornerstone.jar" tofile="${bin.dist.dir}/cornerstone-${version}.jar"/>
   
  -    <chmod dir="${src.dist.dir}" perm="go-rwx" />
  +    <chmod dir="${bin.dist.dir}" perm="go-rwx" />
   
     </target>
   
  @@ -408,7 +344,7 @@
   
       <mkdir dir="${dist.base}"/>
   
  -    <antcall target="bin-dist" inheritall="false">
  +    <antcall target="dist-lite" inheritall="false">
         <param name="bin.dist.dir" value="${dist.name}" />
       </antcall>
   
  @@ -428,30 +364,6 @@
       <delete file="${dist.base}/${dist.name}-bin.tar"/>
       <delete dir="${dist.name}" />
   
  -    <antcall target="src-dist" inheritall="false">
  -      <param name="src.dist.dir" value="${dist.name}" />
  -    </antcall>
  -
  -    <zip file="${dist.base}/${dist.name}-src.zip"
  -         basedir="${dist.name}/.."
  -         includes="${dist.name}/**"/>
  -
  -    <tar longfile="gnu" tarfile="${dist.base}/${dist.name}-src.tar" >
  -      <tarfileset dir="${dist.name}/.." mode="755" username="avalon" group="avalon">
  -        <include name="${dist.name}/build.sh"/>
  -      </tarfileset>
  -      <tarfileset dir="${dist.name}/.." username="avalon" group="avalon">
  -        <include name="${dist.name}/**"/>
  -        <exclude name="${dist.name}/build.sh"/>
  -      </tarfileset>
  -    </tar>
  -
  -    <gzip zipfile="${dist.base}/${dist.name}-src.tar.gz"
  -          src="${dist.base}/${dist.name}-src.tar"/>
  -
  -    <delete file="${dist.base}/${dist.name}-src.tar"/>
  -    <delete dir="${dist.name}" />
  -
     </target>
   
     <!-- Update the www directory -->
  @@ -487,7 +399,7 @@
     <target name="distclean" depends="clean" description="Cleans up all genereated files
and directories">
       <delete dir="${docs.dir}" />
       <delete dir="${dist.base}" />
  -
  +    <delete dir="${gen.dir}" />
     </target>
   
   </project>
  
  
  

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


Mime
View raw message