build.xml:
<
project
name
="cTrace"
default
="runie"
basedir
="."
>
<!-- Name of project and version -->
< property name ="proj.name" value ="cTrace" />
< property name ="proj.version" value ="1.0" />
<!-- Global properties for this build -->
< property name ="src.java.dir" value ="src" />
< property name ="lib.dir" value ="lib" />
< property name ="build.dir" value ="bin" />
< property name ="dist.dir" value ="dist" />
<!-- ================================ -->
< property name ="main.class" value ="com" />
< property name ="dest.dir" value ="C:\Inetpub\wwwroot\aes\cTrace\reports" />
< property name ="run.class" value ="com.aesclever.ctrace.packetview.PacketViewApplet" />
< property name ="ie.dir" value ="C:\Program Files\Internet Explorer" />
<!-- ================================ -->
<!-- Classpath declaration -->
< path id ="project.classpath" >
< fileset dir ="${lib.dir}" >
< include name ="**/*.jar" />
< include name ="**/*.zip" />
</ fileset >
</ path >
<!-- Useful shortcuts -->
< patternset id ="meta.files" >
< include name ="**/*.xml" />
< include name ="**/*.properties" />
</ patternset >
<!-- Clean up -->
< target name ="clean" >
< delete dir ="${build.dir}" />
< mkdir dir ="${build.dir}" />
< delete dir ="${dist.dir}" />
< mkdir dir ="${dist.dir}" />
</ target >
<!-- Compile Java source -->
< target name ="compile" depends ="clean" >
< mkdir dir ="${build.dir}" />
< javac srcdir ="${src.java.dir}" destdir ="${build.dir}" nowarn ="on" >
< classpath refid ="project.classpath" />
</ javac >
</ target >
<!-- Copy metadata to build classpath -->
< target name ="copymetafiles" >
< copy todir ="${build.dir}" >
< fileset dir ="${src.java.dir}" >
< patternset refid ="meta.files" />
</ fileset >
</ copy >
</ target >
<!-- Create Jar file -->
< target name ="dist" depends ="compile, copymetafiles" >
< jar destfile ="${dist.dir}/${proj.name}.jar" basedir ="${build.dir}" >
< manifest >
< attribute name ="Built-By" value ="${user.name}" />
< attribute name ="Main-Class" value ="${main.class}" />
</ manifest >
</ jar >
< jar destfile ="${dist.dir}/${proj.name}-src.jar" basedir ="${src.java.dir}" />
</ target >
<!-- Copy Jar file to destdir -->
< target name ="copy" depends ="dist" >
< copy todir ="${dest.dir}" >
< fileset dir ="${dist.dir}" >
</ fileset >
</ copy >
</ target >
<!-- Run IE -->
< target name ="runie" depends ="copy" >
< exec executable ="cmd.exe" dir ="${ie.dir}" >
< arg line ="/c iexplore" />
</ exec >
</ target >
<!-- Run cTrace -->
< target name ="run" depends ="compile, copymetafiles" description ="Build and run cTrace" >
< java fork ="true" classname ="${run.class}" classpathref ="project.classpath" >
< classpath path ="${build.dir}" />
</ java >
</ target >
</ project >
<!-- Name of project and version -->
< property name ="proj.name" value ="cTrace" />
< property name ="proj.version" value ="1.0" />
<!-- Global properties for this build -->
< property name ="src.java.dir" value ="src" />
< property name ="lib.dir" value ="lib" />
< property name ="build.dir" value ="bin" />
< property name ="dist.dir" value ="dist" />
<!-- ================================ -->
< property name ="main.class" value ="com" />
< property name ="dest.dir" value ="C:\Inetpub\wwwroot\aes\cTrace\reports" />
< property name ="run.class" value ="com.aesclever.ctrace.packetview.PacketViewApplet" />
< property name ="ie.dir" value ="C:\Program Files\Internet Explorer" />
<!-- ================================ -->
<!-- Classpath declaration -->
< path id ="project.classpath" >
< fileset dir ="${lib.dir}" >
< include name ="**/*.jar" />
< include name ="**/*.zip" />
</ fileset >
</ path >
<!-- Useful shortcuts -->
< patternset id ="meta.files" >
< include name ="**/*.xml" />
< include name ="**/*.properties" />
</ patternset >
<!-- Clean up -->
< target name ="clean" >
< delete dir ="${build.dir}" />
< mkdir dir ="${build.dir}" />
< delete dir ="${dist.dir}" />
< mkdir dir ="${dist.dir}" />
</ target >
<!-- Compile Java source -->
< target name ="compile" depends ="clean" >
< mkdir dir ="${build.dir}" />
< javac srcdir ="${src.java.dir}" destdir ="${build.dir}" nowarn ="on" >
< classpath refid ="project.classpath" />
</ javac >
</ target >
<!-- Copy metadata to build classpath -->
< target name ="copymetafiles" >
< copy todir ="${build.dir}" >
< fileset dir ="${src.java.dir}" >
< patternset refid ="meta.files" />
</ fileset >
</ copy >
</ target >
<!-- Create Jar file -->
< target name ="dist" depends ="compile, copymetafiles" >
< jar destfile ="${dist.dir}/${proj.name}.jar" basedir ="${build.dir}" >
< manifest >
< attribute name ="Built-By" value ="${user.name}" />
< attribute name ="Main-Class" value ="${main.class}" />
</ manifest >
</ jar >
< jar destfile ="${dist.dir}/${proj.name}-src.jar" basedir ="${src.java.dir}" />
</ target >
<!-- Copy Jar file to destdir -->
< target name ="copy" depends ="dist" >
< copy todir ="${dest.dir}" >
< fileset dir ="${dist.dir}" >
</ fileset >
</ copy >
</ target >
<!-- Run IE -->
< target name ="runie" depends ="copy" >
< exec executable ="cmd.exe" dir ="${ie.dir}" >
< arg line ="/c iexplore" />
</ exec >
</ target >
<!-- Run cTrace -->
< target name ="run" depends ="compile, copymetafiles" description ="Build and run cTrace" >
< java fork ="true" classname ="${run.class}" classpathref ="project.classpath" >
< classpath path ="${build.dir}" />
</ java >
</ target >
</ project >
|
|