<?xml version="1.0" encoding="UTF-8"?> <!-- Written to assume that classpath is rooted in the current directory. --> <!-- So this should be OK if you make this script in the root of a filesystem. --> <!-- If not, you may prefer to adjust the basedir, or move some directories around. --> <!-- The idea is that both Ant and NetBeans have to know what the package root is --> <!-- for the classes in your application. --> <project basedir="h:\cvs_work\perforce" default="compile_for_release" name="myapp"> <target name="init"> <!-- You can set up any variables you want used throughout the script here. --> <property name="root.dir" value="h:\cvs_work\perforce"/> <property name="classes.dir" value="${root.dir}\classes"/> <property name="src.dir" value="${root.dir}\src"/> <property name="p4.jar" value="${root.dir}\lib\p4.jar"/> <property name="jar.file" value="${root.dir}\bin\tp4branchview.jar"/> <property name="resources.dir" value="${root.dir}\resources"/> <property name="copy.jar.dest" value="G:\programme\perforce\tp4branchview.jar"/> <property name="dist.dir" value="H:\cvs_work\public_depot\guest\andrei_loskutov"/> <property name="dist.jar" value="H:\cvs_work\public_depot\guest\andrei_loskutov\tp4branchview.jar"/> <property name="dist.file" value="H:\cvs_work\public_depot\guest\andrei_loskutov\branchview.zip"/> <property name="dist.images" value="H:\cvs_work\public_depot\guest\andrei_loskutov\docu_images.zip"/> <!-- To use e.g. Jikes, uncomment this line. --> <!-- <property name="src.dir" value="${root.dir}\src"/> --> <!-- <property name="build.compiler" value="jikes"/> --> <!-- You might like to set up some overridable paths, etc.: --> <!-- <property name="mylib" value="../lib/mylib.jar"/> --> </target> <target depends="init" description="Compile everything." name="compile"> <!-- Both srcdir and destdir should be package roots. --> <!-- They could be different of course; in that case NetBeans can also be set --> <!-- up to compile to a different filesystem in the same way; see Compiler Types: --> <javac debug="true" optimize="false" deprecation="true" destdir="${classes.dir}"> <classpath> <pathelement location="${p4.jar}"/> </classpath> <src path="${src.dir}/Acme"/> <src path="${src.dir}/adiag"/> </javac> </target> <target depends="init" description="Compile everything." name="compile_for_release"> <!-- Both srcdir and destdir should be package roots. --> <!-- They could be different of course; in that case NetBeans can also be set --> <!-- up to compile to a different filesystem in the same way; see Compiler Types: --> <javac debug="false" optimize="true" deprecation="true" destdir="${classes.dir}"> <classpath> <pathelement location="${p4.jar}"/> </classpath> <src path="${src.dir}/Acme"/> <src path="${src.dir}/adiag"/> </javac> </target> <target depends="init" description="Compile everything." name="p4compile"> <!-- Both srcdir and destdir should be package roots. --> <!-- They could be different of course; in that case NetBeans can also be set --> <!-- up to compile to a different filesystem in the same way; see Compiler Types: --> <javac debug="true" optimize="true" deprecation="true" destdir="${classes.dir}"> <classpath> <pathelement location="${p4.jar}"/> </classpath> <src path="${src.dir}/Acme"/> <src path="${src.dir}/adiag"/> <src path="${src.dir}/com"/> </javac> </target> <target depends="init,compile" description="Jar everything." name="jar"> <copy file="${resources.dir}/todo.txt" tofile="${classes.dir}/todo.txt"/> <jar basedir="${classes.dir}" compress="true" jarfile="${jar.file}" manifest="${src.dir}/MANIFEST.MF"> <exclude name="**/*.java"/> <exclude name="com/**/*"/> <exclude name="**/p4api/*"/> <exclude name="**/*.form"/> </jar> <copy file="${copy.jar.dest}" tofile="${copy.jar.dest}.old"/> <copy file="${jar.file}" tofile="${copy.jar.dest}"/> </target> <target depends="init,compile_for_release" description="Jar everything." name="jar_release"> <copy file="${resources.dir}/todo.txt" tofile="${classes.dir}/todo.txt"/> <jar basedir="${classes.dir}" compress="true" jarfile="${jar.file}" manifest="${src.dir}/MANIFEST.MF"> <exclude name="**/*.java"/> <exclude name="com/**/*"/> <exclude name="**/p4api/*"/> <exclude name="**/*.form"/> </jar> <copy file="${copy.jar.dest}" tofile="${copy.jar.dest}.old"/> <copy file="${jar.file}" tofile="${copy.jar.dest}"/> </target> <target depends="jar_release" description="Zip everything." name="zip_release"> <copy file="${jar.file}" tofile="${dist.jar}"/> <jar basedir="${dist.dir}" compress="true" jarfile="${dist.file}" > <exclude name="**/*.gif"/> <exclude name="**/*.zip"/> <include name="**/*.htm*"/> <include name="**/*.css"/> <include name="**/*.txt"/> <include name="tp4branchview.jar"/> </jar> <delete file="${dist.jar}"/> <jar basedir="${dist.dir}" compress="true" jarfile="${dist.images}" > <include name="**/*.gif"/> </jar> </target> <target depends="init,p4compile" description="Jar everything." name="P4jar"> <copy todir="${classes.dir}" > <fileset dir="${resources.dir}" > <exclude name="**/*.java" /> </fileset> </copy> <jar basedir="${classes.dir}" compress="true" jarfile="${jar.file}" manifest="${src.dir}/MANIFEST.MF"> <exclude name="**/*.java"/> <exclude name="**/*.form"/> </jar> <copy file="${copy.jar.dest}" tofile="${copy.jar.dest}.old"/> <copy file="${jar.file}" tofile="${copy.jar.dest}"/> </target> <target depends="init" description="Javadoc for my API." name="javadoc"> <mkdir dir="doc"/> <javadoc destdir="apidoc" packagenames="com.foo.mylib.*,com.foo.myapi.*"> <sourcepath> <pathelement location="."/> </sourcepath> </javadoc> </target> <target depends="init" description="Clean all build products." name="clean"> <delete> <fileset dir="${classes.dir}"> <include name="**/*.class"/> </fileset> </delete> </target> <!--<delete file="myapp.jar"/> <delete dir="apidoc"/>--> <!-- <copy todir="${classes.dir}" > <fileset dir="${resources.dir}" > <exclude name="**/*.java" /> </fileset> </copy> --> </project>
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#3 | 2735 | andrei_loskutov | sources are now included to binary distribution at http://andrei.gmxhome.de/perforce/index.html | ||
#2 | 2554 | andrei_loskutov |
#25.12.2002 23:29 Revision 1.3.0.4 beta 1) Some small refactoring 2) First integration with P4eclipse: properties etc, thanks Boris Pr�ssmann 5) Better integration to Eclipse: use Eclipse internal compare tool for diff. 6) Fix some minor bugs. #14.12.2002 23:15 Revision 1.3.0.3 beta 1) Fix endless loop bug if p4 path was not set. 2) Fix never getting focus bug after error message shown 3) Fix painting bug on JDK 1.4.1 (must be verified!!!) 4) Some small refactoring 5) Fix error handling. 6) Fix some minor bugs. |
||
#1 | 2222 | andrei_loskutov |
#13.10.2002 22:16 Revision 1.2.1 1) Documentation task is finished... Yes!!! 2) New feature: copy P4 depot path 3) Some small fixes to menu shortkeys belongs ctrl + c and ctrl + d 4) Clipboard fix because of JDK 1.2 - 1.3 bug 5) Smallest refactoring on some methods. 6) Html help updated |