build.xml
author ryan
Tue, 30 Jun 2009 15:24:45 -0400
branchcurrent-development
changeset 452 a86c195127e7
parent 451 8c0ed7ace773
child 464 0b530da363dd
permissions -rw-r--r--
build.xml tweaks (more exclusions)

modified launcher to not try and svn update

rebuilt launcher executable (repdev.exe)

generated dist (not included in version control)
     1 <project name="RepDev" default="dist" basedir=".">
     2 	<description>
     3         Creates a /bin directory that other people can checkout just for testing purposes
     4     </description>
     5 	<!-- set global properties for this build -->
     6 	<property name="src" location="./" />
     7 	<property name="build" location="bin" />
     8 	<property name="dist" location="dist" />
     9 
    10 	<target name="init">
    11 		<!-- Create the time stamp -->
    12 		<tstamp />
    13 		<!-- Create the build directory structure used by compile -->
    14 		<mkdir dir="${build}" />
    15 		<buildnumber file="dist/build.number" />
    16 	</target>
    17 
    18 
    19 	<target name="compile" depends="init" description="compile the source ">
    20 		<!-- Compile the java code from ${src} into ${build} -->
    21 		<javac srcdir="${src}" destdir="${build}" />
    22 	</target>
    23 	
    24 	<target name="dist" description="generate the distribution">
    25 		<!-- Create the distribution directory -->
    26 		<mkdir dir="${dist}" />
    27 
    28 		<!-- Put everything in ${build} into the MyProject-${DSTAMP}.jar file -->
    29 		<!-- <jar jarfile="${dist}/RepDev-${DSTAMP}.jar" basedir="${build}"/> -->
    30 
    31 		<delete>
    32 		 <fileset dir="${dist}" >
    33 		 	<include name="**/*.class"/>
    34   		 </fileset>
    35 		</delete>
    36 		
    37 		<copy todir="${dist}" overwrite="true">
    38 			<fileset dir="${src}">
    39 				<exclude name="**/*.java" />
    40 				<exclude name="**/*.conf" />
    41 				<exclude name="**/bin/**" />
    42 				<exclude name="**/dist/**" />
    43 				<exclude name="**/backup/**" />
    44 				<exclude name="**/swt-lin/**" />
    45                 <exclude name="**/.settings/**" />
    46                 <exclude name="**/.svn/**" />
    47                 <exclude name="**/.hg/**" />
    48 			</fileset>
    49 		</copy>
    50 		
    51 		<delete dir="${build}" />
    52 		<delete dir="${dist}/bin" />
    53 		<delete dir="${dist}/backup" />
    54 		<delete dir="${dist}/dist" />
    55 		
    56 		<!-- Now that the config is in the main folder, dont dist it -->
    57 		<delete file="${dist}/repdev.conf"/>
    58 		<delete file="${dist}/.hgignore"/>
    59 		<delete file="${dist}/.classpath"/>
    60 		<delete file="${dist}/.project"/>
    61 		<delete file="${dist}/stdout.txt"/>
    62 		<delete file="${dist}/stderr.txt"/>
    63 		
    64 	</target>
    65 
    66 	<target name="clean" description="clean up">
    67 		<!-- Delete the ${build} and ${dist} directory trees -->
    68 		<delete dir="${build}" />
    69 		<delete dir="${dist}" />
    70 	</target>
    71 	
    72 	<target name="Launcher-jar" description="Make a jar of the launcher">
    73 		<jar jarfile="com/repdev/launcher/launcher.jar" 
    74 			basedir="com/repdev/launcher/"
    75 			excludes="*.jar,*.zip"
    76 			manifest="${src}/com/repdev/launcher/manifest.mf" />
    77 	</target>
    78 	
    79 </project>