2009-05-31 17:23:49 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								<project name="OpenRocket" basedir=".">
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2012-01-11 03:15:10 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									<property file="resources/build.properties" />
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-09 16:56:52 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-01 15:25:04 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									<property name="src.dir"    	value="src"/>		<!-- Source directory -->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									<property name="src-test.dir"	value="test"/>		<!-- Test directory -->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									<property name="build.dir"   	value="build"/>		<!-- Build directory -->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									<property name="build-test.dir" value="build/test"/><!-- Build directory -->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										
							 | 
						
					
						
							
								
									
										
										
										
											2009-05-31 17:23:49 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									<!-- Distribution directory, from which stuff is jar'ed -->
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-01 15:25:04 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									<property name="dist.dir"    	value="${build.dir}/dist"/> 
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									<property name="dist-test.dir"	value="${build.dir}/dist-test"/>
							 | 
						
					
						
							
								
									
										
										
										
											2009-05-31 17:23:49 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									<property name="classes.dir" value="${dist.dir}"/>	<!-- Directory for classes -->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									<property name="jar.dir"     value="${build.dir}/jar"/>	<!-- Directory for built jar's -->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									<property name="lib.dir"     value="lib"/>				<!-- Library source directory -->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-09 18:27:33 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									<property name="pkgname"     value="${ant.project.name}-${build.version}"/>
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-09 16:56:52 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									<property name="jar.file"    value="${jar.dir}/${ant.project.name}.jar"/>
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-09 18:27:33 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									<property name="dist.bin"    value="${jar.dir}/${pkgname}.jar"/>
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									<property name="dist.src"    value="${jar.dir}/${pkgname}-src.zip"/>
							 | 
						
					
						
							
								
									
										
										
										
											2009-05-31 17:23:49 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									<!-- The main class of the application -->
							 | 
						
					
						
							
								
									
										
										
										
											2009-05-31 17:50:09 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									<property name="main-class"  value="net.sf.openrocket.startup.Startup"/>
							 | 
						
					
						
							
								
									
										
										
										
											2009-05-31 17:23:49 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-26 17:06:37 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									<!-- Classpath definitions -->
							 | 
						
					
						
							
								
									
										
										
										
											2009-05-31 17:23:49 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									<path id="classpath">
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										<fileset dir="${lib.dir}" includes="**/*.jar"/>
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									</path>
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-26 17:06:37 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									<path id="test-classpath">
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										<path refid="classpath"/>
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-04 15:46:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										<pathelement location="${basedir}"/>
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-26 17:06:37 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										<pathelement location="${build-test.dir}"/>
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										<pathelement location="${classes.dir}"/>
							 | 
						
					
						
							
								
									
										
										
										
											2010-03-20 13:36:07 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										<pathelement location="${src-test.dir}"/>
							 | 
						
					
						
							
								
									
										
										
										
											2011-01-09 09:01:02 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										<fileset dir="lib-test/" includes="*.jar"/>
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-26 17:06:37 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									</path>
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-01 15:25:04 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-09 16:56:52 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									
							 | 
						
					
						
							
								
									
										
										
										
											2009-05-31 17:23:49 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									<!-- CLEAN -->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									<target name="clean">
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										<delete dir="${build.dir}"/>
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-26 17:06:37 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										<delete dir="tmp/"/>
							 | 
						
					
						
							
								
									
										
										
										
											2009-05-31 17:23:49 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									</target>
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-09 16:56:52 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									
							 | 
						
					
						
							
								
									
										
										
										
											2009-05-31 17:23:49 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									<!-- BUILD -->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									<target name="build">
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										<mkdir dir="${classes.dir}"/>
							 | 
						
					
						
							
								
									
										
										
										
											2010-07-17 22:52:23 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										<echo level="info">Compiling main classes</echo>
							 | 
						
					
						
							
								
									
										
										
										
											2012-01-08 02:01:43 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										<javac debug="true" srcdir="${src.dir}" destdir="${classes.dir}" classpathref="classpath"/>
							 | 
						
					
						
							
								
									
										
										
										
											2009-05-31 17:23:49 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									</target>
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-09 16:56:52 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									
							 | 
						
					
						
							
								
									
										
										
										
											2009-05-31 17:23:49 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									<!-- JAR -->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									<target name="jar" depends="build">
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										<copy todir="${dist.dir}/">
							 | 
						
					
						
							
								
									
										
										
										
											2012-01-11 03:15:10 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											<fileset dir="." includes="LICENSE.TXT README.TXT ChangeLog ReleaseNotes fileformat.txt" />
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											<fileset dir="resources/" includes="datafiles/ pix/ l10n/ build.properties" />
							 | 
						
					
						
							
								
									
										
										
										
											2011-08-12 19:53:00 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											<fileset dir="src/" includes="META-INF/" />
							 | 
						
					
						
							
								
									
										
										
										
											2009-05-31 17:23:49 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
										</copy>
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										<mkdir dir="${jar.dir}"/>
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-09 16:56:52 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										<jar destfile="${jar.file}" basedir="${dist.dir}">
							 | 
						
					
						
							
								
									
										
										
										
											2009-05-31 17:23:49 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
											<manifest>
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												<attribute name="Main-Class" value="${main-class}"/>
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												<attribute name="SplashScreen-Image" value="pix/splashscreen.png"/>
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											</manifest>
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											<zipfileset src="lib/miglayout15-swing.jar" />
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											<zipfileset src="lib/jcommon-1.0.16.jar" />
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											<zipfileset src="lib/jfreechart-1.0.13.jar" />
							 | 
						
					
						
							
								
									
										
										
										
											2011-01-09 09:01:02 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											<zipfileset src="lib/iText-5.0.2.jar" />
							 | 
						
					
						
							
								
									
										
										
										
											2009-05-31 17:23:49 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
										</jar>
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									</target>
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-09 16:56:52 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									<!-- DIST-SRC -->
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-26 17:06:37 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									<target name="dist-src">
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-09 16:56:52 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										<echo>			
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										Building source distribution
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										</echo>
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-09 18:27:33 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										<mkdir dir="${build.dir}/${pkgname}"/>
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-09 16:56:52 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										<mkdir dir="${jar.dir}"/>
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-09 18:27:33 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										<copy todir="${build.dir}/${pkgname}">
							 | 
						
					
						
							
								
									
										
										
										
											2011-08-12 19:53:00 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											<fileset dir="." includes="*" excludes="*.log">
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-09 16:56:52 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												<type type="file"/>
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											</fileset>
							 | 
						
					
						
							
								
									
										
										
										
											2012-01-11 03:15:10 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											<fileset dir="" includes="resources/datafiles/ lib/ lib-test/ resources/pix/ src/ test/ resources/l10n/"/>
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-09 18:27:33 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										</copy>
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										<zip destfile="${dist.src}" basedir="${build.dir}" includes="${pkgname}/"/>
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										<delete dir="${build.dir}/${pkgname}"/>
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-09 16:56:52 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									</target>
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									<!-- DIST-SRC-TEST -->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									<target name="dist-src-test" depends="dist-src">
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										<echo>
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										Testing source distribution
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										</echo>
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-01 15:25:04 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										<delete dir="${dist-test.dir}"/>
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										<mkdir dir="${dist-test.dir}"/>
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										<unzip dest="${dist-test.dir}" src="${dist.src}"/>
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										<ant dir="${dist-test.dir}/${pkgname}" antfile="build.xml" target="jar"/>
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										<ant dir="${dist-test.dir}/${pkgname}" antfile="build.xml" target="unittest"/>
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										<delete dir="${dist-test.dir}"/>
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-09 16:56:52 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										<echo>
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-01 15:25:04 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										Source distribution test successful
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-09 16:56:52 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										</echo>
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									</target>	
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									<!-- DIST-BIN -->
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-10 13:13:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									<target name="dist-bin" depends="check,clean,unittest,jar">
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-09 16:56:52 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										<move file="${jar.file}" tofile="${dist.bin}"/>
							 | 
						
					
						
							
								
									
										
										
										
											2009-05-31 17:23:49 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									</target>
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-09 16:56:52 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									<!-- DIST -->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									<target name="dist" depends="dist-bin,dist-src,dist-src-test">
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										<echo>Distribution ${build.version} (${build.source}) built into directory ${jar.dir}</echo>
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									</target>
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-01 15:25:04 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-10 13:13:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									<!-- CHECK -->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									<target name="check" depends="checktodo,checkascii"/>
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-01 15:25:04 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									<!-- CHECK TODOs -->
							 | 
						
					
						
							
								
									
										
										
										
											2010-02-17 20:37:35 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									<target name="todo" depends="checktodo"/>
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-01 15:25:04 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									<target name="checktodo">
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										<tempfile property="todo.file" prefix="checktodo-"/>
							 | 
						
					
						
							
								
									
										
										
										
											2011-05-14 20:21:36 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										<echo>Checking project for FIXMEs.</echo>
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-01 15:25:04 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										<concat destfile="${todo.file}">
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											<fileset dir="${src.dir}">
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											    <include name="**/*.java"/>
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											</fileset>
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-10 13:13:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											<fileset dir="${src-test.dir}">
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											    <include name="**/*.java"/>
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											</fileset>
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-01 15:25:04 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											<filterchain>
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												<linecontainsregexp>
							 | 
						
					
						
							
								
									
										
										
										
											2011-05-14 20:21:36 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
													<regexp pattern="(FIXME|TODO:.*CRITICAL)"/>
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-01 15:25:04 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												</linecontainsregexp>
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											</filterchain>
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										</concat>
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										<loadfile srcfile="${todo.file}" property="criticaltodos"/>
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										<delete file="${todo.file}"/>
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										<fail if="criticaltodos">CRITICAL TODOs exist in project:
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								${criticaltodos}</fail>
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										<echo>No critical TODOs in project.</echo>
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									</target>
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-10 13:13:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									<!-- CHECK TODOs -->
							 | 
						
					
						
							
								
									
										
										
										
											2010-02-17 20:37:35 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									<target name="ascii" depends="checkascii"/>
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-10 13:13:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									<target name="checkascii">
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										<tempfile property="ascii.file" prefix="checkascii-"/>
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										<echo>Checking project for non-ASCII characters.</echo>
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										<concat destfile="${ascii.file}">
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											<fileset dir="${src.dir}">
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											    <include name="**/*.java"/>
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											</fileset>
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											<fileset dir="${src-test.dir}">
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											    <include name="**/*.java"/>
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											</fileset>
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											<filterchain>
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												<linecontainsregexp>
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													<regexp pattern="\P{ASCII}"/>
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												</linecontainsregexp>
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											</filterchain>
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										</concat>
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										<loadfile srcfile="${ascii.file}" property="nonascii"/>
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										<delete file="${ascii.file}"/>
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										<fail if="nonascii">Non-ASCII characters exist in project:
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								${nonascii}</fail>
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										<echo>No non-ASCII characters in project.</echo>
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									</target>
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-01 15:25:04 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									<!--  Unit tests  -->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									<target name="unittest" description="Execute unit tests" depends="build">
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										<echo>Building unit tests</echo>
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										<mkdir dir="${build-test.dir}"/>
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-04 15:46:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										<javac debug="true" srcdir="${src-test.dir}" destdir="${build-test.dir}" classpathref="test-classpath"/>
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-01 15:25:04 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										<echo>Running unit tests</echo>
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										<mkdir dir="tmp/rawtestoutput"/>
							 | 
						
					
						
							
								
									
										
										
										
											2010-03-20 13:36:07 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										<junit fork="yes" forkmode="once" printsummary="false" failureproperty="junit.failure">
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-26 17:06:37 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											<classpath>
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												<path refid="test-classpath"/>
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												<path location="${basedir}"/>
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											</classpath>
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-01 15:25:04 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											<batchtest todir="tmp/rawtestoutput">
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-26 17:06:37 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												<fileset dir="${build-test.dir}">
							 | 
						
					
						
							
								
									
										
										
										
											2010-03-20 13:36:07 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
													<include name="**/Test*.class" />
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													<include name="**/*Test.class" />
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-10 13:13:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
													<exclude name="**/*$*.class" />
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-26 17:06:37 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
													<exclude name="Test.class" />
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-01 15:25:04 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												</fileset>
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												<formatter type="xml"/>
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											</batchtest>
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										</junit>
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										<junitreport todir="tmp">
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											<fileset dir="tmp/rawtestoutput"/>
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											<report todir="tmp/test-reports"/>
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										</junitreport>
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-10 13:13:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										<fail if="junit.failure" message="Unit test(s) failed.  See report in ${basedir}/tmp/test-reports/index.html"/>
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										<echo>
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Unit tests passed successfully.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										</echo>
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-01 15:25:04 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								 	</target>
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    
							 | 
						
					
						
							
								
									
										
										
										
											2009-05-31 17:23:49 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								</project>
							 |