Update of /cvsroot/metamorphosis/antlets/java/src
In directory sc8-pr-cvs1:/tmp/cvs-serv3847/java/src
Added Files:
xbuild.xml
Log Message:
Moved the xbuild.xml to the src dir.
--- NEW FILE: xbuild.xml ---
<?xml version="1.0"?>
<!-- $Header: /cvsroot/metamorphosis/antlets/java/src/xbuild.xml,v 1.1 2003/12/22 23:20:10 chalko Exp $ -->
<project default="compile" name="java.antlet">
<!-- Antlet Specific Properties -->
<property name="java.antlet:javadocs.dir"
value="${project.build.dir}/docs/javadocs"/>
<property name="java.antlet:work.dir"
value="${project.build.dir}/work"/>
<property name="java.antlet:dist.source.dir"
value="${java.antlet:work.dir}/dist-src"/>
<property name="java.antlet:dist.bin.dir"
value="${java.antlet:work.dir}/dist-bin"/>
<property name="java.antlet:dist.bin.legal.dir"
value="${java.antlet:dist.bin.dir}/legal"/>
<property name="java.antlet:dist.bin.documentation.dir"
value="${java.antlet:dist.bin.dir}/docs"/>
<property name="project.src.dir" value="src/java"/>
<property name="build.compiler.emacs" value="on"/>
<property name="build.compiler.warnings" value="true"/>
<property name="build.compiler.pedantic" value="false"/>
<property name="build.compiler.depend" value="true"/>
<property name="build.compiler.fulldepend" value="true"/>
<property name="build.compiler.debug" value="on"/>
<property name="build.compiler.optimize" value="off"/>
<property name="build.compiler.deprecation" value="on"/>
<property name="build.compiler.nowarn" value="off"/>
<property name="build.compiler.type" value="classic"/>
<property name="build.compiler.source" value="1.3" />
<property name="build.compiler.vm" value="1.2" />
<property name="build.compiler.includes" value="**/*.java" />
<property name="build.compiler.excludes" value="*.tmp" />
<property name="build.compiler.bootclasspath" value="" />
<description>
The core antlet for a Java project.
It features all the basic targets that are needed to compile and package the code,
as well as targets that create information about the antlets and descriptors of a
project.
</description>
<!-- =================================================================== -->
<!-- Compiles the source directory -->
<!-- =================================================================== -->
<target name="compile-src" if="src.code.present"
description="Compiles the core source code">
<echo message="Compiling project core with Java ${ant.java.version}, debug ${build.compiler.debug}, optimize ${build.compiler.optimize}, deprecation ${build.compiler.deprecation}"/>
<mkdir dir="${project.build.dir}/classes"/>
<javac srcdir= "${project.src.dir}"
destdir= "${project.build.dir}/classes"
classpathref= "${project.name}.classpath"
debug= "${build.compiler.debug}"
optimize= "${build.compiler.optimize}"
deprecation= "${build.compiler.deprecation}"
source= "${build.compiler.source}"
target= "${build.compiler.vm}"
includes= "${build.compiler.includes}"
excludes= "${build.compiler.excludes}"
nowarn= "${build.compiler.nowarn}"
bootclasspath= "${build.compiler.bootclasspath}">
</javac>
<!-- copy all the things that are not classes to the classes dir -->
<copy todir="${project.build.dir}/classes" filtering="off">
<fileset dir="${project.src.dir}">
<patternset>
<exclude name="**/*.java"/>
</patternset>
</fileset>
</copy>
</target>
<target name="compile"
depends="-check-code-presence,
compile-src"
description="Compiles all the sources">
</target>
<!-- =================================================================== -->
<!-- Creates the jar files -->
<!-- =================================================================== -->
<target name="package-src" depends="compile" if="src.code.present"
description="Generates the core jar packages">
<jar jarfile="${project.build.dir}/${project.version.package-jar}">
<fileset dir="${project.build.dir}/classes">
<include name="**"/>
<exclude name="**/package.html"/>
</fileset>
<manifest>
<attribute name="Built-By" value="${user.name}"/>
<attribute name="Class-Path" value="${lib.export.manifest.classpath}"/>
<section name="${viprom:/module/project[@name=$project.name]/package}">
<attribute name="Specification-Title" value="${project.name}" />
<attribute name="Specification-Version" value="${project.version.package-short.version}" />
<attribute name="Specification-Vendor" value="${viprom:/module/vendor}" />
<attribute name="Implementation-Title" value="${project.name}" />
<attribute name="Implementation-Version" value="${project.version.package-version}" />
<attribute name="Implementation-Vendor" value="${viprom:/module/vendor}" />
</section>
</manifest>
</jar>
</target>
<target name="package"
depends="-check-code-presence, package-src"
description="Generates the jar packages">
</target>
<target name="-check-code-presence">
<!--
src.code.present
TODO check for the property viprom:/module/project[@name=$project.name]/code[@type='java/plain']/@dir
but if it is missing we get an error.
-->
<available file="${project.src.dir}" property="src.code.present"/>
</target>
<target name="-check-classes-presence">
<!--
src.classes.present
scratchpad.classes.present
examples.classes.present
contrib.classes.present
-->
</target>
<!-- =================================================================== -->
<!-- Clean target -->
<!-- =================================================================== -->
<target name="clean" description="Cleans the build directories">
<delete dir="${project.build.dir}"/>
</target>
<!-- =================================================================== -->
<!-- Creates the source distribution -->
<!-- =================================================================== -->
<target name="dist-src"
description="Prepares the source distribution" > <!-- depends="dist-ReleaseNotes" -->
<mkdir dir="${dist.dir}"/>
<mkdir dir="${java.antlet:dist.source.dir}"/>
<copy todir="${java.antlet:dist.source.dir}" filtering="off">
<fileset dir=".">
<patternset>
<exclude name="build"/>
<exclude name="dist"/>
<exclude name="build/**"/>
<exclude name="dist/**"/>
<exclude name="tools/tmp"/>
<exclude name="tools/tmp/**"/>
<exclude name="tools/antlets/*.antlet"/>
<exclude name="tools/antlets/*.antlet/**"/>
</patternset>
</fileset>
</copy>
</target>
<!-- =================================================================== -->
<!-- Packages the source distribution as .zip -->
<!-- =================================================================== -->
<target name="dist-src-zip" depends="dist-src"
description="Generates the source distribution as a .zip file">
<zip zipfile="${dist.dir}/${project.name}-${project.version.package-name-suffix}-src.zip">
<zipfileset dir="${java.antlet:dist.source.dir}"
prefix="${project.name}-${project.version.package-name-suffix}" >
<include name="**"/>
</zipfileset>
</zip>
</target>
<!-- =================================================================== -->
<!-- Packages the source distribution with .tar.gzip -->
<!-- =================================================================== -->
<target name="dist-src-tgz" depends="dist-src"
description="Generates the source distribution as a .tar.gz file">
<tar tarfile="${dist.dir}/${project.name}-${project.version.package-name-suffix}-src.tar"
longfile="gnu">
<tarfileset dir="${java.antlet:dist.source.dir}"
prefix="${project.name}-${project.version.package-name-suffix}">
<include name="**"/>
</tarfileset>
</tar>
<gzip zipfile="${dist.dir}/${project.name}-${project.version.package-name-suffix}-src.tar.gz"
src="${dist.dir}/${project.name}-${project.version.package-name-suffix}-src.tar"/>
<delete file="${dist.dir}/${project.name}-${project.version.package-name-suffix}-src.tar"
quiet="true"
failonerror="false" />
</target>
<!-- =================================================================== -->
<!-- Overide this to preform task before the dist but after the dist-clean -->
<!-- =================================================================== -->
<target name="pre-dist" />
<!-- =================================================================== -->
<!-- Creates the binary distribution -->
<!-- =================================================================== -->
<target name="dist-bin" depends="package,pre-dist"
description="Prepares the binary distribution"><!-- dist-ReleaseNotes" -->
<mkdir dir="${dist.dir}"/>
<mkdir dir="${java.antlet:dist.bin.dir}"/>
<!-- copy project jar -->
<copy todir="${java.antlet:dist.bin.dir}" filtering="off">
<fileset dir="${project.build.dir}" casesensitive="no">
<patternset>
<include name="${project.version.package-jar}"/>
</patternset>
</fileset>
</copy>
<!-- copy documentation -->
<mkdir dir="${project.build.dir}/docs"/>
<mkdir dir="${java.antlet:dist.bin.documentation.dir}"/>
<copy todir="${java.antlet:dist.bin.documentation.dir}" filtering="off">
<fileset dir="${project.build.dir}/docs"/>
</copy>
<!-- copy legal stuff -->
<copy todir="${java.antlet:dist.bin.dir}" filtering="off">
<fileset dir="." casesensitive="no">
<patternset>
<include name="legal/**"/>
</patternset>
</fileset>
</copy>
<!-- copy extra project info -->
<copy todir="${java.antlet:dist.bin.dir}" filtering="off">
<fileset dir="." casesensitive="no">
<patternset>
<include name="*.txt"/>
<include name="*.me"/>
</patternset>
</fileset>
</copy>
<!-- fix the crlf of the scripts -->
<fixcrlf srcdir="${java.antlet:dist.bin.dir}"
eol="lf" eof="remove">
<include name="bin/**/*"/>
<exclude name="bin/**/*.bat"/>
<exclude name="bin/**/*.cmd"/>
</fixcrlf>
<fixcrlf srcdir="${java.antlet:dist.bin.dir}"
eol="crlf" eof="add">
<include name="bin/**/*.bat"/>
<include name="bin/**/*.cmd"/>
</fixcrlf>
</target>
<!-- =================================================================== -->
<!-- Packages the binary distribution as .zip -->
<!-- =================================================================== -->
<target name="dist-bin-zip" depends="dist-bin"
description="Generates the binary distribution as a .zip file">
<zip zipfile="${dist.dir}/${project.name}-${project.version.package-name-suffix}-bin.zip">
<zipfileset dir="${java.antlet:dist.bin.dir}"
prefix="${project.name}-${project.version.package-name-suffix}" >
<include name="**"/>
</zipfileset>
</zip>
</target>
<!-- =================================================================== -->
<!-- Packages the binary distribution with .tar.gzip -->
<!-- =================================================================== -->
<target name="dist-bin-tgz" depends="dist-bin"
description="Generates the binary distribution as a .tar.gz file">
<tar tarfile="${dist.dir}/${project.name}-${project.version.package-name-suffix}-bin.tar"
longfile="gnu">
<tarfileset dir="${java.antlet:dist.bin.dir}"
prefix="${project.name}-${project.version.package-name-suffix}">
<include name="**"/>
</tarfileset>
</tar>
<gzip zipfile="${dist.dir}/${project.name}-${project.version.package-name-suffix}-bin.tar.gz"
src="${dist.dir}/${project.name}-${project.version.package-name-suffix}-bin.tar"/>
<delete file="${dist.dir}/${project.name}-${project.version.package-name-suffix}-bin.tar"
quiet="true" failonerror="false"/>
</target>
<!-- =================================================================== -->
<!-- Packages the jar distribution -->
<!-- =================================================================== -->
<target name="dist-jar" depends="package" if="src.code.present"
description="Generate a jar distribution">
<copy todir="${dist.dir}" filtering="off">
<fileset dir="${project.build.dir}" casesensitive="no">
<patternset>
<include name="${project.version.package-jar}"/>
</patternset>
</fileset>
</copy>
</target>
<!-- =================================================================== -->
<!-- Clean dist -->
<!-- =================================================================== -->
<target name="distclean" description="Cleans the distribution dir">
<delete dir="${dist.dir}"/>
<delete dir="${java.antlet:dist.source.dir}"/>
<delete dir="${java.antlet:dist.bin.dir}"/>
</target>
<!-- =================================================================== -->
<!-- Build all distributions -->
<!-- =================================================================== -->
<target name="dist"
depends="dist-info, distclean, pre-dist, dist-src-tgz, dist-src-zip, dist-bin-tgz, dist-bin-zip, dist-jar"
description="Generates all distributions (source/binary)">
<echo>Finished build a distribution of
${project.name} ${project.version.package-name-suffix}
The files are in ${dist.dir}
</echo>
</target>
<!-- =================================================================== -->
<!-- Build all distributions -->
<!-- =================================================================== -->
<target name="dist-info">
<echo>**********************************************</echo>
<echo>*</echo>
<echo>* Build all distributions:</echo>
<echo>* - source distribution for windows/unix.</echo>
<echo>* - binary distribution for windows/unix.</echo>
<echo>*</echo>
<echo>* This may take a while...</echo>
<echo>*</echo>
<echo>***********************************************</echo>
<echo/>
</target>
<!--
<target name="dist-ReleaseNotes" description="Generate Release note from status.xml">
<mkdir dir="${java.antlet:dist.bin.dir}"/>
<mkdir dir="${java.antlet:dist.source.dir}"/>
-->
<!-- status.xml -->
<!--
<xslt basedir="."
extension=".txt"
force ="false"
in="status.xml"
out="${java.antlet:dist.bin.dir}/ReleaseNotes.txt"
style="${java.antlet:dir}/resources/stylesheets/status2ReleaseNotes.xsl">
</xslt>
<copy todir="${java.antlet:dist.source.dir}" >
<fileset dir="${java.antlet:dist.bin.dir}">
<include name="ReleaseNotes.txt"/>
</fileset>
</copy>
</target>
-->
<!-- =================================================================== -->
<!-- Creates the API documentation -->
<!-- =================================================================== -->
<target name="javadocs"
description="Generates the API documentation in javadoc format">
<if>
<not> <isset property="java.antlet:javadoc.overview"/></not>
<then>
<style in="module.xml"
out="${java.antlet:work.dir}/javadocs/overview.html"
style="${java.antlet:dir}/resources/stylesheets/module2overview.xsl">
</style>
<property name="java.antlet:javadoc.overview"
value="${java.antlet:work.dir}/javadocs/overview.html"/>
</then>
</if>
<mkdir dir="${java.antlet:javadocs.dir}"/>
<javadoc packagenames="${viprom:/module/project[@name=$project.name]/package}.*"
sourcepath="${project.src.dir}"
destdir="${java.antlet:javadocs.dir}"
author="true"
version="true"
use="true"
failonerror="true"
noindex="true"
overview="${java.antlet:javadoc.overview}"
source= "${build.compiler.source}"
group="${java.antlet:javadocs.group}"
windowtitle="${project.name} ${project.version.package-version} API"
stylesheetfile="${java.antlet:dir}/resources/stylesheets/javadoc.css">
<classpath>
<path refid="${project.name}.classpath"/>
</classpath>
<doctitle>${project.name} ${project.version.package-version} API</doctitle>
<bottom><![CDATA[<center><i>Copyright © ${YEAR} ${xgump.module.vendor}. All Rights Reserved.</i></center>]]></bottom>
<header><![CDATA[${project.name} ${project.version.package-version}]]></header>
<footer><![CDATA[${project.name} ${project.version.package-version}]]></footer>
<tag name="todo" scope="all" description="To do:" />
<link offline="true"
href="http://java.sun.com/products/jdk/1.4/docs/api/"
packagelistLoc="${java.antlet:dir}/resources/jdk14-project.version.package-list"/>
</javadoc>
</target>
<!-- =================================================================== -->
<!-- Centipede splash -->
<!-- =================================================================== -->
<target name="splash" description="Centipede gui splash screen">
<pathconvert pathsep="," property="centipede.gif.url">
<path>
<filelist dir="./${java.antlet:dir}/resources/images" files="centipede.gif"/>
</path>
</pathconvert>
<condition property="gui.safe">
<not>
<os family="unix" />
</not>
</condition>
<if>
<equals arg1="${gui.safe}" arg2="true" />
<then>
<splash imageurl="file:/${centipede.gif.url}" showduration="100"/>
</then>
<else>
<echo message="Unix OS found. Gui splash disabled." />
</else>
</if>
</target>
<!-- =================================================================== -->
<!-- Fix line endings in src -->
<!-- =================================================================== -->
<target name="-fixsrclf" description="Fix lf in src directory (internal use only!)">
<fixcrlf srcdir="${project.src.dir}" includes="**/*.java" eol="lf"/>
</target>
<!-- ============================================= -->
<!-- Transforms document descriptors in documents -->
<!-- ==============================================-->
<target name="descriptor-docs" description="Transforms document and antlet descriptors' info in documents">
<property name="java.antlet:antletdocs.work.dir" value="${java.antlet:work.dir}/contents/xdocs/centipede"/>
<property name="java.antlet:xdocs.dir" value="${forrest.antlet.generated.xdocs.dir}/centipede"/>
<delete dir="${java.antlet:xdocs.dir}"/>
<mkdir dir="${java.antlet:xdocs.dir}"/>
<delete dir="${java.antlet:antletdocs.work.dir}"/>
<mkdir dir="${java.antlet:antletdocs.work.dir}"/>
<!-- module.xml -->
<xslt basedir="."
destdir="${java.antlet:xdocs.dir}"
extension=".xml"
force ="true"
style="${java.antlet:dir}/resources/stylesheets/module2document.xsl">
<include name="module.xml"/>
</xslt>
<!-- status.xml -->
<xslt basedir="."
destdir="${java.antlet:xdocs.dir}"
extension=".xml"
force ="true"
style="${java.antlet:dir}/resources/stylesheets/status2document.xsl">
<include name="status.xml"/>
</xslt>
<!-- properties.xml -->
<xslt basedir="."
destdir="${java.antlet:xdocs.dir}"
extension=".xml"
force ="true"
style="${java.antlet:dir}/resources/stylesheets/properties2document.xsl">
<include name="properties.xml"/>
</xslt>
<!-- build.xml -->
<xslt basedir="."
destdir="${java.antlet:xdocs.dir}"
extension=".xml"
force ="true"
style="${java.antlet:dir}/resources/stylesheets/build2document.xsl">
<include name="build.xml"/>
</xslt>
<copy todir="${java.antlet:xdocs.dir}">
<fileset dir="${java.antlet:dir}/resources/content">
<include name="*.xml"/>
</fileset>
</copy>
</target>
<!-- ============================================= -->
<!-- Create about html page -->
<!-- ==============================================-->
<!--
<target name="about" description="Transforms document and antlet descriptors' info in documents">
<property name="java.antlet:about.dir" value="${project.build.dir}/docs/"/>
<xslt basedir="."
out="${java.antlet:about.dir}/about.html"
in="module.xml"
force ="true"
style="${java.antlet:dir}/resources/stylesheets/module2about.xsl">
</xslt>
</target>
-->
</project>
-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
Free Linux Tutorials. Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.