build.xml
author Markus Bröker <mbroeker@largo.homelinux.org>
Tue, 12 May 2009 21:20:30 +0200
changeset 8 34a247829246
parent 6 ad18534e08fd
child 9 506c7ab82d39
permissions -rw-r--r--
NEW SSL Certificate

<?xml version="1.0"?>
<project name="Schach" basedir="." default="jar">
	<property name="project" value="Schach" />
	<property name="package.name" value="org.homelinux.largo" />
	<property name="package.dir" value="org/homelinux/largo" />
	<property name="jar.file" value="bin/games.jar" />
	<property name="classpath.dir" value="/usr/local/lib/classes" />
	<property name="www.dir" value="/var/www/localhost/htdocs/classes" />
	<property name="docs.dir" value="doc/" />
	<property name="debug" value="simu" />

	<property name="distributable.exts"
		value="**/*.class,**/*.gif,**/*.html,**/*.jar,**/*.jnlp,**/*.jpg,**/*.png" />
	<path id="Schach.classpath">
		<pathelement location="." />
	</path>

	<!-- Targets -->
	<target name="clean">
		<echo
			message="deleting all class- and jar-files  in ${package.dir} tree" />
		<delete>
			<fileset dir="${package.dir}" includes="**/*.class" />
			<fileset dir="." includes="**/*.*~" defaultexcludes="no" />
		</delete>

		<delete file="${jar.file}" />
	</target>

	<target name="docs"
	    depends="compile,docs-init"
    	description="Generate JavaDocs.">

	    <javadoc destdir="${docs.dir}"
    	    author="true"
        	version="true"
	        use="true"
    	    windowtitle="${ant.project.name}"
        	sourcepathref="Schach.classpath"
	        packagenames="org.*"
    	    verbose="false">
        	<doctitle><![CDATA[<h1>${ant.project.name}</h1>]]></doctitle>
	        <bottom>
    	        <![CDATA[<i>Developed by Largo Enterprises in 2008</i>]]>
        	</bottom>
	    </javadoc>
	</target>

	<target name="docs-init">
	    <mkdir dir="${docs.dir}"/>
	</target>

	<target name="docs-clean">
    	<delete dir="${docs.dir}"/>
	</target>

	<target name="compile">
		<echo message="compiling ${package.dir} tree." />
		<javac source="1.5" target="1.5" srcdir="${package.dir}"
			sourcepath="${basedir}" debug="on">
			<classpath refid="Schach.classpath" />
		</javac>
	</target>

	<target name="jar" depends="compile">
		<property environment="env" />
		<jar destfile="${jar.file}" basedir="${basedir}"
			includes="org/ images/"
			manifest="schach.manifest" />
	</target>

	<target name="post" depends="jar">
		<signjar jar="${jar.file}" alias="spectre" storepass="${env.jsp}" />
		<copy file="${jar.file}" todir="${www.dir}"/>
	</target>

	<target name="debug" depends="compile">
		<java classname="org.homelinux.largo.schach.Schach"
			failonerror="true" fork="yes">
			<classpath refid="Schach.classpath" />
			<arg line="${debug}" />
		</java>
	</target>

	<target name="checkers" depends="compile">
		<java classname="org.homelinux.largo.checkers.Checkers"
			failonerror="true" fork="yes">
			<classpath refid="Schach.classpath" />
			<arg line="${debug}" />
		</java>
	</target>
</project>