jakarta-bsf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sa...@apache.org
Subject svn commit: r432015 - in /jakarta/bsf/trunk: build-properties.xml build.xml
Date Wed, 16 Aug 2006 20:11:39 GMT
Author: sanka
Date: Wed Aug 16 13:11:39 2006
New Revision: 432015

URL: http://svn.apache.org/viewvc?rev=432015&view=rev
Log:
Refactored the build.xml
Move the build properties to a separate file
(build.properties)

Added:
    jakarta/bsf/trunk/build-properties.xml
Modified:
    jakarta/bsf/trunk/build.xml

Added: jakarta/bsf/trunk/build-properties.xml
URL: http://svn.apache.org/viewvc/jakarta/bsf/trunk/build-properties.xml?rev=432015&view=auto
==============================================================================
--- jakarta/bsf/trunk/build-properties.xml (added)
+++ jakarta/bsf/trunk/build-properties.xml Wed Aug 16 13:11:39 2006
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="utf-8"?>
+<project name="props">
+    <property name="project.name" value="bsf"/>
+    <property name="project.fullName" value="Bean Scripting Framework"/>
+    <property name="project.version" value="2.3.0"/>
+    <property name="project.debug" value="off"/>
+    <property name="project.deprecation" value="on"/>
+    
+
+    <property name="packages" value="org.apache.*"/>
+    <property name="src.dir" value="src"/>
+    <property name="samples.dir" value="samples"/>
+
+    <property name="build.file" value="build.xml"/>
+    <property name="build.dir" value="build"/>
+    <property name="build.dest" value="build/classes"/>
+    <property name="build.lib" value="build/lib"/>
+    <property name="build.lib.win32" value="build/lib/win32"/>
+    <property name="build.samples" value="build/samples"/>
+    <property name="build.samples.calc" value="build/samples/calc"/>
+    <property name="build.samples.jsplike" value="build/samples/jsplike"/>
+    <property name="build.samples.scriptedui"
+              value="build/samples/scriptedui"/>
+    <property name="build.samples.xsl" value="build/samples/xsl"/>
+    <property name="build.javadocs" value="build/javadocs"/>
+  	<property name="build.tests" value="build/testcases" />
+
+    <property name="dist.dir" value="dist"/>
+    <property name="dist.dir.root"
+              value="${dist.dir}/${project.name}-${project.version}"/>
+    <property name="dist.bin.file"
+              value="${dist.dir}/${project.name}-bin-${project.version}"/>
+    <property name="dist.src.file"
+              value="${dist.dir}/${project.name}-src-${project.version}"/>
+
+    <property name="site.src" location="xdocs"/>
+    <property name="site.dest" location="docs"/>
+    <property name="site.projectFile" value="stylesheets/project.xml"/>
+    <property name="templ.path" location="xdocs/stylesheets"/>
+    <property name="velocity.props" location="${site.src}/velocity.properties"/>
+  	
+  	<property name="tests.dir" value="test"/>
+</project>
\ No newline at end of file

Modified: jakarta/bsf/trunk/build.xml
URL: http://svn.apache.org/viewvc/jakarta/bsf/trunk/build.xml?rev=432015&r1=432014&r2=432015&view=diff
==============================================================================
--- jakarta/bsf/trunk/build.xml (original)
+++ jakarta/bsf/trunk/build.xml Wed Aug 16 13:11:39 2006
@@ -55,385 +55,321 @@
 
 <project name="BSF Build" default="compile" basedir=".">
 
-  <import file="build-properties.xml"/>
+	<import file="build-properties.xml" />
+
+	<!-- =================================================================== -->
+	<!-- Source files to be compiled                                         -->
+	<!-- =================================================================== -->
+	<patternset id="java.source.files">
+		<!-- Optionally includes engines based on dependencies being present -->
+		<!-- FIXME: Exclude the first three, temporarily -->
+
+		<include name="**/bsf/*.java" />
+		<include name="**/util/**/*.java" />
+
+		<include name="**/jacl/**" if="jacl.present" />
+		<include name="**/javascript/**" if="rhino.present" />
+		<include name="**/jython/**" if="jython.present" />
+		<include name="**/netrexx/**" if="netrexx.present" />
+		<include name="**/xslt/**" if="xalan.present" />
+		<include name="**/test/**" if="junit.present" />
+	</patternset>
+	
+	<path id="compile.classpath">
+		<fileset dir="lib">
+			<include name="*.jar" />
+		</fileset>
+		<pathelement location="${build.dest}" />
+	</path>
 	
-  <target name="init" depends="clean">
-    <tstamp/>
-  	
-
-    <!-- ================================================================= -->
-    <!-- Sets version and time/date specific values                        -->
-    <!-- ================================================================= -->
-    <filter token="RELEASE_DATE_TIME" value="${TODAY} / ${TSTAMP}"/>
-    <filter token="VERSION" value="${project.version}"/>
-  </target>
-
-  <!-- =================================================================== -->
-  <!-- Prepares the build directory                                        -->
-  <!-- =================================================================== -->
-  <target name="prepare" depends="init">
-    <mkdir dir="${build.dir}"/>
-
-    <!-- ================================================================= -->
-    <!-- Determines what optional components are available                 -->
-    <!-- ================================================================= -->
-    <available property="jacl.present"
-               classname="tcl.lang.JACL"/>
-
-    <available property="jython.present"
-               classname="org.python.util.jython"/>
-
-    <available property="netrexx.present"
-               classname="netrexx.lang.Rexx"/>
-
-    <available property="rhino.present"
-               classname="org.mozilla.javascript.Scriptable"/>
-
-    <available property="xalan.present"
-               classname="org.apache.xalan.xslt.EnvironmentCheck"/>
-
-    <available property="junit.present"
-               classname="junit.framework.TestCase"/>
-
-    <uptodate property="javac.notRequired"
-              targetfile="${build.lib}/${project.name}.jar">
-      <srcfiles dir="${src.dir}">
-        <patternset refid="javac.source.files"/>
-      </srcfiles>
-    </uptodate>
-
-    <uptodate property="javadoc.required"
-              targetfile="${build.lib}/${project.name}.jar">
-      <srcfiles dir="${build.dir}" includes="**/*.html"/>
-    </uptodate>
-
-    <antcall target="checkDependencies"/>
-  </target>
-
-  <!-- =================================================================== -->
-  <!-- Prepares the site build process                                     -->
-  <!-- =================================================================== -->
-  <target name="prepare-site" depends="init">
-    <path id="anakia.classpath">
-      <fileset dir="${basedir}/lib">
-        <include name="*.jar"/>
-      </fileset>
-    </path>
-
-    <available property="AnakiaTask.present"
-               classname="org.apache.velocity.anakia.AnakiaTask">
-      <classpath refid="anakia.classpath"/>
-    </available>
-
-    <antcall target="checkAnakiaTask"/>
-  </target>
-
-  <!-- =================================================================== -->
-  <!-- Warn the user about items not present, for whatever purpose.        -->
-  <!-- =================================================================== -->
-  <target name="checkJacl" unless="jacl.present">
-    <echo message="Warning: Jacl dependencies were not resolved."/>
-  </target>
-  <target name="checkJython" unless="jython.present">
-    <echo message="Warning: Jython dependencies were not resolved."/>
-  </target>
-  <target name="checkNetRexx" unless="netrexx.present">
-    <echo message="Warning: NetRexx dependencies were not resolved."/>
-  </target>
-  <target name="checkRhino" unless="rhino.present">
-    <echo message="Warning: Rhino dependencies were not resolved."/>
-  </target>
-  <target name="checkXalan" unless="xalan.present">
-    <echo message="Warning: Xalan dependencies were not resolved."/>
-  </target>
-  <target name="checkAnakiaTask" unless="AnakiaTask.present">
-    <echo>
+	<target name="init" depends="clean">
+		<tstamp />
+
+
+		<!-- ================================================================= -->
+		<!-- Sets version and time/date specific values                        -->
+		<!-- ================================================================= -->
+		<filter token="RELEASE_DATE_TIME" value="${TODAY} / ${TSTAMP}" />
+		<filter token="VERSION" value="${project.version}" />
+	</target>
+
+	<!-- =================================================================== -->
+	<!-- Prepares the build directory                                        -->
+	<!-- =================================================================== -->
+	<target name="prepare" depends="init">
+		<mkdir dir="${build.dir}" />
+
+		<!-- ================================================================= -->
+		<!-- Determines what optional components are available                 -->
+		<!-- ================================================================= -->
+		<available property="jacl.present" classname="tcl.lang.JACL" />
+
+		<available property="jython.present" classname="org.python.util.jython" />
+
+		<available property="netrexx.present" classname="netrexx.lang.Rexx" />
+
+		<available property="rhino.present" classname="org.mozilla.javascript.Scriptable" />
+
+		<available property="xalan.present" classname="org.apache.xalan.xslt.EnvironmentCheck"
/>
+
+		<available property="junit.present" classname="junit.framework.TestCase" />
+
+		<uptodate property="javac.notRequired" targetfile="${build.lib}/${project.name}.jar">
+			<srcfiles dir="${src.dir}">
+				<patternset refid="javac.source.files" />
+			</srcfiles>
+		</uptodate>
+
+		<uptodate property="javadoc.required" targetfile="${build.lib}/${project.name}.jar">
+			<srcfiles dir="${build.dir}" includes="**/*.html" />
+		</uptodate>
+
+		<antcall target="checkDependencies" />
+	</target>
+
+	<!-- =================================================================== -->
+	<!-- Prepares the site build process                                     -->
+	<!-- =================================================================== -->
+	<target name="prepare-site" depends="init">
+		<path id="anakia.classpath">
+			<fileset dir="${basedir}/lib">
+				<include name="*.jar" />
+			</fileset>
+		</path>
+
+		<available property="AnakiaTask.present" classname="org.apache.velocity.anakia.AnakiaTask">
+			<classpath refid="anakia.classpath" />
+		</available>
+
+		<antcall target="checkAnakiaTask" />
+	</target>
+
+	<!-- =================================================================== -->
+	<!-- Warn the user about items not present, for whatever purpose.        -->
+	<!-- =================================================================== -->
+	<target name="checkJacl" unless="jacl.present">
+		<echo message="Warning: Jacl dependencies were not resolved." />
+	</target>
+	<target name="checkJython" unless="jython.present">
+		<echo message="Warning: Jython dependencies were not resolved." />
+	</target>
+	<target name="checkNetRexx" unless="netrexx.present">
+		<echo message="Warning: NetRexx dependencies were not resolved." />
+	</target>
+	<target name="checkRhino" unless="rhino.present">
+		<echo message="Warning: Rhino dependencies were not resolved." />
+	</target>
+	<target name="checkXalan" unless="xalan.present">
+		<echo message="Warning: Xalan dependencies were not resolved." />
+	</target>
+	<target name="checkAnakiaTask" unless="AnakiaTask.present">
+		<echo>
           Warning: AnakiaTask not present!
           Please ensure that velocity.jar is in your classpath.
 
           Documentation will not be generated.
     </echo>
-  </target>
-  <target name="checkJUnit" unless="junit.present">
-    <echo message="Warning: JUnit dependencies were not resolved."/>
-  </target>
-
-  <target name="checkDependencies" unless="javac.notRequired">
-    <antcall target="checkJacl"/>
-    <antcall target="checkJython"/>
-    <antcall target="checkNetRexx"/>
-    <antcall target="checkRhino"/>
-  	<!--<echo message="Warning: Rhino dependencies were not resolved." unless="rhino.present"/>-->
-    <antcall target="checkXalan"/>
-    <antcall target="checkJUnit"/>
-  </target>
-
-
-  <!-- =================================================================== -->
-  <!-- Source files to be compiled                                         -->
-  <!-- =================================================================== -->
-  <patternset id="javac.source.files">
-    <!-- Optionally includes engines based on dependencies being present -->
-    <!-- FIXME: Exclude the first three, temporarily -->
-    <exclude name="**/java/**"/>
-    <exclude name="**/javaclass/**"/>
-    <exclude name="**/activescript/**"/>
-    <exclude name="**/jacl/**" unless="jacl.present"/>
-    <exclude name="**/javascript/**" unless="rhino.present"/>
-    <exclude name="**/jython/**" unless="jython.present"/>
-    <exclude name="**/netrexx/**" unless="netrexx.present"/>
-    <exclude name="**/xslt/**" unless="xalan.present"/>
-    <exclude name="**/test/**" unless="junit.present"/>
-  </patternset>
-	
-  
+	</target>
+	<target name="checkJUnit" unless="junit.present">
+		<echo message="Warning: JUnit dependencies were not resolved." />
+	</target>
+
+	<target name="checkDependencies" unless="javac.notRequired">
+		<antcall target="checkJacl" />
+		<antcall target="checkJython" />
+		<antcall target="checkNetRexx" />
+		<antcall target="checkRhino" />
+		<!--<echo message="Warning: Rhino dependencies were not resolved." unless="rhino.present"/>-->
+		<antcall target="checkXalan" />
+		<antcall target="checkJUnit" />
+	</target>
 
-  <!-- =================================================================== -->
-  <!-- Compiles the source directory                                       -->
-  <!-- =================================================================== -->
-  <target name="compile"
-          description="Compiles the BSF *.java files."
-          depends="prepare">
-    <copy todir="${build.dest}">
-      <fileset dir="${src.dir}">
-        <include name="**/*.properties"/>
-      </fileset>
-    </copy>
-    <javac srcdir="${src.dir}"
-           destdir="${build.dest}"
-           debug="${project.debug}"
-           deprecation="${project.deprecation}">
-    	<classpath>
-    		<fileset dir="lib" includes="*.jar" />
-    	  </classpath>
-      <patternset refid="javac.source.files"/>
-    </javac>
 
-    </target>
-	
-  <!-- ================================================================= -->
-  <!-- Produces the jar file                                             -->
-  <!-- ================================================================= --> 	
-  <target name="jar" depends="compile" description="Produces the jar file and copies to
${build.lib}">
-  	<mkdir dir="${build.lib}"/>   
-  	<jar jarfile="${build.lib}/${project.name}.jar" basedir="${build.dest}"/>
-  	<uptodate property="javadoc.required"
-  	          targetfile="${build.lib}/${project.name}.jar">
-  	      <srcfiles dir="${build.dir}" includes="**/*.html"/>
-  	</uptodate>
-  </target>
-	
-  <!-- =================================================================== -->
-  <!-- Compiles the samples                                                -->
-  <!-- =================================================================== -->
-  <target name="samples"
-          description="Compiles the samples."
-          depends="jar">
-    <copy todir="${build.samples}">
-      <fileset dir="${samples.dir}"/>
-    </copy>
-  	
-  	<echo message="lib=${build.lib}/${project.name}.jar"/>
-    <javac srcdir="${build.samples.calc}"
-           destdir="${build.samples.calc}"
-           classpath="${build.lib}/${project.name}.jar"
-           debug="${project.debug}"
-           deprecation="${project.deprecation}"/>
-    <javac srcdir="${build.samples.jsplike}"
-           destdir="${build.samples.jsplike}"
-           classpath="${build.lib}/${project.name}.jar"
-           debug="${project.debug}"
-           deprecation="${project.deprecation}"/>
-    <javac srcdir="${build.samples.scriptedui}"
-           destdir="${build.samples.scriptedui}"
-           classpath="${build.lib}/${project.name}.jar"
-           debug="${project.debug}"
-           deprecation="${project.deprecation}"/>
-    <javac srcdir="${build.samples.xsl}"
-           destdir="${build.samples.xsl}"
-           classpath="${build.lib}/${project.name}.jar"
-           debug="${project.debug}"
-           deprecation="${project.deprecation}"/>
-  </target>
-
-  <!-- =================================================================== -->
-  <!-- Creates the API documentation                                       -->
-  <!-- =================================================================== -->
-  <target name="javadocs"
-          description="Generates the API documentation."
-          depends="compile" >
-    <mkdir dir="${build.javadocs}"/>
-             <!-- FIXME: Excluding some packages temporarily -->
-    <javadoc packagenames="${packages}"
-             excludepackagenames="org.apache.bsf.engines.java, org.apache.bsf.engines.javaclass"
-             sourcepath="${src.dir}"
-             destdir="${build.javadocs}"
-             author="true"
-             version="false"
-             use="true"
-             windowtitle="${project.fullName} API"
-             doctitle="${project.fullName}"/>
-  </target>
-
-  <!-- =================================================================== -->
-  <!-- Creates the website                                                 -->
-  <!-- =================================================================== -->
-  <target name="build-site" if="AnakiaTask.present"
-          description="Generates the website."
-          depends="prepare-site">
-    <taskdef name="anakia" classname="org.apache.velocity.anakia.AnakiaTask">
-       <classpath refid="anakia.classpath"/>
-    </taskdef>
-        
-    <anakia basedir="${site.src}" destdir="${site.dest}/"
-            extension=".html" style="./site.vsl"
-            projectFile="${site.projectFile}"
-            excludes="**/stylesheets/** faq.xml"
-            includes="**/*.xml"
-            lastModifiedCheck="true"
-            templatePath="${templ.path}"
-            velocityPropertiesFile="${velocity.props}">
-    </anakia>
-
-    <anakia basedir="${site.src}" destdir="${site.dest}/"
-            extension=".html" style="./faq.vsl"
-            projectFile="${site.projectFile}"
-            includes="faq.xml"
-            lastModifiedCheck="true"
-            templatePath="${templ.path}"
-            velocityPropertiesFile="${velocity.props}">
-    </anakia>
-
-    <copy todir="${site.dest}/images" filtering="no">
-       <fileset dir="${site.src}/images">
-          <include name="**/*.gif"/>
-          <include name="**/*.jpeg"/>
-          <include name="**/*.jpg"/>
-       </fileset>
-    </copy>
-  </target>
-
-  <!-- =================================================================== -->
-  <!-- Creates the binary distribution                                     -->
-  <!-- =================================================================== -->
-  <target name="bindist"
-          description="Creates the binary distribution(s)."
-          depends="javadocs, samples">
-    
-    <copy todir="${dist.dir.root}/docs/api">
-      <fileset dir="${build.javadocs}"/>
-    </copy>
-    <copy todir="${dist.dir.root}/lib">
-      <fileset dir="${build.lib}"/>
-    </copy>
-    <copy todir="${dist.dir.root}/samples">
-      <fileset dir="${build.samples}"/>
-    </copy>
-
-    <copy file="AUTHORS"
-          tofile="${dist.dir.root}/AUTHORS"/>
-    <copy file="README"
-          tofile="${dist.dir.root}/README"/>
-    <copy file="INSTALL"
-          tofile="${dist.dir.root}/INSTALL"/>
-    <copy file="CHANGES"
-          tofile="${dist.dir.root}/CHANGES"/>
-    <copy file="TODO"
-          tofile="${dist.dir.root}/TODO"/>
-    <copy file="LICENSE"
-          tofile="${dist.dir.root}/LICENSE"/>
-
-    <!-- ================================================================= -->
-    <!-- Produces the tar/gzip file                                        -->
-    <!-- ================================================================= -->
-    <tar tarfile="${dist.bin.file}.tar" basedir="${dist.dir}"
-         excludes="*.zip,*.tar,*.gz"/>
-    <gzip src="${dist.bin.file}.tar" zipfile="${dist.bin.file}.tar.gz"/>
-    <delete file="${dist.bin.file}.tar"/>
-
-    <!-- ================================================================= -->
-    <!-- Produces the zip file                                             -->
-    <!-- ================================================================= -->
-    <zip zipfile="${dist.bin.file}.zip" basedir="${dist.dir}"
-         excludes="*.zip,*.tar,*.gz"/>
-  </target>
-
-  <!-- =================================================================== -->
-  <!-- Creates the source distribution                                     -->
-  <!-- =================================================================== -->
-  <target name="srcdist"
-          description="Creates the source distribution(s)."
-          depends="init">
-  	
-    <copy todir="${dist.dir.root}/src">
-      <fileset dir="${src.dir}"/>
-    </copy>
-
-    <copy file="BUILDING" tofile="${dist.dir.root}/BUILDING"/>
-    <copy file="INSTALL" tofile="${dist.dir.root}/INSTALL"/>
-    <copy file="README" tofile="${dist.dir.root}/README"/>
-    <copy file="CHANGES" tofile="${dist.dir.root}/CHANGES"/>
-    <copy file="TODO" tofile="${dist.dir.root}/TODO"/>
-    <copy file="AUTHORS" tofile="${dist.dir.root}/AUTHORS"/>
-    <copy file="LICENSE" tofile="${dist.dir.root}/LICENSE"/>
-    <copy file="${build.file}" tofile="${dist.dir.root}/${build.file}"/>
-
-    <!-- ================================================================= -->
-    <!-- Produces the tar/gzip file                                        -->
-    <!-- ================================================================= -->
-    <tar tarfile="${dist.src.file}.tar" basedir="${dist.dir}"
-         excludes="*.zip,*.tar,*.gz"/>
-    <gzip src="${dist.src.file}.tar" zipfile="${dist.src.file}.tar.gz"/>
-    <delete file="${dist.src.file}.tar"/>
-
-    <!-- ================================================================= -->
-    <!-- Produces the zip file                                             -->
-    <!-- ================================================================= -->
-    <zip zipfile="${dist.src.file}.zip" basedir="${dist.dir}/"
-         excludes="*.zip,*.tar,*.gz"/>
-  </target>
-  
-
-  <!-- =================================================================== -->
-  <!-- Compile unit tests                                                  -->
-  <!-- =================================================================== -->
-  <target name="compile-test" if="junit.present" depends="compile">
-  	<mkdir dir="${build.tests}" />
-  	<javac srcdir="${tests.dir}" destdir="${build.tests}" 
-  		   classpath="${build.lib}/${project.name}.jar" />
-  </target>
-	
-  <!-- =================================================================== -->
-  <!-- Performs unit tests                                                 -->
-  <!-- =================================================================== -->
-  <target name="test" if="junit.present" 
-          description="Performs unit tests on BSF."
-  	      depends="compile-test">
-  	<junit>
-	  <classpath>
-	    <pathelement location="${build.lib}/${project.name}.jar" />
-	    <pathelement location="${build.tests}" />
-	  </classpath>
-  	  <formatter type="brief" usefile="false" />
-	  <test name="org.apache.bsf.BSFTest" />
-	</junit>
-  </target>
-
-  <!-- =================================================================== -->
-  <!-- Creates both distributions                                          -->
-  <!-- =================================================================== -->
-  <target name="dist"
-          description="Executes both bindist and srcdist."
-          depends="bindist, srcdist"/>
-
-  <!-- =================================================================== -->
-  <!-- Cleans everything                                                   -->
-  <!-- =================================================================== -->
-  <target name="clean"
-          description="Removes build and dist directories.">
-    <delete dir="${build.dir}"/>
-    <delete dir="${dist.dir}"/>
-  </target>
-	
-  <target name="all" depends="build-site, dist"/>
+
+
+
+
+	<!-- =================================================================== -->
+	<!-- Compiles the source directory                                       -->
+	<!-- =================================================================== -->
+	<target name="compile" description="Compiles the BSF *.java files." depends="prepare">
+		<mkdir dir="${build.dest}"/>
+		<javac srcdir="${src.dir}" destdir="${build.dest}" debug="${project.debug}" deprecation="${project.deprecation}">
+			<classpath>
+				<fileset dir="lib"><include name="*.jar"/></fileset>
+			</classpath>
+			<patternset refid="java.source.files"></patternset>			
+		</javac>
+	</target>
+
+	<!-- ================================================================= -->
+	<!-- Produces the jar file                                             -->
+	<!-- ================================================================= -->
+	<target name="jar" depends="compile" description="Produces the jar file and copies to
${build.lib}">
+		<mkdir dir="${build.lib}" />
+		<copy todir="${build.dest}">
+					<fileset dir="${src.dir}">
+						<include name="**/*.properties" />
+					</fileset>
+				</copy>
+		<jar jarfile="${build.lib}/${project.name}.jar" basedir="${build.dest}" />
+		<uptodate property="javadoc.required" targetfile="${build.lib}/${project.name}.jar">
+			<srcfiles dir="${build.dir}" includes="**/*.html" />
+		</uptodate>
+	</target>
+
+	<!-- =================================================================== -->
+	<!-- Compiles the samples                                                -->
+	<!-- =================================================================== -->
+	<target name="samples" description="Compiles the samples." depends="jar">
+		<copy todir="${build.samples}">
+			<fileset dir="${samples.dir}" />
+		</copy>
+
+		<echo message="lib=${build.lib}/${project.name}.jar" />
+		<javac srcdir="${build.samples.calc}" destdir="${build.samples.calc}" classpath="${build.lib}/${project.name}.jar"
debug="${project.debug}" deprecation="${project.deprecation}" />
+		<javac srcdir="${build.samples.jsplike}" destdir="${build.samples.jsplike}" classpath="${build.lib}/${project.name}.jar"
debug="${project.debug}" deprecation="${project.deprecation}" />
+		<javac srcdir="${build.samples.scriptedui}" destdir="${build.samples.scriptedui}" classpath="${build.lib}/${project.name}.jar"
debug="${project.debug}" deprecation="${project.deprecation}" />
+		<javac srcdir="${build.samples.xsl}" destdir="${build.samples.xsl}" classpath="${build.lib}/${project.name}.jar"
debug="${project.debug}" deprecation="${project.deprecation}" />
+	</target>
+
+	<!-- =================================================================== -->
+	<!-- Creates the API documentation                                       -->
+	<!-- =================================================================== -->
+	<target name="javadocs" description="Generates the API documentation." depends="compile"
>
+		<mkdir dir="${build.javadocs}" />
+		<!-- FIXME: Excluding some packages temporarily -->
+		<javadoc packagenames="${packages}" sourcepath="src" failonerror="true" excludepackagenames="org.apache.bsf.engines.java,
org.apache.bsf.engines.javaclass" destdir="${build.javadocs}" author="true" version="false"
use="true" windowtitle="${project.fullName} API" doctitle="${project.fullName}">
+			<classpath><fileset dir="lib"><include name="*.jar"/></fileset></classpath>
+			<fileset dir="${src.dir}"><patternset refid="java.source.files"></patternset></fileset>
+		</javadoc>
+
+	</target>
+
+	<!-- =================================================================== -->
+	<!-- Creates the website                                                 -->
+	<!-- =================================================================== -->
+	<target name="build-site" if="AnakiaTask.present" description="Generates the website."
depends="prepare-site">
+		<taskdef name="anakia" classname="org.apache.velocity.anakia.AnakiaTask">
+			<classpath refid="anakia.classpath" />
+		</taskdef>
+
+		<anakia basedir="${site.src}" destdir="${site.dest}/" extension=".html" style="./site.vsl"
projectFile="${site.projectFile}" excludes="**/stylesheets/** faq.xml" includes="**/*.xml"
lastModifiedCheck="true" templatePath="${templ.path}" velocityPropertiesFile="${velocity.props}">
+		</anakia>
+
+		<anakia basedir="${site.src}" destdir="${site.dest}/" extension=".html" style="./faq.vsl"
projectFile="${site.projectFile}" includes="faq.xml" lastModifiedCheck="true" templatePath="${templ.path}"
velocityPropertiesFile="${velocity.props}">
+		</anakia>
+
+		<copy todir="${site.dest}/images" filtering="no">
+			<fileset dir="${site.src}/images">
+				<include name="**/*.gif" />
+				<include name="**/*.jpeg" />
+				<include name="**/*.jpg" />
+			</fileset>
+		</copy>
+	</target>
+
+	<!-- =================================================================== -->
+	<!-- Creates the binary distribution                                     -->
+	<!-- =================================================================== -->
+	<target name="bindist" description="Creates the binary distribution(s)." depends="javadocs,
samples">
+
+		<copy todir="${dist.dir.root}/docs/api">
+			<fileset dir="${build.javadocs}" />
+		</copy>
+		<copy todir="${dist.dir.root}/lib">
+			<fileset dir="${build.lib}" />
+		</copy>
+		<copy todir="${dist.dir.root}/samples">
+			<fileset dir="${build.samples}" />
+		</copy>
+
+		<copy file="AUTHORS" tofile="${dist.dir.root}/AUTHORS" />
+		<copy file="README" tofile="${dist.dir.root}/README" />
+		<copy file="INSTALL" tofile="${dist.dir.root}/INSTALL" />
+		<copy file="CHANGES" tofile="${dist.dir.root}/CHANGES" />
+		<copy file="TODO" tofile="${dist.dir.root}/TODO" />
+		<copy file="LICENSE" tofile="${dist.dir.root}/LICENSE" />
+
+		<!-- ================================================================= -->
+		<!-- Produces the tar/gzip file                                        -->
+		<!-- ================================================================= -->
+		<tar tarfile="${dist.bin.file}.tar" basedir="${dist.dir}" excludes="*.zip,*.tar,*.gz"
/>
+		<gzip src="${dist.bin.file}.tar" zipfile="${dist.bin.file}.tar.gz" />
+		<delete file="${dist.bin.file}.tar" />
+
+		<!-- ================================================================= -->
+		<!-- Produces the zip file                                             -->
+		<!-- ================================================================= -->
+		<zip zipfile="${dist.bin.file}.zip" basedir="${dist.dir}" excludes="*.zip,*.tar,*.gz"
/>
+	</target>
+
+	<!-- =================================================================== -->
+	<!-- Creates the source distribution                                     -->
+	<!-- =================================================================== -->
+	<target name="srcdist" description="Creates the source distribution(s)." depends="init">
+
+		<copy todir="${dist.dir.root}/src">
+			<fileset dir="${src.dir}" />
+		</copy>
+
+		<copy file="BUILDING" tofile="${dist.dir.root}/BUILDING" />
+		<copy file="INSTALL" tofile="${dist.dir.root}/INSTALL" />
+		<copy file="README" tofile="${dist.dir.root}/README" />
+		<copy file="CHANGES" tofile="${dist.dir.root}/CHANGES" />
+		<copy file="TODO" tofile="${dist.dir.root}/TODO" />
+		<copy file="AUTHORS" tofile="${dist.dir.root}/AUTHORS" />
+		<copy file="LICENSE" tofile="${dist.dir.root}/LICENSE" />
+		<copy file="${build.file}" tofile="${dist.dir.root}/${build.file}" />
+
+		<!-- ================================================================= -->
+		<!-- Produces the tar/gzip file                                        -->
+		<!-- ================================================================= -->
+		<tar tarfile="${dist.src.file}.tar" basedir="${dist.dir}" excludes="*.zip,*.tar,*.gz"
/>
+		<gzip src="${dist.src.file}.tar" zipfile="${dist.src.file}.tar.gz" />
+		<delete file="${dist.src.file}.tar" />
+
+		<!-- ================================================================= -->
+		<!-- Produces the zip file                                             -->
+		<!-- ================================================================= -->
+		<zip zipfile="${dist.src.file}.zip" basedir="${dist.dir}/" excludes="*.zip,*.tar,*.gz"
/>
+	</target>
+
+
+	<!-- =================================================================== -->
+	<!-- Compile unit tests                                                  -->
+	<!-- =================================================================== -->
+	<target name="compile-test" if="junit.present" depends="compile">
+		<mkdir dir="${build.tests}" />
+		<javac srcdir="${tests.dir}" destdir="${build.tests}" classpath="${build.lib}/${project.name}.jar"
/>
+	</target>
+
+	<!-- =================================================================== -->
+	<!-- Performs unit tests                                                 -->
+	<!-- =================================================================== -->
+	<target name="test" if="junit.present" description="Performs unit tests on BSF." depends="compile-test">
+		<junit>
+			<classpath>
+				<pathelement location="${build.lib}/${project.name}.jar" />
+				<pathelement location="${build.tests}" />
+			</classpath>
+			<formatter type="brief" usefile="false" />
+			<test name="org.apache.bsf.BSFTest" />
+		</junit>
+	</target>
+
+	<!-- =================================================================== -->
+	<!-- Creates both distributions                                          -->
+	<!-- =================================================================== -->
+	<target name="dist" description="Executes both bindist and srcdist." depends="bindist,
srcdist" />
+
+	<!-- =================================================================== -->
+	<!-- Cleans everything                                                   -->
+	<!-- =================================================================== -->
+	<target name="clean" description="Removes build and dist directories.">
+		<delete dir="${build.dir}" />
+		<delete dir="${dist.dir}" />
+	</target>
+
+	<target name="all" depends="build-site, dist" />
 </project>



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


Mime
View raw message