|
12 | 12 | <property name="md5-temp-name" value="classes/md5.properties" /> |
13 | 13 | <property name="md5-properties-path" value="edu/rice/cs/drjava/md5.properties" /> |
14 | 14 | <property name="main-class" value="edu.rice.cs.drjava.DrJava" /> |
15 | | - <property name="svn-repository" value="https://svn.code.sf.net/p/drjava/code" /> |
16 | 15 |
|
17 | 16 | <!-- Properties loaded from a file --> |
18 | 17 | <property name="props" value="../ant.properties" /> |
|
50 | 49 |
|
51 | 50 | <property name="is-development" value="yes" /> <!-- Development or stable release --> |
52 | 51 | <property name="tag-append" value="" /> <!-- "stable", "beta", or none --> |
53 | | - <property name="svn-working-dir" value="${basedir}" /> <!-- svn tree base --> |
54 | 52 |
|
55 | 53 | <!-- Don't use or inherit the CLASSPATH environment variable for anything --> |
56 | 54 | <property name="build.sysclasspath" value="ignore" /> |
|
100 | 98 | <echo message="variables may need to be defined (depending on the target invoked):" /> |
101 | 99 | <echo message="PATH: The 'javac' command is used for compilation;" /> |
102 | 100 | <echo message=" the 'java' command is used by default in testing/running; " /> |
103 | | - <echo message=" the 'svn' command is used to generate version numbers and " /> |
104 | | - <echo message=" in Subversion targets" /> |
105 | 101 | <echo message="JAVA5_HOME: Home folder of the Java 5 JRE or JDK (required for" /> |
106 | 102 | <echo message=" compiling and '-5' targets)" /> |
107 | 103 | <echo message="JAVA6_HOME: Home folder of the Java 6 JRE or JDK (required for" /> |
|
195 | 191 | <filter token="DEVELOPMENT" value="${development-value}" /> |
196 | 192 | <filter token="DATE" value="${DSTAMP}" /> |
197 | 193 | <filter token="TIME" value="${TSTAMP}" /> |
198 | | - <filter token="REVISION" value="${svn-revision}" /> |
199 | 194 | <echo message="Processing ${code-status-source}" /> |
200 | 195 | <copy file="${code-status-source}" tofile="${code-status-target}" filtering="yes" /> |
201 | 196 | <echo message="Processing ${version-source}" /> |
|
831 | 826 | </target> |
832 | 827 |
|
833 | 828 |
|
834 | | - <target name="benchmark" depends="benchmark-current, benchmark-previous, benchmark-report" |
| 829 | + <target name="benchmark" depends="benchmark-current, benchmark-report" |
835 | 830 | description="Generate a test performance report"> |
836 | 831 | </target> |
837 | 832 |
|
838 | | - <target name="benchmark-current" depends="resolve-is-modified" if="is-modified"> |
| 833 | + <target name="benchmark-current"> |
839 | 834 | <echo message="*****************************************" /> |
840 | 835 | <echo message="Running benchmark tests on the local copy" /> |
841 | 836 | <echo message="*****************************************" /> |
|
853 | 848 | <move todir="benchmarkResults/local" file="testResults" failonerror="no" /> |
854 | 849 | </target> |
855 | 850 |
|
856 | | - <target name="benchmark-previous"> |
857 | | - <mkdir dir="benchmarkSources" /> |
858 | | - |
859 | | - <echo message="Checking out the Subversion head revision" /> |
860 | | - <exec executable="svn" failonerror="yes"> |
861 | | - <arg value="checkout" /> |
862 | | - <arg value="--quiet" /> |
863 | | - <arg value="--revision" /> |
864 | | - <arg value="HEAD" /> |
865 | | - <arg value="${svn-repository}/trunk/${ant.project.name}" /> |
866 | | - <arg value="benchmarkSources" /> |
867 | | - </exec> |
868 | | - <antcall target="benchmark-single-previous"> |
869 | | - <param name="svn-working-dir" location="benchmarkSources" /> |
870 | | - </antcall> |
871 | | - |
872 | | - <math result="remaining-benchmark-count" datatype="int" |
873 | | - operand1="${benchmark-count}" operation="-" operand2="1" /> |
874 | | - <fornum count="${remaining-benchmark-count}" param="iteration"> |
875 | | - <sequential> |
876 | | - <antcall target="benchmark-revert" /> |
877 | | - <antcall target="benchmark-single-previous"> |
878 | | - <param name="svn-working-dir" location="benchmarkSources" /> |
879 | | - </antcall> |
880 | | - </sequential> |
881 | | - </fornum> |
882 | | - |
883 | | - <delete dir="benchmarkSources" /> |
884 | | - </target> |
885 | 851 |
|
886 | | - <target name="benchmark-single-previous" depends="resolve-svn-revision"> |
887 | | - <echo message="*****************************************" /> |
888 | | - <echo message="Running benchmark tests on revision ${svn-revision}" /> |
889 | | - <echo message="*****************************************" /> |
890 | | - |
891 | | - <!-- Change the build script text for builds that don't support test-output-to-file --> |
892 | | - <replaceregexp file="benchmarkSources/build.xml" flags="g" |
893 | | - match="<formatter[^>]*/>" |
894 | | - replace="<formatter type="xml" usefile="true"/>" /> |
895 | | - <!-- Eliminate taskdefs, which are apparently inherited (Ant complains otherwise) --> |
896 | | - <replaceregexp file="benchmarkSources/build.xml" flags="gs" |
897 | | - match="<taskdef[^>]*/>" replace="" /> |
898 | | - <mkdir dir="benchmarkResults/${svn-revision}" /> |
899 | | - |
900 | | - <trycatch property="benchmark-error"> |
901 | | - <try> |
902 | | - <!-- Must iterate tests *here* to support scripts that don't do test-repeat --> |
903 | | - <antcall target="iterate-tests"> |
904 | | - <param name="do-test-target" value="do-test-previous" /> |
905 | | - <param name="test-formatter" value="xml" /> |
906 | | - <!-- test-output-to-file is not inferred in some build scripts --> |
907 | | - <param name="test-output-to-file" value="yes" /> |
908 | | - </antcall> |
909 | | - </try> |
910 | | - <catch> |
911 | | - <echo message="Error occured during benchmark testing:${line.separator}${benchmark-error}" /> |
912 | | - </catch> |
913 | | - </trycatch> |
914 | | - |
915 | | - <!-- Restore sources to their original state --> |
916 | | - <trycatch> |
917 | | - <try> |
918 | | - <ant dir="benchmarkSources" target="clean" /> |
919 | | - </try> |
920 | | - <catch /> |
921 | | - </trycatch> |
922 | | - <exec executable="svn" dir="benchmarkSources" failonerror="yes"> |
923 | | - <arg value="revert" /> |
924 | | - <arg value="--quiet" /> |
925 | | - <arg value="build.xml" /> |
926 | | - </exec> |
927 | | - |
928 | | - <move todir="benchmarkResults/${svn-revision}" file="testResults" failonerror="no" /> |
929 | | - </target> |
930 | 852 |
|
931 | 853 | <target name="do-test-previous"> |
932 | 854 | <trycatch> |
|
951 | 873 | </trycatch> |
952 | 874 | </target> |
953 | 875 |
|
954 | | - <target name="benchmark-revert"> |
955 | | - <echo message="Updating benchmarkSources to a previous revision" /> |
956 | | - <fornum count="${benchmark-skip}" param="iteration"> |
957 | | - <sequential> |
958 | | - <exec executable="svn" dir="benchmarkSources" failonerror="yes"> |
959 | | - <arg value="update" /> |
960 | | - <arg value="--revision" /> |
961 | | - <arg value="PREV" /> |
962 | | - </exec> |
963 | | - </sequential> |
964 | | - </fornum> |
965 | | - </target> |
966 | | - |
967 | 876 | <target name="benchmark-report"> |
968 | 877 | <mkdir dir="docs/benchmark" /> |
969 | 878 | <!-- TODO - implement this. Report should be generated in docs/benchmark. --> |
|
999 | 908 | <fileset dir="${basedir}" defaultexcludes="no"> |
1000 | 909 | <include name="TEST*" /> |
1001 | 910 | <include name="src/**/*.class" /> |
1002 | | - <include name="svn-info.txt" /> |
1003 | 911 | <include name="findbugs-excludes.xml" /> |
1004 | | - <!-- We could get rid of backups, but "update" ignores them, so they're okay. |
1005 | | - (doesn't work if defaultexcludes is "yes") --> |
1006 | 912 | <!-- <include name="**/*~" /> --> |
1007 | 913 | <!-- Get rid of pesky OS helper files (doesn't work if defaultexcludes is "yes") --> |
1008 | 914 | <include name="**/.DS_Store" /> |
|
1037 | 943 | <delete file="rt.concjunit.jar" failonerror="${clean-can-fail}" /> |
1038 | 944 | </target> |
1039 | 945 |
|
1040 | | - |
1041 | | - <!-- ****************** |
1042 | | - Subversion Targets |
1043 | | - ****************** --> |
1044 | | - |
1045 | | - <target name="update" depends="clean" description="Reconcile source with the Subversion archive"> |
1046 | | - <echo message="Running Subversion update" /> |
1047 | | - <exec executable="svn" dir="${svn-working-dir}" failonerror="yes"> |
1048 | | - <arg value="update" /> |
1049 | | - </exec> |
1050 | | - <exec executable="svn" dir="${svn-working-dir}" failonerror="yes"> |
1051 | | - <arg value="status" /> |
1052 | | - </exec> |
1053 | | - </target> |
1054 | | - |
1055 | | - <target name="commit" depends="update, build" |
1056 | | - description="Commit source to the Subversion archive (after building)"> |
1057 | | - <antcall target="clean-intermediate"> <!-- Clean up after the latest build --> |
1058 | | - <param name="clean-can-fail" value="no" /> |
1059 | | - </antcall> |
1060 | | - <exec executable="svn" dir="${svn-working-dir}" failonerror="yes"> |
1061 | | - <arg value="status" /> |
1062 | | - </exec> |
1063 | | - <input message="Please enter a log message for the commit: " |
1064 | | - addproperty="svn-commit-message" /> |
1065 | | - <echo message="Running Subversion commit" /> |
1066 | | - <exec executable="svn" dir="${svn-working-dir}" failonerror="yes"> |
1067 | | - <arg value="commit" /> |
1068 | | - <arg value="-m" /> |
1069 | | - <arg value="${svn-commit-message}" /> |
1070 | | - </exec> |
1071 | | - </target> |
1072 | | - |
1073 | | - <target name="tag" depends="update, resolve-version-tag" unless="skip-tag" |
1074 | | - description="Copy the working copy to a new Subversion tag (after updating)"> |
1075 | | - <echo message="Creating a new Subversion tag with name ${version-tag}"/> |
1076 | | - <exec executable="svn" failonerror="yes"> |
1077 | | - <arg value="copy" /> |
1078 | | - <arg value="${basedir}" /> |
1079 | | - <arg value="${svn-repository}/tags/${version-tag}" /> |
1080 | | - <arg value="-m" /> |
1081 | | - <arg value="Created tag ${version-tag}" /> |
1082 | | - </exec> |
1083 | | - </target> |
1084 | | - |
1085 | | - <target name="branch" depends="update" |
1086 | | - description="Copy the working copy to a new Subversion branch (after updating)"> |
1087 | | - <echo message="This will create a new branch from your working copy. If there are changes " /> |
1088 | | - <echo message="in your copy that have not been committed, you may want to do so first, " /> |
1089 | | - <echo message="so that there's a clear branch point for merging later." /> |
1090 | | - <input message="Enter a name for the new branch: " |
1091 | | - addproperty="svn-branch-name" /> |
1092 | | - <echo message="Creating a new Subversion branch ${svn-branch-name}" /> |
1093 | | - <exec executable="svn" failonerror="yes"> |
1094 | | - <arg value="copy" /> |
1095 | | - <arg value="${basedir}" /> |
1096 | | - <arg value="${svn-repository}/branches/${svn-branch-name}" /> |
1097 | | - <arg value="-m" /> |
1098 | | - <arg value="Created branch ${svn-branch-name}" /> |
1099 | | - </exec> |
1100 | | - </target> |
1101 | | - |
1102 | | - |
1103 | 946 | <!-- *************** |
1104 | 947 | Release Targets |
1105 | 948 | *************** --> |
|
1141 | 984 | </target> |
1142 | 985 |
|
1143 | 986 | <target name="release" |
1144 | | - depends="update, build, tag, src-zip, jar-app, mac-app, windows-app, javadoc-zip" |
| 987 | + depends="build, jar-app, mac-app, windows-app, javadoc-zip" |
1145 | 988 | description="Make a development release"> |
1146 | 989 | <delete dir="${version-tag}" /> |
1147 | 990 | </target> |
1148 | 991 |
|
1149 | | - <target name="src-zip" depends="resolve-version-tag" unless="skip-tag"> |
1150 | | - <echo message="Creating ${version-tag}-src.zip" /> |
1151 | | - <exec executable="svn" failonerror="yes"> |
1152 | | - <arg value="export" /> |
1153 | | - <arg value="${svn-repository}/tags/${version-tag}" /> |
1154 | | - <arg value="${version-tag}/src" /> |
1155 | | - </exec> |
1156 | | - <zip destfile="${version-tag}-src.zip"> |
1157 | | - <zipfileset dir="${version-tag}/src" prefix="${version-tag}/src" /> |
1158 | | - </zip> |
1159 | | - </target> |
1160 | | - |
1161 | 992 | <target name="jar-app" depends="jar, assert-jar-exists, resolve-version-tag"> |
1162 | 993 | <echo message="Creating ${version-tag}.jar" /> |
1163 | 994 | <copy file="${ant.project.name}.jar" tofile="${version-tag}.jar" /> |
|
1262 | 1093 | </target> |
1263 | 1094 |
|
1264 | 1095 | <!-- Standardize all newline character sequences. Subversion takes care of this |
1265 | | - automatically, but sometimes files crop up with the wrong sequence. |
1266 | | - Use "svn status" after running this to see which files were fixed. --> |
| 1096 | + automatically, but sometimes files crop up with the wrong sequence.--> |
1267 | 1097 | <target name="fix-newlines" description="Standardize newline character sequences in all text files"> |
1268 | 1098 | <!-- If we're in Windows, use \r\n --> |
1269 | 1099 | <condition property="newline-code" value="crlf"> |
|
1654 | 1484 | value="edu.rice.cs.plt.ant.OneLineJUnitResultFormatter" /> |
1655 | 1485 | </target> |
1656 | 1486 |
|
1657 | | - <target name="resolve-version-tag" depends="resolve-svn-revision"> |
| 1487 | + <target name="resolve-version-tag"> |
1658 | 1488 | <!-- Get a timestamp based on GMT, rather than local time --> |
1659 | 1489 | <tstamp> |
1660 | 1490 | <format property="DSTAMP" pattern="yyyyMMdd" timezone="GMT" /> |
1661 | | - <format property="TSTAMP" pattern="HHmm" timezone="GMT" /> |
| 1491 | + <format property="TSTAMP" pattern="HHmmss" timezone="GMT" /> |
1662 | 1492 | <format property="TODAY" pattern="MMMM dd yyyy" timezone="GMT" /> |
1663 | 1493 | </tstamp> |
1664 | 1494 | <property name="version-tag" |
1665 | | - value="${ant.project.name}${tag-append}-${DSTAMP}-r${svn-revision}" /> |
| 1495 | + value="${ant.project.name}${tag-append}-${DSTAMP}-${TSTAMP}"/> |
1666 | 1496 | </target> |
1667 | 1497 |
|
1668 | | - <!-- Sets is-modified if "svn status" has non-empty output. --> |
1669 | | - <target name="resolve-is-modified" depends="clean"> |
1670 | | - <exec executable="svn" dir="${svn-working-dir}" failonerror="yes" outputproperty="svn-status"> |
1671 | | - <arg value="status" /> |
1672 | | - </exec> |
1673 | | - <condition property="is-modified"> |
1674 | | - <not> |
1675 | | - <equals arg1="${svn-status}" arg2="" /> |
1676 | | - </not> |
1677 | | - </condition> |
1678 | | - </target> |
1679 | | - |
1680 | | - <!-- Sets svn-revision to the current "Last Changed Rev" of "svn info". --> |
1681 | | - <target name="resolve-svn-revision"> |
1682 | | - <exec executable="svn" dir="${svn-working-dir}" failonerror="no" output="svn-info.txt"> |
1683 | | - <arg value="info" /> |
1684 | | - </exec> |
1685 | | - <loadfile property="svn-revision" srcfile="svn-info.txt"> |
1686 | | - <filterchain> |
1687 | | - <linecontains> |
1688 | | - <contains value="Last Changed Rev: " /> |
1689 | | - </linecontains> |
1690 | | - <replacestring from="Last Changed Rev: " to="" /> |
1691 | | - <striplinebreaks/> |
1692 | | - </filterchain> |
1693 | | - </loadfile> |
1694 | | - <delete file="svn-info.txt" /> |
1695 | | - </target> |
1696 | | - |
1697 | 1498 |
|
1698 | 1499 | <!-- Sets "already-generated" if "generate-file" is more recent than "generate-sourcefile"; |
1699 | 1500 | otherwise, the out-of-date target file is deleted (if it exists). Note that, since |
|
0 commit comments