LEFT | RIGHT |
1 <!-- Copyright (C) 2007 Google Inc. | 1 <!-- Copyright (C) 2007 Google Inc. |
2 - | 2 - |
3 - Licensed under the Apache License, Version 2.0 (the "License"); | 3 - Licensed under the Apache License, Version 2.0 (the "License"); |
4 - you may not use this file except in compliance with the License. | 4 - you may not use this file except in compliance with the License. |
5 - You may obtain a copy of the License at | 5 - You may obtain a copy of the License at |
6 - | 6 - |
7 - http://www.apache.org/licenses/LICENSE-2.0 | 7 - http://www.apache.org/licenses/LICENSE-2.0 |
8 - | 8 - |
9 - Unless required by applicable law or agreed to in writing, software | 9 - Unless required by applicable law or agreed to in writing, software |
10 - distributed under the License is distributed on an "AS IS" BASIS, | 10 - distributed under the License is distributed on an "AS IS" BASIS, |
11 - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 11 - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
12 - See the License for the specific language governing permissions and | 12 - See the License for the specific language governing permissions and |
13 - limitations under the License. | 13 - limitations under the License. |
14 --> | 14 --> |
15 | 15 |
16 <!-- | 16 <!-- |
17 - For help, cd to the directory containing this file, run | 17 - For help, cd to the directory containing this file, run |
18 - ant -p | 18 - ant -p |
19 - | 19 - |
20 - To build, cd to the directory containing this file, run | 20 - To build, cd to the directory containing this file, run |
21 - ant <rulename> | 21 - ant <rulename> |
22 - and look for the output in ./ant-* directories. | 22 - and look for the output in ./ant-* directories. |
23 - | 23 - |
24 - Valid values for <rulename> are: | |
25 - default : builds the plugin compiler (pluginc), tests, and docs | |
26 - benchmarks : runs the benchmarks | |
27 - brserve : starts the server for debugging browser tests | |
28 - clean : wipes generated files | |
29 - demos : demo files | |
30 - docs : javadocs and rule docs | |
31 - jars : build the binary distribution | |
32 - pluginc : the plugin compiler | |
33 - runtests : runs the tests | |
34 - runjquery : runs the jQuery tests in ES5 mode | |
35 - runjqueryui: runs the jQuery UI tests in ES5 mode | |
36 ·· | |
37 - | |
38 - To run with assertions enabled, set the environment variable ANT_FLAGS="-ea" | 24 - To run with assertions enabled, set the environment variable ANT_FLAGS="-ea" |
39 --> | 25 --> |
40 | 26 |
41 <project name="caja" default="default" basedir="." | 27 <project name="caja" default="jars" basedir="." |
42 xmlns:artifact="urn:maven-artifact-ant"> | 28 xmlns:artifact="urn:maven-artifact-ant"> |
| 29 |
43 <description> | 30 <description> |
44 A subset of javascript that allow an application to securely embed plugins via | 31 Caja allows webapps to safely render untrusted HTML and |
45 a capability based security model. | 32 Javascript via a capability based security model. |
| 33 For help on building and testing Caja, see: |
| 34 http://code.google.com/p/google-caja/wiki/RunningCaja |
| 35 http://code.google.com/p/google-caja/wiki/CajaTesting |
46 </description> | 36 </description> |
| 37 |
47 <property name="build.sysclasspath" value="ignore" /> | 38 <property name="build.sysclasspath" value="ignore" /> |
48 | 39 |
49 <!-- Make the build reproducible/warning-free on newer versions of ant --> | 40 <!-- Make the build reproducible/warning-free on newer versions of ant --> |
50 <property name="build.sysclasspath" value="ignore" /> | 41 <property name="build.sysclasspath" value="ignore" /> |
51 | 42 |
52 <!--== inputs ==--> | 43 <!--== inputs ==--> |
53 <property name="src" location="src"/> | 44 <property name="src" location="src"/> |
54 <property name="src.caja" location="${src}/com/google/caja"/> | 45 <property name="src.caja" location="${src}/com/google/caja"/> |
55 <property name="tests" location="tests"/> | 46 <property name="tests" location="tests"/> |
56 <property name="tests.caja" location="${tests}/com/google/caja"/> | 47 <property name="tests.caja" location="${tests}/com/google/caja"/> |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 <pathelement path="${third_party}/java/gwt/gwt-user.jar"/> | 113 <pathelement path="${third_party}/java/gwt/gwt-user.jar"/> |
123 </path> | 114 </path> |
124 | 115 |
125 <path id="classpath.tests"> | 116 <path id="classpath.tests"> |
126 <!-- Must be first for coverage to work --> | 117 <!-- Must be first for coverage to work --> |
127 <pathelement path="${instr}/classes"/> | 118 <pathelement path="${instr}/classes"/> |
128 <pathelement path="${precajolelib}/light"/> | 119 <pathelement path="${precajolelib}/light"/> |
129 <pathelement path="${testlib}"/> | 120 <pathelement path="${testlib}"/> |
130 <pathelement path="${third_party}/java/emma/emma.jar"/> | 121 <pathelement path="${third_party}/java/emma/emma.jar"/> |
131 <pathelement path="${third_party}/java/junit/junit.jar"/> | 122 <pathelement path="${third_party}/java/junit/junit.jar"/> |
132 <pathelement path="${third_party}/java/webdriver/selenium-server-standalone-
2.25.0.jar"/> | 123 <pathelement path="${third_party}/java/webdriver/selenium-server-standalone-
2.26.0.jar"/> |
133 <path refid="classpath.main"/> | 124 <path refid="classpath.main"/> |
134 <path refid="classpath.gwt"/> | 125 <path refid="classpath.gwt"/> |
135 </path> | 126 </path> |
136 | 127 |
137 <!--== Appengine tasks ==--> | 128 <!--== Appengine tasks ==--> |
138 <import file="${third_party}/java/appengine/config/user/ant-macros.xml" /> | 129 <import file="${third_party}/java/appengine/config/user/ant-macros.xml" /> |
139 | 130 |
140 <taskdef resource="emma_ant.properties"> | 131 <taskdef resource="emma_ant.properties"> |
141 <classpath> | 132 <classpath> |
142 <pathelement path="${third_party}/java/emma/emma_ant.jar"/> | 133 <pathelement path="${third_party}/java/emma/emma_ant.jar"/> |
143 <pathelement path="${third_party}/java/emma/emma.jar"/> | 134 <pathelement path="${third_party}/java/emma/emma.jar"/> |
144 </classpath> | 135 </classpath> |
145 </taskdef> | 136 </taskdef> |
146 | 137 |
147 <taskdef name="junit" | 138 <taskdef name="junit" |
148 classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTask"> | 139 classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTask"> |
149 <classpath> | 140 <classpath> |
150 <pathelement path="${third_party}/java/apache_ant/ant-junit.jar"/> | 141 <pathelement path="${third_party}/java/apache_ant/ant-junit.jar"/> |
151 <pathelement path="${third_party}/java/junit/junit.jar"/> | 142 <pathelement path="${third_party}/java/junit/junit.jar"/> |
152 </classpath> | 143 </classpath> |
153 </taskdef> | 144 </taskdef> |
154 | 145 |
155 <!--== rules. Lowercase are public. Uppercase are used internally. ==--> | 146 <!--== rules. Lowercase are public. Uppercase are used internally. ==--> |
156 | 147 |
157 <target name="default" depends="jars" | |
158 description="Builds the plugin compiler."/> | |
159 | |
160 <target name="all" depends="docs,jars,demos,runtests" | 148 <target name="all" depends="docs,jars,demos,runtests" |
161 description="Builds the plugin compiler, and documentation."/> | 149 description="Builds the plugin compiler and documentation."/> |
162 | 150 |
163 <target name="clean" | 151 <target name="clean" |
164 description="deletes all generated files leaving only sources"> | 152 description="Deletes all generated files, leaving only sources."> |
165 <delete dir="${reports}"/> | 153 <delete dir="${reports}"/> |
166 <delete dir="${docs}"/> | 154 <delete dir="${docs}"/> |
167 <delete dir="${instr}"/> | 155 <delete dir="${instr}"/> |
168 <delete dir="${jars}"/> | 156 <delete dir="${jars}"/> |
169 <delete dir="${lib}"/> | 157 <delete dir="${lib}"/> |
170 <delete dir="${testlib}"/> | 158 <delete dir="${testlib}"/> |
171 <delete dir="${gwtlib}"/> | 159 <delete dir="${gwtlib}"/> |
172 <delete dir="${precajolelib}"/> | 160 <delete dir="${precajolelib}"/> |
173 <delete dir="${www}"/> | 161 <delete dir="${www}"/> |
174 <delete dir="${maven}"/> | 162 <delete dir="${maven}"/> |
(...skipping 12 matching lines...) Expand all Loading... |
187 <mkdir dir="${lib}"/> | 175 <mkdir dir="${lib}"/> |
188 <mkdir dir="${gwtlib}"/> | 176 <mkdir dir="${gwtlib}"/> |
189 <mkdir dir="${precajolelib}"/> | 177 <mkdir dir="${precajolelib}"/> |
190 <mkdir dir="${www}"/> | 178 <mkdir dir="${www}"/> |
191 <mkdir dir="${war}"/> | 179 <mkdir dir="${war}"/> |
192 <mkdir dir="${gwt-war}"/> | 180 <mkdir dir="${gwt-war}"/> |
193 <mkdir dir="${maven}"/> | 181 <mkdir dir="${maven}"/> |
194 <mkdir dir="${third_party}/java/htmlparser/lib"/> | 182 <mkdir dir="${third_party}/java/htmlparser/lib"/> |
195 </target> | 183 </target> |
196 | 184 |
197 <target name="brtest" description="Run just browser tests."> | 185 <target name="brtest" |
| 186 description="Runs just browser tests."> |
198 <antcall target="runtests"> | 187 <antcall target="runtests"> |
199 <param name="test.filter" value="*BrowserTest"/> | 188 <param name="test.filter" value="*BrowserTest"/> |
200 </antcall> | 189 </antcall> |
201 </target> | 190 </target> |
202 | 191 |
203 <target name="brserve" description="Run just browser test server."> | 192 <target name="brserve" |
| 193 description="Runs just the local HTTP server used by browser tests."> |
204 <antcall target="runtests"> | 194 <antcall target="runtests"> |
205 <param name="test.filter" value="GeneralBrowserTest"/> | 195 <param name="caja.test.serverOnly" value="true"/> |
206 <param name="caja.BrowserTestCase.serverOnly" value="true"/> | 196 <!-- Run an arbitrary test to trigger the serverOnly logic --> |
| 197 <param name="test.filter" value="Es5BrowserTest"/> |
207 </antcall> | 198 </antcall> |
208 </target> | 199 </target> |
209 | 200 |
210 <target name="brserve+" description="... and a test browser."> | 201 <target name="brserve+" |
| 202 description="... and start a test browser."> |
211 <antcall target="runtests"> | 203 <antcall target="runtests"> |
212 <param name="test.filter" value="GeneralBrowserTest"/> | 204 <param name="caja.test.startAndWait" value="true"/> |
213 <param name="caja.BrowserTestCase.startAndWait" value="true"/> | 205 <!-- Run an arbitrary test to trigger the startAndWait logic --> |
| 206 <param name="test.filter" value="Es5BrowserTest"/> |
214 </antcall> | 207 </antcall> |
215 </target> | 208 </target> |
216 | 209 |
217 <macrodef name="RunSeparateTest"> | 210 <macrodef name="RunSeparateTest"> |
218 <element name="files"/> | 211 <element name="files"/> |
219 <sequential> | 212 <sequential> |
220 <condition property="jvmarg" | 213 <condition property="jvmarg" |
221 value="-Xdebug -Xmx2G -Xrunjdwp:transport=dt_socket,server=y,suspend=y,ad
dress=9999" else=""> | 214 value="-Xdebug -Xmx2G -Xrunjdwp:transport=dt_socket,server=y,suspend=y,ad
dress=9999" else=""> |
222 <isset property="test.debug"/> | 215 <isset property="test.debug"/> |
223 </condition> | 216 </condition> |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
261 description="$ ant runtests [-Dtest.filter=My\*Test]"/> | 254 description="$ ant runtests [-Dtest.filter=My\*Test]"/> |
262 | 255 |
263 <property name="emma.coverage.out.file" | 256 <property name="emma.coverage.out.file" |
264 value="${reports}/coverage/coverage.ec"/> | 257 value="${reports}/coverage/coverage.ec"/> |
265 <property name="emma.coverage.out.merge" value="false"/> | 258 <property name="emma.coverage.out.merge" value="false"/> |
266 | 259 |
267 <property name="testonly.user.language" value="tr"/> | 260 <property name="testonly.user.language" value="tr"/> |
268 <property name="testonly.user.region" value="TR"/> | 261 <property name="testonly.user.region" value="TR"/> |
269 | 262 |
270 <propertyset id="test.propertyset"> | 263 <propertyset id="test.propertyset"> |
271 <propertyref name="webdriver.firefox.bin"/> | 264 <propertyref prefix="caja.test."/> |
272 <propertyref prefix="caja.BrowserTestCase."/> | |
273 <propertyref prefix="emma."/> | 265 <propertyref prefix="emma."/> |
274 <propertyref prefix="test."/> | 266 <propertyref prefix="test."/> |
275 <propertyref prefix="testonly."/> | 267 <propertyref prefix="testonly."/> |
| 268 <propertyref prefix="webdriver."/> |
276 <mapper type="glob" from="testonly.*" to="*"/> | 269 <mapper type="glob" from="testonly.*" to="*"/> |
277 </propertyset> | 270 </propertyset> |
278 | 271 |
279 <target name="RuntestsRunAtoM" unless="emma.enabled"> | 272 <target name="RuntestsRunAtoM" unless="emma.enabled"> |
280 <junit printsummary="yes" fork="yes" forkmode="once" maxmemory="512m"> | 273 <junit printsummary="yes" fork="yes" forkmode="once" maxmemory="512m"> |
281 <assertions><enable/></assertions> <!-- ignored unless fork="yes" --> | 274 <assertions><enable/></assertions> <!-- ignored unless fork="yes" --> |
282 <classpath refid="classpath.tests"/> | 275 <classpath refid="classpath.tests"/> |
283 <formatter type="xml"/> | 276 <formatter type="xml"/> |
284 <jvmarg line="${jvmarg}"/> | 277 <jvmarg line="${jvmarg}"/> |
285 <syspropertyset refid="test.propertyset"/> | 278 <syspropertyset refid="test.propertyset"/> |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
357 <!-- Instrument the compiled class files to gather code coverage stats --> | 350 <!-- Instrument the compiled class files to gather code coverage stats --> |
358 <emma enabled="${emma.enabled}"> | 351 <emma enabled="${emma.enabled}"> |
359 <instr instrpath="${lib}" destdir="${instr}" mode="fullcopy" | 352 <instr instrpath="${lib}" destdir="${instr}" mode="fullcopy" |
360 metadatafile="${reports}/coverage/metadata.em" merge="true"> | 353 metadatafile="${reports}/coverage/metadata.em" merge="true"> |
361 <filter value="${emma.filter}, | 354 <filter value="${emma.filter}, |
362 -com.google.caja.tools.*, | 355 -com.google.caja.tools.*, |
363 -com.google.caja.parser.quasiliteral.*RuleDoclet"/> | 356 -com.google.caja.parser.quasiliteral.*RuleDoclet"/> |
364 </instr> | 357 </instr> |
365 </emma> | 358 </emma> |
366 <mkdir dir="${reports}/tests"/> | 359 <mkdir dir="${reports}/tests"/> |
367 <property name="junit.threads" value="2"/> | 360 <property name="test.threads" value="2"/> |
368 <parallel threadCount="${junit.threads}" failonany="true"> | 361 <parallel threadCount="${test.threads}" failonany="true"> |
369 <antcall target="RuntestsRunBrowser"/> | 362 <antcall target="RuntestsRunBrowser"/> |
370 <antcall target="RuntestsRunAtoM"/> | 363 <antcall target="RuntestsRunAtoM"/> |
371 <antcall target="RuntestsRunNtoZ"/> | 364 <antcall target="RuntestsRunNtoZ"/> |
372 <antcall target="RuntestsRunEmma"/> | 365 <antcall target="RuntestsRunEmma"/> |
373 </parallel> | 366 </parallel> |
374 <summarize errorProperty="runtests.error" | 367 <summarize errorProperty="runtests.error" |
375 failureProperty="runtests.failure"> | 368 failureProperty="runtests.failure"> |
376 <fileset dir="${reports}/tests"> | 369 <fileset dir="${reports}/tests"> |
377 <include name="TEST-*.xml"/> | 370 <include name="TEST-*.xml"/> |
378 <exclude name="TEST-*.JQueryTest.xml"/> | 371 <exclude name="TEST-*.JQueryTest.xml"/> |
(...skipping 24 matching lines...) Expand all Loading... |
403 </and> | 396 </and> |
404 </condition> | 397 </condition> |
405 </target> | 398 </target> |
406 | 399 |
407 <target name="CacheOrFail"> | 400 <target name="CacheOrFail"> |
408 <!-- Capture conditions that if set invalidate caching of test results --> | 401 <!-- Capture conditions that if set invalidate caching of test results --> |
409 <condition property="runtests.shouldCache"> | 402 <condition property="runtests.shouldCache"> |
410 <and> | 403 <and> |
411 <istrue value="${runtests.success}"/> | 404 <istrue value="${runtests.success}"/> |
412 <equals arg1="${test.filter}" arg2="*Test"/> | 405 <equals arg1="${test.filter}" arg2="*Test"/> |
413 <isfalse value="${caja.BrowserTestCase.startAndWait}"/> | 406 <equals arg1="${test.method.filter}" arg2="*"/> |
| 407 <isfalse value="${caja.test.headless}"/> |
| 408 <isfalse value="${caja.test.startAndWait}"/> |
414 </and> | 409 </and> |
415 </condition> | 410 </condition> |
416 <fail message= | 411 <fail message= |
417 "One or more tests failed. For details, see ${reports}/tests/index.html" | 412 "One or more tests failed. For details, see ${reports}/tests/index.html" |
418 if="runtests.error"/> | 413 if="runtests.error"/> |
419 <fail message= | 414 <fail message= |
420 "One or more tests failed. For details, see ${reports}/tests/index.html" | 415 "One or more tests failed. For details, see ${reports}/tests/index.html" |
421 if="runtests.failure"/> | 416 if="runtests.failure"/> |
422 </target> | 417 </target> |
423 | 418 |
424 <target name="CacheTestSuccess" depends="CacheOrFail" if="runtests.shouldCache
"> | 419 <target name="CacheTestSuccess" depends="CacheOrFail" if="runtests.shouldCache
"> |
425 <echo> | 420 <echo> |
426 Caching test results. If undesired, clear with "ant cleartestcache" | 421 Caching test results. If undesired, clear with "ant cleartestcache" |
427 </echo> | 422 </echo> |
428 <!-- Snapshot the change being tested to reduce rerunning tests on submit --
> | 423 <!-- Snapshot the change being tested to reduce rerunning tests on submit --
> |
429 <exec output="${lib}/runtests.success.patch" | 424 <exec output="${lib}/runtests.success.patch" |
430 executable="svn" | 425 executable="svn" |
431 failonerror="false" | 426 failonerror="false" |
432 failifexecutionfails="false" | 427 failifexecutionfails="false" |
433 dir="."> | 428 dir="."> |
434 <arg value="diff"/> | 429 <arg value="diff"/> |
435 </exec> | 430 </exec> |
436 </target> | 431 </target> |
437 | 432 |
438 <target name="cleartestcache"> | 433 <target name="cleartestcache"> |
439 <delete file="${lib}/runtests.success.patch"></delete> | 434 <delete file="${lib}/runtests.success.patch"></delete> |
440 </target> | |
441 | |
442 <target name="runbrowserstub" depends="AllTests"> | |
443 <java failonerror="false" fork="true" | |
444 classname="com.google.caja.plugin.BrowserTestCaseStub"> | |
445 <classpath refid="classpath.tests"/> | |
446 </java> | |
447 </target> | 435 </target> |
448 | 436 |
449 <target name="docs" description="Builds all Caja documentation." | 437 <target name="docs" description="Builds all Caja documentation." |
450 depends="javadocs,ruledocs,cajajsdocs"/> | 438 depends="javadocs,ruledocs,cajajsdocs"/> |
451 | 439 |
452 <target name="cajajsdocs"> | 440 <target name="cajajsdocs"> |
453 <mkdir dir="${docs}/cajajs"/> | 441 <mkdir dir="${docs}/cajajs"/> |
454 <xslt in="doc/cajajs/cajajs.xml" | 442 <xslt in="doc/cajajs/cajajs.xml" |
455 out="${docs}/cajajs/index.html" | 443 out="${docs}/cajajs/index.html" |
456 style="doc/cajajs/apidoc.xsl"/> | 444 style="doc/cajajs/apidoc.xsl"/> |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
651 todir="${reports}/benchmarks"/> | 639 todir="${reports}/benchmarks"/> |
652 </junit> | 640 </junit> |
653 <junitreport todir="${reports}/benchmarks"> | 641 <junitreport todir="${reports}/benchmarks"> |
654 <fileset dir="${reports}/benchmarks" includes="TEST-*.xml"/> | 642 <fileset dir="${reports}/benchmarks" includes="TEST-*.xml"/> |
655 <report format="frames" todir="${reports}/benchmarks" | 643 <report format="frames" todir="${reports}/benchmarks" |
656 styledir="${third_party}/ant/etc"/> | 644 styledir="${third_party}/ant/etc"/> |
657 </junitreport> | 645 </junitreport> |
658 </target> | 646 </target> |
659 | 647 |
660 <target name="jars-no-src" | 648 <target name="jars-no-src" |
661 depends="pluginc, MinifiedJs, CajolingServlet" | 649 depends="pluginc, MinifiedJs, CajolingServlet"> |
662 description="Place all jars needed to run the cajoler under ${jars}"> | |
663 <copy todir="${jars}"> | 650 <copy todir="${jars}"> |
664 <fileset dir="${third_party}/java/jakarta_commons"> | 651 <fileset dir="${third_party}/java/jakarta_commons"> |
665 <include name="commons-cli.jar"/> | 652 <include name="commons-cli.jar"/> |
666 <include name="commons-fileupload-1.2.1.jar"/> | 653 <include name="commons-fileupload-1.2.1.jar"/> |
667 <include name="commons-io-1.4.jar"/> | 654 <include name="commons-io-1.4.jar"/> |
668 <include name="commons-codec-1.4.jar"/> | 655 <include name="commons-codec-1.4.jar"/> |
669 </fileset> | 656 </fileset> |
670 <fileset dir="${third_party}/java/jaf"> | 657 <fileset dir="${third_party}/java/jaf"> |
671 <include name="activation.jar"/> | 658 <include name="activation.jar"/> |
672 </fileset> | 659 </fileset> |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
704 <attribute name="Main-Class" | 691 <attribute name="Main-Class" |
705 value="com.google.caja.plugin.PluginCompilerMain"/> | 692 value="com.google.caja.plugin.PluginCompilerMain"/> |
706 </manifest> | 693 </manifest> |
707 <fileset dir="${lib}"> | 694 <fileset dir="${lib}"> |
708 <include name="com/google/caja/**"/> | 695 <include name="com/google/caja/**"/> |
709 <include name="js/json_sans_eval/json_sans_eval.js"/> | 696 <include name="js/json_sans_eval/json_sans_eval.js"/> |
710 </fileset> | 697 </fileset> |
711 </jar> | 698 </jar> |
712 </target> | 699 </target> |
713 | 700 |
714 <target name="jars" depends="jars-no-src"> | 701 <target name="jars" depends="jars-no-src" |
| 702 description="Builds Caja jars."> |
715 <jar destfile="${jars}/pluginc-src.jar" basedir="${src}"/> | 703 <jar destfile="${jars}/pluginc-src.jar" basedir="${src}"/> |
716 </target> | 704 </target> |
717 | 705 |
718 <macrodef name="JQueryTestCase"> | 706 <macrodef name="JQueryTestCase"> |
719 <attribute name="testcase" /> | 707 <attribute name="testcase" /> |
720 <sequential> | 708 <sequential> |
721 <copy file="${lib}/js/jqueryjs/test/index-template.html" tofile="${lib}/
js/jqueryjs/test/@{testcase}-uncajoled.html" /> | 709 <copy file="${lib}/js/jqueryjs/test/index-template.html" tofile="${lib}/
js/jqueryjs/test/@{testcase}-uncajoled.html" /> |
722 <replace file="${lib}/js/jqueryjs/test/@{testcase}-uncajoled.html" value
="@{testcase}"> | 710 <replace file="${lib}/js/jqueryjs/test/@{testcase}-uncajoled.html" value
="@{testcase}"> |
723 <replacetoken><![CDATA[@jquery-testcase@]]></replacetoken> | 711 <replacetoken><![CDATA[@jquery-testcase@]]></replacetoken> |
724 </replace> | 712 </replace> |
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
978 --> | 966 --> |
979 <output file="${lib.caja}/ses/initSES-minified.js" | 967 <output file="${lib.caja}/ses/initSES-minified.js" |
980 language="javascript" renderer="minify"/> | 968 language="javascript" renderer="minify"/> |
981 <output file="${lib.caja}/ses/initSES.js" | 969 <output file="${lib.caja}/ses/initSES.js" |
982 language="javascript" renderer="concat"/> | 970 language="javascript" renderer="concat"/> |
983 <input file="${src.caja}/ses/logger.js"/> | 971 <input file="${src.caja}/ses/logger.js"/> |
984 <input file="${src.caja}/ses/repairES5.js"/> | 972 <input file="${src.caja}/ses/repairES5.js"/> |
985 <input file="${src.caja}/ses/WeakMap.js"/> | 973 <input file="${src.caja}/ses/WeakMap.js"/> |
986 <input file="${src.caja}/ses/StringMap.js"/> | 974 <input file="${src.caja}/ses/StringMap.js"/> |
987 <input file="${src.caja}/ses/whitelist.js"/> | 975 <input file="${src.caja}/ses/whitelist.js"/> |
| 976 <!-- Accumulate exports from acorn, escodegen and estravese |
| 977 and move them onto the ses.rewrite object. This happens to· |
| 978 work as a group rather than having to happen individually |
| 979 because acorn, estraverse and escodegen don't add conflicting· |
| 980 properties on exports --> |
988 <input file="${src.caja}/ses/createExports.js"/> | 981 <input file="${src.caja}/ses/createExports.js"/> |
989 <input file="${third_party}/js/acorn/acorn.js" jslint="false"/> | 982 <input file="${third_party}/js/acorn/acorn.js" jslint="false"/> |
990 <input file="${third_party}/js/escodegen/estraverse.js" jslint="false"/> | 983 <input file="${third_party}/js/escodegen/estraverse.js" jslint="false"/> |
991 <input file="${third_party}/js/escodegen/escodegen.js" jslint="false"/> | 984 <input file="${third_party}/js/escodegen/escodegen.js" jslint="false"/> |
992 <input file="${src.caja}/ses/exportsToSES.js"/> | 985 <input file="${src.caja}/ses/exportsToSES.js"/> |
993 <input file="${src.caja}/ses/mitigateGotchas.js"/> | 986 <input file="${src.caja}/ses/mitigateGotchas.js"/> |
994 <input file="${src.caja}/ses/atLeastFreeVarNames.js"/> | 987 <input file="${src.caja}/ses/atLeastFreeVarNames.js"/> |
995 <input file="${src.caja}/ses/startSES.js"/> | 988 <input file="${src.caja}/ses/startSES.js"/> |
996 <input file="${src.caja}/ses/hookupSES.js"/> | 989 <input file="${src.caja}/ses/hookupSES.js"/> |
997 </transform> | 990 </transform> |
998 <transform> | 991 <transform> |
999 <output file="${lib}/initSESPlus.jslint.stamp" | 992 <output file="${lib}/initSESPlus.jslint.stamp" |
1000 language="jslint"/> | 993 language="jslint"/> |
1001 <!-- TODO(felix8a): closure cleanup | 994 <!-- TODO(felix8a): closure cleanup |
1002 <output file="${lib.caja}/ses/initSESPlus-closured.js" | 995 <output file="${lib.caja}/ses/initSESPlus-closured.js" |
1003 language="closure"/> | 996 language="closure"/> |
1004 --> | 997 --> |
1005 <output file="${lib.caja}/ses/initSESPlus-minified.js" | 998 <output file="${lib.caja}/ses/initSESPlus-minified.js" |
1006 language="javascript" renderer="minify"/> | 999 language="javascript" renderer="minify"/> |
1007 <output file="${lib.caja}/ses/initSESPlus.js" | 1000 <output file="${lib.caja}/ses/initSESPlus.js" |
1008 language="javascript" renderer="concat"/> | 1001 language="javascript" renderer="concat"/> |
1009 <input file="${src.caja}/ses/logger.js"/> | 1002 <input file="${src.caja}/ses/logger.js"/> |
1010 <input file="${src.caja}/ses/repairES5.js"/> | 1003 <input file="${src.caja}/ses/repairES5.js"/> |
1011 <input file="${src.caja}/ses/WeakMap.js"/> | 1004 <input file="${src.caja}/ses/WeakMap.js"/> |
1012 <input file="${src.caja}/ses/debug.js"/> | 1005 <input file="${src.caja}/ses/debug.js"/> |
1013 <input file="${src.caja}/ses/StringMap.js"/> | 1006 <input file="${src.caja}/ses/StringMap.js"/> |
1014 <input file="${src.caja}/ses/whitelist.js"/> | 1007 <input file="${src.caja}/ses/whitelist.js"/> |
| 1008 <!-- Accumulate exports from acorn, escodegen and estravese |
| 1009 and move them onto the ses.rewrite object. This happens to· |
| 1010 work as a group rather than having to happen individually |
| 1011 because acorn, estraverse and escodegen don't add conflicting· |
| 1012 properties on exports --> |
1015 <input file="${src.caja}/ses/createExports.js"/> | 1013 <input file="${src.caja}/ses/createExports.js"/> |
1016 <input file="${third_party}/js/acorn/acorn.js" jslint="false"/> | 1014 <input file="${third_party}/js/acorn/acorn.js" jslint="false"/> |
1017 <input file="${third_party}/js/escodegen/estraverse.js" jslint="false"/> | 1015 <input file="${third_party}/js/escodegen/estraverse.js" jslint="false"/> |
1018 <input file="${third_party}/js/escodegen/escodegen.js" jslint="false"/> | 1016 <input file="${third_party}/js/escodegen/escodegen.js" jslint="false"/> |
1019 <input file="${src.caja}/ses/exportsToSES.js"/> | 1017 <input file="${src.caja}/ses/exportsToSES.js"/> |
1020 <input file="${src.caja}/ses/mitigateGotchas.js"/> | 1018 <input file="${src.caja}/ses/mitigateGotchas.js"/> |
1021 <input file="${src.caja}/ses/atLeastFreeVarNames.js"/> | 1019 <input file="${src.caja}/ses/atLeastFreeVarNames.js"/> |
1022 <input file="${src.caja}/ses/startSES.js"/> | 1020 <input file="${src.caja}/ses/startSES.js"/> |
1023 <input file="${src.caja}/ses/ejectorsGuardsTrademarks.js"/> | 1021 <input file="${src.caja}/ses/ejectorsGuardsTrademarks.js"/> |
1024 <input file="${src.caja}/ses/hookupSESPlus.js"/> | 1022 <input file="${src.caja}/ses/hookupSESPlus.js"/> |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1079 <input file="${src.caja}/plugin/ses-iframe-init.js"/> | 1077 <input file="${src.caja}/plugin/ses-iframe-init.js"/> |
1080 <input file="${lib.caja}/ses/initSESPlus.js" jslint="false"/> | 1078 <input file="${lib.caja}/ses/initSESPlus.js" jslint="false"/> |
1081 <input file="${src.caja}/plugin/caja-iframe-done.js"/> | 1079 <input file="${src.caja}/plugin/caja-iframe-done.js"/> |
1082 </transform> | 1080 </transform> |
1083 <transform> | 1081 <transform> |
1084 <output file="${lib}/com/google/caja/apitaming/cajaTamingGoogleLoader.jsli
nt.tstamp" language="jslint"/> | 1082 <output file="${lib}/com/google/caja/apitaming/cajaTamingGoogleLoader.jsli
nt.tstamp" language="jslint"/> |
1085 <output file="${lib}/com/google/caja/apitaming/cajaTamingGoogleLoader.opt.
js" language="javascript" renderer="minify"/> | 1083 <output file="${lib}/com/google/caja/apitaming/cajaTamingGoogleLoader.opt.
js" language="javascript" renderer="minify"/> |
1086 <input file="${src}/com/google/caja/apitaming/cajaTamingGoogleLoader.js"/> | 1084 <input file="${src}/com/google/caja/apitaming/cajaTamingGoogleLoader.js"/> |
1087 </transform> | 1085 </transform> |
1088 <transform> | 1086 <transform> |
1089 <output file="${lib}/com/google/caja/apitaming/mapsPolicyFactory.jslint.ts
tamp" language="jslint"/> | 1087 <output file="${lib}/com/google/caja/apitaming/google.load.loaderFactory.j
slint.tstamp" language="jslint"/> |
1090 <output file="${lib}/com/google/caja/apitaming/mapsPolicyFactory.opt.js" l
anguage="javascript" renderer="minify"/> | 1088 <output file="${lib}/com/google/caja/apitaming/google.load.loaderFactory.o
pt.js" language="javascript" renderer="minify"/> |
1091 <input file="${src}/com/google/caja/apitaming/mapsPolicyFactory.js"/> | 1089 <input file="${src}/com/google/caja/apitaming/google.load.loaderFactory.js
"/> |
1092 </transform> | 1090 </transform> |
1093 <transform> | 1091 <transform> |
1094 <output file="${lib}/com/google/caja/apitaming/pickerPolicyFactory.jslint.
tstamp" language="jslint"/> | 1092 <output file="${lib}/com/google/caja/apitaming/google.maps.policyFactory.j
slint.tstamp" language="jslint"/> |
1095 <output file="${lib}/com/google/caja/apitaming/pickerPolicyFactory.opt.js"
language="javascript" renderer="minify"/> | 1093 <output file="${lib}/com/google/caja/apitaming/google.maps.policyFactory.o
pt.js" language="javascript" renderer="minify"/> |
1096 <input file="${src}/com/google/caja/apitaming/pickerPolicyFactory.js"/> | 1094 <input file="${src}/com/google/caja/apitaming/google.maps.policyFactory.js
"/> |
1097 </transform> | 1095 </transform> |
1098 <transform> | 1096 <transform> |
1099 <output file="${lib}/com/google/caja/apitaming/visualizationPolicyFactory.
jslint.tstamp" language="jslint"/> | 1097 <output file="${lib}/com/google/caja/apitaming/google.picker.policyFactory
.jslint.tstamp" language="jslint"/> |
1100 <output file="${lib}/com/google/caja/apitaming/visualizationPolicyFactory.
opt.js" language="javascript" renderer="minify"/> | 1098 <output file="${lib}/com/google/caja/apitaming/google.picker.policyFactory
.opt.js" language="javascript" renderer="minify"/> |
1101 <input file="${src}/com/google/caja/apitaming/visualizationPolicyFactory.j
s"/> | 1099 <input file="${src}/com/google/caja/apitaming/google.picker.policyFactory.
js"/> |
| 1100 </transform> |
| 1101 <transform> |
| 1102 <output file="${lib}/com/google/caja/apitaming/google.visualization.policy
Factory.jslint.tstamp" language="jslint"/> |
| 1103 <output file="${lib}/com/google/caja/apitaming/google.visualization.policy
Factory.opt.js" language="javascript" renderer="minify"/> |
| 1104 <input file="${src}/com/google/caja/apitaming/google.visualization.policyF
actory.js"/> |
| 1105 </transform> |
| 1106 <transform> |
| 1107 <output file="${lib}/com/google/caja/apitaming/gapi.client.load.loaderFact
ory.jslint.tstamp" language="jslint"/> |
| 1108 <output file="${lib}/com/google/caja/apitaming/gapi.client.load.loaderFact
ory.opt.js" language="javascript" renderer="minify"/> |
| 1109 <input file="${src}/com/google/caja/apitaming/gapi.client.load.loaderFacto
ry.js"/> |
| 1110 </transform> |
| 1111 <transform> |
| 1112 <output file="${lib}/com/google/caja/apitaming/gapi.client.urlshortener.po
licyFactory.jslint.tstamp" language="jslint"/> |
| 1113 <output file="${lib}/com/google/caja/apitaming/gapi.client.urlshortener.po
licyFactory.opt.js" language="javascript" renderer="minify"/> |
| 1114 <input file="${src}/com/google/caja/apitaming/gapi.client.urlshortener.pol
icyFactory.js"/> |
1102 </transform> | 1115 </transform> |
1103 <replace dir="${lib.caja}/plugin" propertyFile="${lib.caja}/reporting/buildI
nfo.properties" > | 1116 <replace dir="${lib.caja}/plugin" propertyFile="${lib.caja}/reporting/buildI
nfo.properties" > |
1104 <replacefilter token="%VERSION%" property="svnVersion" /> | 1117 <replacefilter token="%VERSION%" property="svnVersion" /> |
1105 <include name="es53-taming-frame.opt.js" /> | 1118 <include name="es53-taming-frame.opt.js" /> |
1106 <include name="es53-taming-frame.js" /> | 1119 <include name="es53-taming-frame.js" /> |
1107 <include name="es53-guest-frame.opt.js" /> | 1120 <include name="es53-guest-frame.opt.js" /> |
1108 <include name="es53-guest-frame.js" /> | 1121 <include name="es53-guest-frame.js" /> |
1109 <include name="ses-guest-frame.opt.js" /> | 1122 <include name="ses-guest-frame.opt.js" /> |
1110 <include name="ses-guest-frame.js" /> | 1123 <include name="ses-guest-frame.js" /> |
1111 <include name="ses-taming-frame.opt.js" /> | 1124 <include name="ses-taming-frame.opt.js" /> |
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1471 <output file="${war}/swfobject.opt.js" | 1484 <output file="${war}/swfobject.opt.js" |
1472 language="javascript" renderer="minify"/> | 1485 language="javascript" renderer="minify"/> |
1473 </transform> | 1486 </transform> |
1474 | 1487 |
1475 <copy todir="${war}/sunspider"> | 1488 <copy todir="${war}/sunspider"> |
1476 <fileset dir="${third_party}/js/sunspider-benchmark"> | 1489 <fileset dir="${third_party}/js/sunspider-benchmark"> |
1477 <include name="sunspider-record-result.js" /> | 1490 <include name="sunspider-record-result.js" /> |
1478 <include name="*.html" /> | 1491 <include name="*.html" /> |
1479 </fileset> | 1492 </fileset> |
1480 </copy> | 1493 </copy> |
| 1494 |
| 1495 <!-- Install Caja files with wrong version numbers, for |
| 1496 running version-skew tests. --> |
| 1497 <mkdir dir="${war}/testing/skew-0000/0000"/> |
| 1498 <mkdir dir="${war}/testing/skew-0000/${build.svnVersion}"/> |
| 1499 <copy todir="${war}/testing/skew-0000" file="${war}/caja.js"/> |
| 1500 <copy todir="${war}/testing/skew-0000/0000"> |
| 1501 <fileset dir="${war}/${build.svnVersion}" includes="*.js"/> |
| 1502 </copy> |
| 1503 <copy todir="${war}/testing/skew-0000/${build.svnVersion}"> |
| 1504 <fileset dir="${war}/${build.svnVersion}" includes="*.js"/> |
| 1505 </copy> |
| 1506 <replace dir="${war}/testing/skew-0000" |
| 1507 token="${build.svnVersion}" value="0000"/> |
| 1508 |
| 1509 <property name="ver.mmm" value="${build.svnVersion}mmm"/> |
| 1510 <mkdir dir="${war}/testing/skew-mmm/${ver.mmm}"/> |
| 1511 <copy todir="${war}/testing/skew-mmm" overwrite="true" |
| 1512 file="${war}/caja.js"/> |
| 1513 <copy todir="${war}/testing/skew-mmm/${ver.mmm}" overwrite="true"> |
| 1514 <fileset dir="${war}/${build.svnVersion}" includes="*.js"/> |
| 1515 </copy> |
| 1516 <replace dir="${war}/testing/skew-mmm" |
| 1517 token="${build.svnVersion}" value="${ver.mmm}"/> |
1481 </target> | 1518 </target> |
1482 | 1519 |
1483 <!-- Copy third-party JARs to the WAR directory --> | 1520 <!-- Copy third-party JARs to the WAR directory --> |
1484 <target name="PlaygroundJars" depends="dirs"> | 1521 <target name="PlaygroundJars" depends="dirs"> |
1485 <mkdir dir="${war}/WEB-INF" /> | 1522 <mkdir dir="${war}/WEB-INF" /> |
1486 <copy todir="${war}/WEB-INF/lib" flatten="true"> | 1523 <copy todir="${war}/WEB-INF/lib" flatten="true"> |
1487 <fileset dir="${third_party}/java/jsonml"> | 1524 <fileset dir="${third_party}/java/jsonml"> |
1488 <include name="jsonml.jar"/> | 1525 <include name="jsonml.jar"/> |
1489 </fileset> | 1526 </fileset> |
1490 <fileset dir="${third_party}/java/appengine/lib/user"> | 1527 <fileset dir="${third_party}/java/appengine/lib/user"> |
(...skipping 19 matching lines...) Expand all Loading... |
1510 <include name="commons-fileupload-1.2.1.jar" /> | 1547 <include name="commons-fileupload-1.2.1.jar" /> |
1511 </fileset> | 1548 </fileset> |
1512 </copy> | 1549 </copy> |
1513 <copy todir="${war}/WEB-INF" | 1550 <copy todir="${war}/WEB-INF" |
1514 file="${third_party}/java/appengine/config/user/logging.properties" /> | 1551 file="${third_party}/java/appengine/config/user/logging.properties" /> |
1515 </target> | 1552 </target> |
1516 | 1553 |
1517 <!-- Compile the GWT backend and copies to the WAR --> | 1554 <!-- Compile the GWT backend and copies to the WAR --> |
1518 <target name="PlaygroundBE" depends="pluginc,PlaygroundJars"> | 1555 <target name="PlaygroundBE" depends="pluginc,PlaygroundJars"> |
1519 <copy todir="${war}/WEB-INF" file="web.xml" /> | 1556 <copy todir="${war}/WEB-INF" file="web.xml" /> |
1520 <copy todir="${war}/WEB-INF/lib"> | 1557 <copy todir="${war}/WEB-INF/lib" file="${jars}/htmlparser.jar" /> |
1521 <fileset dir="${jars}"> | |
1522 <include name="htmlparser.jar"/> | |
1523 <include name="precajole.jar"/> | |
1524 </fileset> | |
1525 </copy> | |
1526 <mkdir dir="${war}/WEB-INF/classes" /> | 1558 <mkdir dir="${war}/WEB-INF/classes" /> |
1527 <copy todir="${war}/WEB-INF/classes"> | 1559 <copy todir="${war}/WEB-INF/classes"> |
1528 <fileset dir="${lib}"> | 1560 <fileset dir="${lib}"> |
1529 <include name="com/**" /> | 1561 <include name="com/**" /> |
1530 </fileset> | 1562 </fileset> |
1531 </copy> | 1563 </copy> |
1532 <javac destdir="${war}/WEB-INF/classes" debug="true"> | 1564 <javac destdir="${war}/WEB-INF/classes" debug="true"> |
1533 <src path="${src}"/> | 1565 <src path="${src}"/> |
1534 <classpath refid="classpath.main"/> | 1566 <classpath refid="classpath.main"/> |
1535 <classpath refid="classpath.gwt"/> | 1567 <classpath refid="classpath.gwt"/> |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1570 A straightforward workaround is to make the necessary files | 1602 A straightforward workaround is to make the necessary files |
1571 available in both locations. | 1603 available in both locations. |
1572 http://groups.google.com/group/google-caja-discuss/msg/b908b16edbc6a112 | 1604 http://groups.google.com/group/google-caja-discuss/msg/b908b16edbc6a112 |
1573 --> | 1605 --> |
1574 <copy todir="${war}/playground/"> | 1606 <copy todir="${war}/playground/"> |
1575 <fileset dir="${third_party}/js/codemirror"> | 1607 <fileset dir="${third_party}/js/codemirror"> |
1576 <include name="js/*.js" /> | 1608 <include name="js/*.js" /> |
1577 <include name="css/*.css" /> | 1609 <include name="css/*.css" /> |
1578 </fileset> | 1610 </fileset> |
1579 </copy> | 1611 </copy> |
| 1612 <copy todir="${war}/WEB-INF/lib" file="${jars}/precajole.jar" /> |
1580 </target> | 1613 </target> |
1581 | 1614 |
1582 <target name="alt-playground"> | 1615 <target name="alt-playground"> |
1583 <antcall target="playground"> | 1616 <antcall target="playground"> |
1584 <param name="gwt.style" value="PRETTY"/> | 1617 <param name="gwt.style" value="PRETTY"/> |
1585 </antcall> | 1618 </antcall> |
1586 <antcall target="alt-appengine-web"/> | 1619 <antcall target="alt-appengine-web"/> |
1587 </target> | 1620 </target> |
1588 | 1621 |
1589 <target name="deploy" depends="playground"> | 1622 <target name="deploy" depends="playground"> |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1804 | 1837 |
1805 <target name="printlibs"> | 1838 <target name="printlibs"> |
1806 <pathconvert | 1839 <pathconvert |
1807 refid="classpath.tests" | 1840 refid="classpath.tests" |
1808 pathsep="${line.separator}"> | 1841 pathsep="${line.separator}"> |
1809 <map from="${basedir}/" to=""/> | 1842 <map from="${basedir}/" to=""/> |
1810 </pathconvert> | 1843 </pathconvert> |
1811 </target> | 1844 </target> |
1812 | 1845 |
1813 </project> | 1846 </project> |
LEFT | RIGHT |