You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@avalon.apache.org by do...@apache.org on 2003/05/03 07:13:57 UTC

cvs commit: avalon-sandbox/xfc build.xml

donaldp     2003/05/02 22:13:56

  Modified:    xfc      build.xml
  Log:
  Add build file for XFC
  
  Revision  Changes    Path
  1.13      +28 -176   avalon-sandbox/xfc/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/xfc/build.xml,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- build.xml	16 Apr 2003 22:23:13 -0000	1.12
  +++ build.xml	3 May 2003 05:13:56 -0000	1.13
  @@ -1,73 +1,36 @@
   <?xml version="1.0"?>
   
  -<project name="Excalibur XFC" default="main" basedir=".">
  +<project name="XFC" default="main" basedir=".">
   
       <property file="${user.home}/build.properties"/>
  -    <property file="${basedir}/../ant.properties"/>
       <property file="${basedir}/ant.properties"/>
  -    <property file="${user.home}/.ant.properties"/>
  -    <property file="${basedir}/../libraries.properties"/>
  -    <property file="${basedir}/../default.properties"/>
       <property file="${basedir}/default.properties"/>
   
       <!-- Classpath for product -->
       <path id="project.class.path">
  -        <pathelement location="${avalon-framework.jar}"/>
           <pathelement location="${build.classes}"/>
  -        <pathelement location="${checkstyle.jar}"/>
  +        <pathelement location="${avalon-framework.jar}"/>
           <pathelement location="${excalibur-compatibility.jar}"/>
           <pathelement path="${java.class.path}"/>
       </path>
   
       <path id="tools.class.path">
           <pathelement location="${junit.jar}"/>
  -        <fileset dir="${jakarta-site.dir}/lib"/>
       </path>
   
       <path id="test.class.path">
           <pathelement location="${build.testclasses}"/>
  -        <pathelement location="${excalibur-configuration.jar}"/>
  -        <pathelement location="${excalibur-xmlutil.jar}"/>
  -        <pathelement location="${excalibur-pool.jar}"/>
  -        <pathelement location="${excalibur-sourceresolve.jar}"/>
  -        <pathelement location="${excalibur-datasource.jar}"/>
  -        <pathelement location="${excalibur-instrument.jar}"/>
           <pathelement location="${junit.jar}"/>
           <path refid="project.class.path"/>
       </path>
       <property name="cp" refid="test.class.path"/>
   
  -    <target name="main" depends="test,jar" description="Build the project">
  -        <copy todir="${build.lib}" file="${excalibur-compatibility.jar}"/>
  -        <copy todir="${build.lib}" file="${avalon-framework.jar}"/>
  -        <copy todir="${build.lib}" file="${xerces.jar}"/>
  -        <copy todir="${build.lib}" file="${xml-apis.jar}"/>
  -        <copy todir="${build.lib}" file="${xalan.jar}"/>
  -    </target>
  +    <target name="main" depends="jar" description="Build the project"/>
       <target name="rebuild" depends="clean,main" description="Rebuild the project"/>
   
  -    <target name="dependencies" description="Check dependencies" unless="skip.dependencies">
  -        <ant antfile="${depchecker.prefix}/depchecker.xml" target="checkCommon"/>
  -        <ant antfile="${depchecker.prefix}/depchecker.xml" target="checkFramework"/>
  -        <ant antfile="${depchecker.prefix}/depchecker.xml" target="checkCompatibility"/>
  -    </target>
  -
  -    <target name="dependencies-test" depends="dist-jar, dependencies"
  -        description="Check unit test dependencies" unless="skip.dependencies">
  -        <!-- Need the jar to prevent recursive deps. -->
  -
  -        <ant antfile="${depchecker.prefix}/depchecker.xml" target="checkJUnit"/>
  -        <ant antfile="${depchecker.prefix}/depchecker.xml" target="checkXMLUtil"/>
  -        <ant antfile="${depchecker.prefix}/depchecker.xml" target="checkPool"/>
  -        <ant antfile="${depchecker.prefix}/depchecker.xml" target="checkDatasource"/>
  -        <ant antfile="${depchecker.prefix}/depchecker.xml" target="checkSourceResolve"/>
  -        <ant antfile="${depchecker.prefix}/depchecker.xml" target="checkInstrument"/>
  -        <ant antfile="${depchecker.prefix}/depchecker.xml" target="checkConfiguration"/>
  -    </target>
  -
   
       <!-- Compiles the source code -->
  -    <target name="compile" depends="dependencies" description="Compiles the source code">
  +    <target name="compile" description="Compiles the source code">
   
           <mkdir dir="${build.classes}"/>
   
  @@ -93,7 +56,7 @@
       </target>
   
       <!-- Compiles the unit test source code -->
  -    <target name="compile-test" depends="compile, dependencies-test" description="Compiles the source code">
  +    <target name="compile-test" depends="compile" description="Compiles the source code">
           <mkdir dir="${build.testsrc}"/>
   
           <!-- Copy over all of the tests applying test filters -->
  @@ -114,6 +77,13 @@
               <include name="**/*.java"/>
           </javac>
   
  +        <!-- copy the java source files across so we can read them in for tests -->
  +        <copy todir="${build.testclasses}">
  +            <fileset dir="${test.dir}">
  +                <include name="**/data/**/*.java"/>
  +            </fileset>
  +        </copy>
  +
           <copy todir="${build.testclasses}">
               <fileset dir="${test.dir}">
                   <exclude name="**/*.java"/>
  @@ -141,9 +111,14 @@
   
           <jar jarfile="${build.lib}/${jar.name}"
               basedir="${build.classes}"
  -            compress="${build.compress}"
  -            manifest="${src.dir}/etc/project.mf">
  -
  +            compress="${build.compress}">
  +            <manifest>
  +                <attribute name="Extension-Name" value="${name}"/>
  +                <attribute name="Specification-Vendor" value="Apache Software Foundation"/>
  +                <attribute name="Specification-Version" value="1.0"/>
  +                <attribute name="Implementation-Vendor" value="Apache Software Foundation"/>
  +                <attribute name="Implementation-Version" value="${package-version}"/>
  +            </manifest>
               <exclude name="**/test/**"/>
               <zipfileset dir="${build.conf}" prefix="META-INF/">
                   <include name="LICENSE.txt"/>
  @@ -151,30 +126,6 @@
           </jar>
       </target>
   
  -    <!-- Creates all the Javadocs -->
  -    <target name="javadocs" depends="compile" description="Generates the javadocs" unless="skip.javadocs">
  -
  -        <mkdir dir="${build.javadocs}"/>
  -        <javadoc packagenames="org.apache.*"
  -            sourcepath="${java.dir}"
  -            destdir="${build.javadocs}">
  -            <classpath refid="project.class.path" />
  -            <doclet name="com.sun.tools.doclets.standard.Standard">
  -                <param name="-author"/>
  -                <param name="-version"/>
  -                <param name="-doctitle" value="${Name}"/>
  -                <param name="-windowtitle" value="${Name} API"/>
  -		<!--
  -                <param name="-link" value="http://java.sun.com/j2se/1.4/docs/api/"/>
  -                <param name="-link" value="http://java.sun.com/j2ee/sdk_1.3/techdocs/api/"/>
  -                <param name="-link" value="http://jakarta.apache.org/avalon/api/"/>
  -		-->
  -                <param name="-bottom"
  -                    value="&quot;Copyright &#169; ${year} Apache Jakarta Project. All Rights Reserved.&quot;"/>
  -            </doclet>
  -        </javadoc>
  -    </target>
  -
       <target name="test" depends="compile-test" description="Perform the unit tests" unless="skip.tests">
   
           <echo message="Performing Unit Tests" />
  @@ -198,19 +149,6 @@
               </batchtest>
           </junit>
   
  -        <!-- Test XFC Ant task -->
  -        <taskdef name="xfc"
  -             classname="org.apache.excalibur.xfc.ant.XFCTask">
  -          <classpath refid="test.class.path"/>
  -        </taskdef>
  -
  -        <xfc>
  -            <input module="ecm"
  -                  context="build/testclasses/org/apache/excalibur/xfc/test/ecm.roles:build/testclasses/org/apache/excalibur/xfc/test/ecm.xconf"/>
  -            <output module="fortress"
  -                  context="build/tests/fortress-ant-generated.roles:build/tests/fortress-ant-generated.xconf"/>
  -        </xfc>
  -
       </target>
   
       <target name="test-reports" depends="test" description="Generate Reports for the unit tests">
  @@ -236,64 +174,14 @@
   
       </target>
   
  -    <target name="checkstyle" if="do.checkstyle" description="Checkstyle">
  -
  -        <!-- this invocation of checkstyle requires that checkstyle be downloaded and setup -->
  -        <!-- thats why you are required to define do.checkstyle property to generate the report -->
  -        <taskdef name="checkstyle"
  -            classname="com.puppycrawl.tools.checkstyle.CheckStyleTask">
  -            <classpath refid="project.class.path"/>
  -        </taskdef>
  -        <checkstyle
  -            lcurlyType="nl"
  -            lcurlyMethod="nl"
  -            lcurlyOther="nl"
  -            rcurly="ignore"
  -            allowProtected="false"
  -            allowPackage="false"
  -            allowNoAuthor="false"
  -            maxLineLen="100"
  -            maxMethodLen="100"
  -            maxConstructorLen="100"
  -            memberPattern="^m_[a-z][a-zA-Z0-9]*$"
  -            staticPattern="^c_[a-z][a-zA-Z0-9]*$"
  -            constPattern="(^c_[a-z][a-zA-Z0-9]*$)|([A-Z_]*$)"
  -            ignoreImportLen="true"
  -            allowTabs="false"
  -            javadocScope="protected"
  -            ignoreWhitespace="true"
  -            cacheFile="checkstyle.cache"
  -            failOnViolation="false"
  -            ignoreCastWhitespace="true">
  -            <fileset dir="${java.dir}">
  -                <include name="**/*.java"/>
  -            </fileset>
  -            <formatter type="plain"/>
  -            <formatter type="xml" toFile="${build.dir}/checkstyle-results.xml"/>
  -        </checkstyle>
  -    </target>
  -
  -    <target name="checkstyle-report"
  -        depends="checkstyle"
  -        if="do.checkstyle"
  -        description="Generate Checkstyle Report">
  -
  -        <mkdir dir="${build.reports}/checkstyle"/>
  -        <property name="checkstyle.pathhack" location="."/>
  -        <style style="${tools.dir}/etc/checkstyle-frames.xsl" in="${build.dir}/checkstyle-results.xml"
  -            out="${build.reports}/checkstyle/delete-me.html">
  -            <param name="pathhack" expression="${checkstyle.pathhack}"/>
  -        </style>
  -
  -    </target>
  -
       <!-- Creates the distribution -->
       <target name="dist"
  -        depends="dist-jar, test-reports, checkstyle-report, javadocs"
  -        description="Generates a distribution (jar + javadocs + unit tests + checkstyle reports)">
  +        depends="dist-jar, test-reports"
  +        description="Generates a distribution (jar + unit tests)">
   
           <copy file="${build.conf}/LICENSE.txt" todir="${dist.dir}"/>
           <copy file="../avalon/KEYS" todir="${dist.dir}"/>
  +        <copy file="README.txt" todir="${dist.dir}"/>
   
           <zip zipfile="${dist.dir}/src.zip" compress="false">
               <zipfileset dir="src/java"/>
  @@ -303,10 +191,8 @@
   
           <zip zipfile="${dist.base}/${dist.name}.zip" compress="true">
               <zipfileset dir="${dist.dir}" prefix="${dist.name}"/>
  +            <zipfileset dir="${docs.dir}" prefix="${dist.name}/docs"/>
           </zip>
  -
  -        <delete dir="${dist.dir}" />
  -
       </target>
   
       <!-- Creates a mini jar-only distribution -->
  @@ -321,32 +207,20 @@
   
       <!-- Creates a minimal distribution -->
       <target name="dist.lite"
  -        depends="dist-jar, test, javadocs"
  +        depends="dist-jar, test"
           description="Generates a minimal distribution (jar + javadocs)">
  +
           <copy file="../LICENSE.txt" todir="${dist.dir}"/>
           <copy file="../avalon/KEYS" todir="${dist.dir}"/>
  -    </target>
  -
  -    <target name="docs" depends="javadocs, xdocs" description="generates all the Avalon documentation"/>
  -
  -    <target name="xdocs" description="generates the xdocs-based documentation">
  -      <ant antfile="${basedir}/../forrestbuild.xml"/>
  -    </target>
  +        <copy file="README.txt" todir="${dist.dir}"/>
   
  -    <target name="site" depends="docs" description=" Places Docs ready for hosting on website">
  -        <mkdir dir="../site/dist/docs/${dir-name}"/>
  -        <copy todir="../site/dist/docs/${dir-name}">
  -            <fileset dir="${docs.dir}">
  -                <include name="**"/>
  -            </fileset>
  -        </copy>
       </target>
   
       <!-- Cleans up build and distribution directories -->
       <target name="clean" description="Cleans up the project">
  -        <delete file="checkstyle.cache"/>
           <delete dir="${build.dir}" />
           <delete dir="${dist.dir}" />
  +        <delete dir="${docs.dir}" />
           <delete dir="test" /> <!-- unit testing output directory -->
           <delete>
               <fileset dir="." includes="velocity.*"/>
  @@ -357,27 +231,5 @@
       <target name="real-clean" depends="clean" description="Cleans up the project, including distributions">
           <delete dir="${dist.base}" />
       </target>
  -
  -   <!--
  -  Misc. utilities.
  -  -->
  -
  -  <target name="patch">
  -    <replace dir="src/java"
  -       token="getTypes("
  -       value="getTypeEntries(" >
  -     <include name="**/classloader/*.java"/>
  -    </replace>
  -    <replace dir="src/java"
  -       token="getBlocks("
  -       value="getBlockEntries(" >
  -     <include name="**/classloader/*.java"/>
  -    </replace>
  -    <replace dir="src"
  -       token="getServices("
  -       value="getServiceEntries(" >
  -     <include name="**/classloader/*.java"/>
  -    </replace>
  -  </target>
   
   </project>
  
  
  

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