build.xml
changeset 0 e0dbaef72362
child 2 f4add19ab159
equal deleted inserted replaced
-1:000000000000 0:e0dbaef72362
       
     1 <?xml version="1.0"?>
       
     2 <project name="Schach" basedir="." default="jar">
       
     3 	<property name="project" value="Schach" />
       
     4 	<property name="package.name" value="org.homelinux.largo" />
       
     5 	<property name="package.dir" value="org/homelinux/largo" />
       
     6 	<property name="jar.file" value="bin/games.jar" />
       
     7 	<property name="classpath.dir" value="/usr/local/lib/classes" />
       
     8 	<property name="www.dir" value="/var/www/localhost/htdocs/classes" />
       
     9 	<property name="docs.dir" value="docs/" />
       
    10 	<property name="debug" value="simu" />
       
    11 
       
    12 	<property name="distributable.exts"
       
    13 		value="**/*.class,**/*.gif,**/*.html,**/*.jar,**/*.jnlp,**/*.jpg,**/*.png" />
       
    14 	<path id="Schach.classpath">
       
    15 		<pathelement location="." />
       
    16 	</path>
       
    17 
       
    18 	<!-- Targets -->
       
    19 	<target name="clean">
       
    20 		<echo
       
    21 			message="deleting all class- and jar-files  in ${package.dir} tree" />
       
    22 		<delete>
       
    23 			<fileset dir="${package.dir}" includes="**/*.class" />			
       
    24 		</delete>
       
    25 
       
    26 		<delete file="${jar.file}" />
       
    27 	</target>
       
    28 
       
    29 	<target name="docs"
       
    30 	    depends="compile,docs-init"
       
    31     	description="Generate JavaDocs.">
       
    32 
       
    33     <javadoc destdir="${docs.dir}"
       
    34         author="true"
       
    35         version="true"
       
    36         use="true"
       
    37         windowtitle="${ant.project.name}"
       
    38         sourcepathref="Schach.classpath"
       
    39         packagenames="org.*"
       
    40         verbose="false">
       
    41         <doctitle><![CDATA[<h1>${ant.project.name}</h1>]]></doctitle>
       
    42         <bottom>
       
    43             <![CDATA[<i>Developed by Largo Enterprises in 2008</i>]]>
       
    44         </bottom>
       
    45     </javadoc>
       
    46 
       
    47 	</target>
       
    48 		<target name="docs-init">
       
    49 		    <mkdir dir="${docs.dir}"/>
       
    50 		</target>
       
    51 
       
    52 	<target name="docs-clean">
       
    53     	<delete dir="${docs.dir}"/>
       
    54 	</target>
       
    55 
       
    56 	<target name="compile">
       
    57 		<echo message="compiling ${package.dir} tree." />
       
    58 		<javac source="1.5" target="1.5" srcdir="${package.dir}"
       
    59 			sourcepath="${basedir}" debug="on">
       
    60 			<classpath refid="Schach.classpath" />
       
    61 		</javac>
       
    62 	</target>
       
    63 
       
    64 	<target name="jar" depends="compile">
       
    65 		<property environment="env" />
       
    66 		<jar destfile="${jar.file}" basedir="${basedir}"
       
    67 			includes="org/ images/" 
       
    68 			manifest="schach.manifest" />
       
    69 	</target>
       
    70 
       
    71 	<target name="post" depends="jar">
       
    72 		<signjar jar="${jar.file}" alias="largo" storepass="${env.jsp}" />
       
    73 		<copy file="${jar.file}" todir="${www.dir}"/>
       
    74 	</target>
       
    75 
       
    76 	<target name="debug" depends="compile">
       
    77 		<java classname="org.homelinux.largo.schach.Schach"
       
    78 			failonerror="true" fork="yes">
       
    79 			<classpath refid="Schach.classpath" />
       
    80 			<arg line="${debug}" />
       
    81 		</java>
       
    82 	</target>
       
    83 
       
    84 	<target name="checkers" depends="compile">
       
    85 		<java classname="org.homelinux.largo.checkers.Checkers"
       
    86 			failonerror="true" fork="yes">
       
    87 			<classpath refid="Schach.classpath" />
       
    88 			<arg line="${debug}" />
       
    89 		</java>
       
    90 	</target>
       
    91 </project>