rmihello/build.xml
changeset 92 0bc2646daa82
equal deleted inserted replaced
91:1181deef3bd6 92:0bc2646daa82
       
     1 <?xml version="1.0"?>
       
     2 <project name="Hello" basedir="." default="jar">
       
     3 	<property name="project" value="Hello" />
       
     4 	<property name="package.name" value="example.hello" />
       
     5 	<property name="package.dir" value="example/hello" />
       
     6 	<property name="jar.file" value="bin/hello.jar" />
       
     7 	<property name="classpath.dir" value="/usr/local/lib/classes" />
       
     8 	<property name="www.dir" value="/var/www/localhost/htdocs/classes" />
       
     9 
       
    10 	<property name="distributable.exts"
       
    11 		value="**/*.class,**/*.gif,**/*.html,**/*.jar,**/*.jnlp,**/*.jpg,**/*.png" />
       
    12 	<path id="classpath">
       
    13 		<pathelement location="." />
       
    14 	</path>
       
    15 
       
    16 	<!-- Targets -->
       
    17 	<target name="clean">
       
    18 		<echo
       
    19 			message="deleting all class- and jar-files  in ${package.dir} tree" />
       
    20 		<delete>
       
    21 			<fileset dir="${package.dir}" includes="**/*.class" />
       
    22 			<fileset dir="." includes="**/*.*~" defaultexcludes="no" />
       
    23 		</delete>
       
    24 
       
    25 		<delete file="${jar.file}" />
       
    26 	</target>
       
    27 
       
    28 	<target name="compile">
       
    29 		<echo message="compiling ${package.dir} tree." />
       
    30 		<javac source="1.5" target="1.5" srcdir="${package.dir}"
       
    31 			sourcepath="${basedir}" debug="on">
       
    32 			<classpath refid="classpath" />
       
    33 		</javac>
       
    34 	</target>
       
    35 
       
    36 	<target name="jar" depends="compile">
       
    37 		<property environment="env" />
       
    38 		<jar destfile="${jar.file}" basedir="${basedir}"
       
    39 			includes="example/"
       
    40 			manifest="${project}.manifest" />
       
    41 	</target>
       
    42 
       
    43 	<target name="post" depends="jar">
       
    44 		<signjar jar="${jar.file}" alias="spectre" storepass="${env.jsp}" />
       
    45 		<copy file="${jar.file}" todir="${www.dir}"/>
       
    46 	</target>
       
    47 
       
    48 	<target name="client" depends="compile">
       
    49 		<java classname="${package.name}.Client"
       
    50 			failonerror="true" fork="yes">
       
    51 			<classpath refid="classpath" />
       
    52 		</java>
       
    53 	</target>
       
    54 
       
    55 	<target name="server" depends="compile">
       
    56 		<java classname="${package.name}.Server"
       
    57 			failonerror="true" fork="yes">
       
    58 			<classpath refid="classpath" />
       
    59 		</java>
       
    60 	</target>
       
    61 </project>