You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

build.xml 50KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051
  1. <?xml version="1.0"?>
  2. <project xmlns:antcontrib="antlib:net.sf.antcontrib"
  3. xmlns:artifact="antlib:org.apache.maven.artifact.ant"
  4. xmlns:ivy="antlib:org.apache.ivy.ant"
  5. name="Vaadin"
  6. basedir="../" default="package-all">
  7. <property name="project.root" value="."/>
  8. <!-- Import common targets -->
  9. <import file="./common.xml" />
  10. <!--Call one of package-* targets unless you understand what you are doing. -->
  11. <target name="package-all" depends="clean-all, init, build, javadoc, internal-package-war, internal-package-liferay, differences" description="Build public packages.">
  12. </target>
  13. <target name="package-jar" depends="clean-result, init, vaadin.jar" description="Create vaadin-x.y.z.jar file.">
  14. </target>
  15. <target name="package-war" depends="clean-result, init, build, javadoc, internal-package-war, differences">
  16. </target>
  17. <target name="package-liferay-zip" depends="clean-result, init, build, internal-package-liferay">
  18. </target>
  19. <target name="init-deps" depends="common.init-deps" >
  20. <property name="ivy.resolved" value="1" />
  21. <ivy:resolve file="build/ivy/ivy.xml" resolveid="common" conf="ss.compile, cs.compile, ss.test.compile"/>
  22. <ivy:cachepath pathid="compile.classpath.server-side" conf="ss.compile"/>
  23. <ivy:cachepath pathid="compile.classpath.client-side" conf="cs.compile"/>
  24. <ivy:cachepath pathid="compile.classpath.server-side-tests" conf="ss.test.compile"/>
  25. </target>
  26. <!-- Clean results - - - - - - - - - - - - - - - - - - - - - - - - - -->
  27. <target name="clean-result" depends="build.properties">
  28. <!-- Clean build result directory. -->
  29. <delete dir="${result-path}" includes="**/*" followsymlinks="false" defaultexcludes="false" includeemptydirs="true" failonerror="false"/>
  30. </target>
  31. <target name="build.properties">
  32. <property file="build/build.properties" />
  33. <property file="build/VERSION.properties" />
  34. <property file="build/GWT-VERSION.properties" />
  35. <!-- result source and classes folders -->
  36. <property name="result-src-core" value="${result-path}/src/core"/>
  37. <property name="result-src-junit" value="${result-path}/src/junit"/>
  38. <property name="result-src-testbench" value="${result-path}/src/testbench"/>
  39. <property name="result-classes-core" value="${result-path}/classes/core"/>
  40. <property name="result-classes-junit" value="${result-path}/classes/junit"/>
  41. <property name="result-classes-testbench" value="${result-path}/classes/testbench"/>
  42. <!-- Folder where Emma instrumented classes are placed (if Emma is used)-->
  43. <property name="result-classes-core-for-emma-war" value="${result-path}/classes/emma-war"/>
  44. <property name="result-classes-core-for-emma-junit" value="${result-path}/classes/emma-junit"/>
  45. </target>
  46. <target name="clean-all" depends="clean-result">
  47. </target>
  48. <!-- ================================================================== -->
  49. <!-- Check versions. -->
  50. <!-- ================================================================== -->
  51. <!-- Java compiler version. -->
  52. <target name="check-java-version">
  53. <condition property="java.version.matches">
  54. <or>
  55. <equals arg1="${ant.java.version}" arg2="1.5"/>
  56. <isset property="ignoreversion"/>
  57. </or>
  58. </condition>
  59. <fail unless="java.version.matches" message="Java version is ${ant.java.version}, but Vaadin must be compiled with genuine Java 1.5 compiler. Use -Dignoreversion=1 for ant to ignore the version check."/>
  60. <echo>Java version is ${ant.java.version} as required.</echo>
  61. </target>
  62. <!-- ================================================================== -->
  63. <!-- Initialization - - - - - - - - - - - - - - - - - - - - - - - - - - -->
  64. <!-- ================================================================== -->
  65. <target name="init" depends="init-deps, build.properties">
  66. <!-- Current timestamp in different formats. -->
  67. <tstamp>
  68. <format property="build.date" pattern="yyyy-MM-dd"/>
  69. </tstamp>
  70. <tstamp>
  71. <format property="build.date.compact" pattern="yyyyMMdd"/>
  72. </tstamp>
  73. <antcontrib:propertyregex property="version.major" input="${version}" regexp="([^\.]*)\.([^\.]*)\.([^\.]*)" select="\1"/>
  74. <antcontrib:propertyregex property="version.minor" input="${version}" regexp="([^\.]*)\.([^\.]*)\.([^\.]*)" select="\2"/>
  75. <antcontrib:propertyregex property="version.revision" input="${version}" regexp="([^\.]*)\.([^\.]*)\.([^\.]*)" select="\3"/>
  76. <!-- Default full version name. -->
  77. <!-- Nightly and other TeamCity builds will define their own. -->
  78. <property name="version.full" value="${version}.dev-${build.date.compact}"/>
  79. <echo>Base Version: ${version}</echo>
  80. <echo>Full Version: ${version.full}</echo>
  81. <!-- Other properties -->
  82. <property file="build/html-style.properties" />
  83. <echo>Vaadin package is: ${vaadin-package}</echo>
  84. <!-- Create result dir unless already exists -->
  85. <mkdir dir="${result-path}" />
  86. <!-- Create dirs that might be used by the test coverage generation -->
  87. <mkdir dir="${result-classes-core-for-emma-war}" />
  88. <mkdir dir="${result-classes-core-for-emma-junit}" />
  89. <mkdir dir="${result-path}/coverage" />
  90. <echo>We are using gwt version ${gwt-version}.</echo>
  91. <!-- Destination files -->
  92. <property name="base-name" value="${product-file}-${version.full}" />
  93. <property name="lib-jar-name" value="${base-name}.jar" />
  94. <property name="lib-sources-jar-name" value="${base-name}-sources.jar" />
  95. <property name="lib-javadoc-jar-name" value="${base-name}-javadoc.jar" />
  96. <property name="test-war-filename" value="${product-file}-tests-${version.full}.war"/>
  97. <echo message="Prepared to build ${product-file} version ${version.full} packages" />
  98. <!-- Output directory -->
  99. <property name="output-dir" value="${result-path}/${base-name}" />
  100. <mkdir dir="${output-dir}" />
  101. <!-- Where widgetsets are written to. -->
  102. <!-- When not building a package, widgetsets should be written to -->
  103. <!-- WebContent/VAADIN/widgetsets, which needs to be set in -->
  104. <!-- init-nonpackage target before calling this main init target. -->
  105. <property name="widgetsets-output-dir" value="${output-dir}/WebContent/VAADIN/widgetsets" />
  106. <!-- Build helpers -->
  107. <property name="buildhelpers-src" value="build/buildhelpers" />
  108. <property name="buildhelpers-classes" value="${result-path}/buildhelpers/classes" />
  109. <!-- Create Output Directory Hierarchy -->
  110. <mkdir dir="${output-dir}/WebContent" />
  111. <mkdir dir="${output-dir}/WebContent/demo" />
  112. <mkdir dir="${output-dir}/WebContent/docs" />
  113. <mkdir dir="${output-dir}/WebContent/docs/api" />
  114. <mkdir dir="${output-dir}/WebContent/tests" />
  115. <mkdir dir="${output-dir}/WebContent/WEB-INF" />
  116. <mkdir dir="${output-dir}/WebContent/WEB-INF/lib" />
  117. <mkdir dir="${output-dir}/WebContent/WEB-INF/classes" />
  118. </target>
  119. <target name="internal-package-war">
  120. <echo>Building Test WAR</echo>
  121. <echo>Adding test class files and resources and launcher configuration.</echo>
  122. <copy todir="${output-dir}/WebContent/WEB-INF/classes">
  123. <fileset dir="${result-classes-testbench}">
  124. <include name="${vaadin-package}/tests/**/*" />
  125. <include name="${vaadin-package}/launcher/**" />
  126. </fileset>
  127. <fileset dir="${result-classes-junit}">
  128. <!-- VaadinClasses and data classes are used by TestBench tests also -->
  129. </fileset>
  130. <!-- test resources -->
  131. <fileset dir="tests/testbench">
  132. <include name="${vaadin-package}/tests/**/*" />
  133. <!-- Pre-processed versions of these copied above -->
  134. <exclude name="**/*.java" />
  135. <exclude name="**/*.html" />
  136. <exclude name="**/*.css" />
  137. <exclude name="**/*.xml" />
  138. </fileset>
  139. <!-- Include files required by the DemoLauncher/DevelopmentServerLauncher -->
  140. <fileset dir="tests/testbench">
  141. <include name="${vaadin-package}/launcher/jetty-webdefault.xml" />
  142. <include name="${vaadin-package}/launcher/keystore" />
  143. </fileset>
  144. </copy>
  145. <war warfile="${result-path}/${test-war-filename}">
  146. <fileset dir="${output-dir}/WebContent">
  147. <!-- Already in JAR -->
  148. <!-- Not excluded because used from WAR by portal integration tests
  149. <exclude name="VAADIN/themes/base/**/*" />
  150. <exclude name="VAADIN/themes/chameleon/**/*" />
  151. <exclude name="VAADIN/themes/liferay/**/*" />
  152. <exclude name="VAADIN/themes/reindeer/**/*" />
  153. <exclude name="VAADIN/themes/runo/**/*" />
  154. <exclude name="VAADIN/widgetsets/com.vaadin.terminal.gwt.DefaultWidgetSet/**/*" />
  155. -->
  156. <!-- Not needed for testing -->
  157. <exclude name="docs/**/*" />
  158. <exclude name="docs" />
  159. <include name="**/*" />
  160. </fileset>
  161. </war>
  162. </target>
  163. <target name="internal-package-liferay" depends="internal-package-war">
  164. <!-- We assume the needed files are put in place by internal-package-war -->
  165. <echo>Building Liferay zip</echo>
  166. <zip zipfile="${result-path}/${base-name}-liferay.zip">
  167. <zipfileset prefix="VAADIN/widgetsets/com.vaadin.portal.gwt.PortalDefaultWidgetSet" dir="${output-dir}/WebContent/VAADIN/widgetsets/com.vaadin.portal.gwt.PortalDefaultWidgetSet">
  168. <patternset>
  169. <include name="**/*" />
  170. </patternset>
  171. </zipfileset>
  172. <zipfileset prefix="VAADIN/themes" dir="${output-dir}/WebContent/VAADIN/themes">
  173. <patternset>
  174. <include name="base/**/*" />
  175. <include name="chameleon/**/*" />
  176. <include name="liferay/**/*" />
  177. <include name="runo/**/*" />
  178. <include name="reindeer/**/*" />
  179. </patternset>
  180. </zipfileset>
  181. <zipfileset prefix="VAADIN" dir="${output-dir}/WebContent/VAADIN">
  182. <patternset>
  183. <include name="vaadinBootstrap.js" />
  184. </patternset>
  185. </zipfileset>
  186. </zip>
  187. <echo>##teamcity[publishArtifacts '${result-path}/${base-name}-liferay.zip']</echo>
  188. </target>
  189. <!-- Build server-side, client-side, libraries, and tests. -->
  190. <!-- The client-side needs to be built before vaadin.jar, because the vaadin.jar -->
  191. <!-- require the default widgetset and doing otherwise would build it twice. -->
  192. <!-- However, since compiling the server-side is required by the client-side -->
  193. <!-- compilation, the server-side will actually be built before it. -->
  194. <target name="build"
  195. depends="compile-server-side, compile-tests, compile-client-side, vaadin.jar, vaadin-sources.jar"
  196. description="Build package required files, without packing them.">
  197. </target>
  198. <target name="compile-server-side" depends="compile-core, webcontent"/>
  199. <!-- Copy and preprocess sources for packaging
  200. NOTE: Replaces <version></version> tags with build version tag for some "textual" files
  201. -->
  202. <target name="preprocess-src">
  203. <!--
  204. Source directories in the project are
  205. * src (Vaadin core)
  206. * tests/testbench (TestBench test cases)
  207. * tests/server-side (Server-side JUnit test cases)
  208. * tests/client-side (Client-side JUnit test cases)
  209. These are copied to
  210. * ${result-path}/src/core
  211. * ${result-path}/src/tests
  212. * ${result-path}/src/junit
  213. And compiled to
  214. * ${result-path}/classes/core
  215. * ${result-path}/classes/tests
  216. * ${result-path}/classes/junit
  217. Java/HTML/CSS/XML files are filtered so the license is added and the version is set.
  218. Other files are just copied.
  219. -->
  220. <loadfile property="VaadinApache2LicenseForJavaFiles" srcFile="build/VaadinApache2LicenseForJavaFiles.txt" />
  221. <mkdir dir="${result-path}/src" />
  222. <mkdir dir="${result-src-core}" />
  223. <mkdir dir="${result-src-testbench}" />
  224. <mkdir dir="${result-src-junit}" />
  225. <patternset id="preprocessable-files">
  226. <include name="**/*.java" />
  227. <include name="**/*.html" />
  228. <include name="**/*.css" />
  229. <include name="**/*.xml" />
  230. </patternset>
  231. <patternset id="non-preprocessable-files">
  232. <exclude name="**/.svn" />
  233. <exclude name="**/*.java" />
  234. <exclude name="**/*.html" />
  235. <exclude name="**/*.css" />
  236. <exclude name="**/*.xml" />
  237. </patternset>
  238. <filterset id="version-and-license">
  239. <filter token="VaadinApache2LicenseForJavaFiles" value="${VaadinApache2LicenseForJavaFiles}" />
  240. <filter token="VERSION" value="${version.full}" />
  241. </filterset>
  242. <!-- Adds a style class to JavaDoc <pre> tags for style customization. -->
  243. <filterset id="pre-css-style" begintoken=" * &lt;" endtoken="&gt;">
  244. <filter token="pre" value=" * &lt;pre class='code'&gt;" />
  245. </filterset>
  246. <echo>Copying src directory and processing copied files.</echo>
  247. <echo>Replacing &lt;version&gt; tag with build version for java/html/css/xml files.</echo>
  248. <copy todir="${result-src-core}" overwrite="yes">
  249. <filterset refid="version-and-license"/>
  250. <filterset refid="pre-css-style"/>
  251. <fileset dir="src">
  252. <patternset refid="preprocessable-files" />
  253. </fileset>
  254. </copy>
  255. <copy todir="${result-src-testbench}">
  256. <filterset refid="version-and-license"/>
  257. <fileset dir="tests/testbench">
  258. <patternset refid="preprocessable-files" />
  259. </fileset>
  260. </copy>
  261. <copy todir="${result-src-junit}">
  262. <filterset refid="version-and-license"/>
  263. <fileset dir="tests/server-side">
  264. <patternset refid="preprocessable-files" />
  265. </fileset>
  266. <fileset dir="tests/client-side">
  267. <patternset refid="preprocessable-files" />
  268. </fileset>
  269. </copy>
  270. <!-- Unify mix usage of mac/Linux/Win characters -->
  271. <echo>Unifying mix usage of Mac/Linux/Win linefeeds for java/html/css/xml files.</echo>
  272. <fixcrlf srcdir="${result-path}/src" eol="crlf" tablength="4" tab="asis" includes="**/*.java **/*.html **/*.css **/*.xml" />
  273. <!-- Add other files such as images, these are not filtered or processed by fixcrlf task -->
  274. <echo>Copying non java/html/css/xml files such as images.</echo>
  275. <copy todir="${result-src-core}">
  276. <fileset dir="src">
  277. <patternset refid="non-preprocessable-files" />
  278. </fileset>
  279. </copy>
  280. <copy todir="${result-src-testbench}">
  281. <fileset dir="tests/testbench">
  282. <patternset refid="non-preprocessable-files" />
  283. </fileset>
  284. </copy>
  285. <copy todir="${result-src-junit}">
  286. <fileset dir="tests/server-side">
  287. <patternset refid="non-preprocessable-files" />
  288. </fileset>
  289. <fileset dir="tests/client-side">
  290. <patternset refid="non-preprocessable-files" />
  291. </fileset>
  292. </copy>
  293. </target>
  294. <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  295. WebContent
  296. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
  297. <target name="webcontent" depends="preprocess-src,defaulttheme">
  298. <!-- Add WebContent -->
  299. <echo>Adding VAADIN/themes and META-INF</echo>
  300. <copy todir="${output-dir}/WebContent">
  301. <fileset dir="WebContent">
  302. <exclude name="**/.svn" />
  303. <include name="WEB-INF/lib/hsqldb.jar" />
  304. <include name="VAADIN/themes/**/*" />
  305. <include name="VAADIN/vaadinBootstrap.js" />
  306. <include name="META-INF/**/*" />
  307. </fileset>
  308. </copy>
  309. <!-- Add servlet and portlet configuration files from WebContent -->
  310. <copy todir="${output-dir}/WebContent/WEB-INF">
  311. <fileset dir="WebContent/WEB-INF">
  312. <include name="liferay-*.xml" />
  313. <include name="portlet.xml" />
  314. <include name="web.xml" />
  315. </fileset>
  316. </copy>
  317. <!-- These should go to various JARs -->
  318. <copy todir="${output-dir}/WebContent">
  319. <filterchain>
  320. <expandproperties />
  321. <replacetokens begintoken="@" endtoken="@">
  322. <token key="version" value="${version.full}" />
  323. </replacetokens>
  324. <replacetokens begintoken="@" endtoken="@">
  325. <token key="version-minor" value="${version.major}.${version.minor}" />
  326. </replacetokens>
  327. <replacetokens begintoken="@" endtoken="@">
  328. <token key="builddate" value="${build.date}" />
  329. </replacetokens>
  330. <replacetokens begintoken="@" endtoken="@">
  331. <token key="gwt-version" value="${gwt-version}" />
  332. </replacetokens>
  333. </filterchain>
  334. <fileset dir="WebContent">
  335. <exclude name="**/.svn" />
  336. <include name="release-notes.html" />
  337. <include name="license.html" />
  338. <include name="css/**" />
  339. <include name="img/**" />
  340. </fileset>
  341. </copy>
  342. </target>
  343. <target name="compile-core" depends="init, preprocess-src">
  344. <echo>Compiling src (server-side)</echo>
  345. <!-- Compile core sources first as the other sources depend on these -->
  346. <mkdir dir="${result-classes-core}" />
  347. <javac source="1.5" target="1.5" classpathref="compile.classpath.server-side" destdir="${result-classes-core}" debug="true" encoding="UTF-8" includeantruntime="false">
  348. <src path="${result-src-core}"/>
  349. </javac>
  350. </target>
  351. <target name="compile-tests" depends="compile-core">
  352. <echo>Compiling src (Server and client side JUnit tests)</echo>
  353. <!-- Compile server and client side JUnit tests -->
  354. <mkdir dir="${result-classes-junit}" />
  355. <javac source="1.5" target="1.5" classpathref="compile.classpath.server-side-tests" destdir="${result-classes-junit}" debug="true" encoding="UTF-8" includeantruntime="false">
  356. <classpath path="${result-classes-core}"></classpath>
  357. <src path="${result-src-junit}"/>
  358. </javac>
  359. <echo>Compiling src (TestBench tests)</echo>
  360. <!-- Compile TestBench tests -->
  361. <mkdir dir="${result-classes-testbench}" />
  362. <javac source="1.5" target="1.5" classpathref="compile.classpath.server-side" destdir="${result-classes-testbench}" debug="true" encoding="UTF-8" includeantruntime="false">
  363. <classpath path="${result-classes-junit}"></classpath>
  364. <classpath path="${result-classes-core}"></classpath>
  365. <src path="${result-src-testbench}"/>
  366. </javac>
  367. </target>
  368. <target name="compile-helpers" depends="init">
  369. <mkdir dir="${buildhelpers-classes}" />
  370. <ivy:cachepath pathid="buildhelpers.dependencies" resolveId="buildhelpers" conf="compile" file="build/ivy/buildhelpers-ivy.xml"/>
  371. <javac source="1.5" target="1.5" includeantruntime="false" srcdir="${buildhelpers-src}"
  372. classpathref="buildhelpers.dependencies" destdir="${buildhelpers-classes}" debug="true" encoding="UTF-8" />
  373. </target>
  374. <target name="defaulttheme" depends="init, compile-helpers">
  375. <echo>Combining default themes css files</echo>
  376. <java classname="com.vaadin.buildhelpers.CompileDefaultTheme" failonerror="yes" fork="yes">
  377. <arg value="-version" />
  378. <arg value="${version.full}"/>
  379. <classpath>
  380. <path location="${buildhelpers-classes}" />
  381. <path refid="buildhelpers.dependencies" />
  382. </classpath>
  383. <jvmarg value="-Djava.awt.headless=true"/>
  384. </java>
  385. </target>
  386. <target name="testtarget">
  387. <echo>TEST TARGET CALLED</echo>
  388. </target>
  389. <!-- ================================================================== -->
  390. <!-- Widget Set Compilation -->
  391. <!-- ================================================================== -->
  392. <!-- Widget set compilation process: -->
  393. <!-- 1. Preprocess sources -->
  394. <!-- 2. Compile server-side java -->
  395. <!-- 3. Generate widget set definitions and classes -->
  396. <!-- 4. Compile widget sets -->
  397. <!-- -->
  398. <!-- Widget sets can be built for two purposes: -->
  399. <!-- * for building installation packages -->
  400. <!-- * for building single widget sets during development -->
  401. <!-- Targets: widgetset-<name> -->
  402. <target name="remove-widgetset-gwt-tmp">
  403. <echo>Removing widgetset temp files</echo>
  404. <delete dir="${widgetsets-output-dir}/.gwt-tmp" includeemptydirs="true"/>
  405. <!-- This is generated by GWT 2.3+ for rpcPolicyManifest and symbolMaps, cannot disable -->
  406. <delete dir="${widgetsets-output-dir}/WEB-INF" includeemptydirs="true" failonerror="false" />
  407. </target>
  408. <!-- The widgetset generator is currently compiled along with rest of server-side Java. -->
  409. <target name="compile-widgetset-generator" depends="compile-core"/>
  410. <target name="compile-widgetset" depends="init-deps" description="Compiles the widgetset given as the first parameter">
  411. <fail unless="widgetset" message="No widgetset parameter set"/>
  412. <property name="widgetset-style" value="OBF" />
  413. <property name="widgetset-localWorkers" value="4" />
  414. <property name="widgetset-extraParams" value="" />
  415. <echo>Compiling widgetset ${widgetset}. Output directory: ${widgetsets-output-dir}</echo>
  416. <mkdir dir="${widgetsets-output-dir}"/>
  417. <java classname="com.google.gwt.dev.Compiler" failonerror="yes" fork="yes" maxmemory="512m">
  418. <classpath>
  419. <path refid="compile.classpath.client-side" />
  420. <pathelement location="${result-classes-core}" />
  421. <pathelement location="${result-src-core}" />
  422. </classpath>
  423. <arg value="-war" />
  424. <arg value="${widgetsets-output-dir}" />
  425. <arg value="-style" />
  426. <arg value="${widgetset-style}" />
  427. <arg value="-localWorkers" />
  428. <arg value="${widgetset-localWorkers}" />
  429. <arg line="${widgetset-extraParams}" />
  430. <arg value="${widgetset}" />
  431. <jvmarg value="-Xss8M"/>
  432. <jvmarg value="-XX:MaxPermSize=256M"/>
  433. <jvmarg value="-Djava.awt.headless=true"/>
  434. </java>
  435. <antcall target="remove-widgetset-gwt-tmp"/>
  436. <echo>Compiled ${widgetset}</echo>
  437. </target>
  438. <target name="compile-widgetset-default">
  439. <antcall target="compile-widgetset">
  440. <reference refid="compile.classpath.client-side" />
  441. <param name="widgetset" value="com.vaadin.terminal.gwt.DefaultWidgetSet"/>
  442. </antcall>
  443. </target>
  444. <target name="compile-widgetset-portal-default" unless="compile.only.default-widgetset">
  445. <antcall target="compile-widgetset">
  446. <reference refid="compile.classpath.client-side" />
  447. <param name="widgetset" value="com.vaadin.portal.gwt.PortalDefaultWidgetSet"/>
  448. </antcall>
  449. </target>
  450. <!-- Compiles all widgetsets. -->
  451. <!-- This is called when building packages and when compiling all -->
  452. <!-- widgetsets, but not when compiling individual widgetsets. -->
  453. <target name="compile-client-side" depends="compile-server-side">
  454. <echo>Compiling widget sets in parallel.</echo>
  455. <parallel threadsperprocessor="1">
  456. <antcall inheritrefs="true" target="compile-widgetset-default"/>
  457. <antcall inheritrefs="true" target="compile-widgetset-portal-default"/>
  458. </parallel>
  459. </target>
  460. <!-- Definitions for building local components, i.e., not for an installation package. -->
  461. <target name="init-nonpackage" depends="build.properties">
  462. <!-- Definitions for building the client-side. -->
  463. <property name="widgetsets-output-dir" value="WebContent/VAADIN/widgetsets" />
  464. <echo>We are using ${lib-gwt-dev}.</echo>
  465. <echo>Widget sets output dir: ${widgetsets-output-dir}</echo>
  466. </target>
  467. <!-- Builds all widgetsets locally, i.e., not for an installation package. -->
  468. <target name="widgetsets" depends="init-nonpackage, init, compile-widgetset-generator, compile-client-side"/>
  469. <!-- Build each widgetset locally, i.e., not for an installation package. -->
  470. <target name="widgetset-default" depends="init-nonpackage, init, compile-widgetset-generator, compile-widgetset-default"/>
  471. <target name="widgetset-portal-default" depends="init-nonpackage, init, compile-widgetset-generator, compile-widgetset-portal-default"/>
  472. <!-- ================================================================== -->
  473. <!-- Libraries and Tests -->
  474. <!-- ================================================================== -->
  475. <!-- Compile the Vaadin library JAR. -->
  476. <!-- Need only the default widgetset for this, but can't depend -->
  477. <!-- specifically on it, because dependence does not see compiled -->
  478. <!-- individual widgetsets, because antcall does not fulfill -->
  479. <!-- dependencies. -->
  480. <target name="vaadin.jar" depends="compile-server-side, compile-client-side, compile-helpers">
  481. <echo>Creating JAR (server-side) ${lib-jar-name}</echo>
  482. <!-- Create Vaadin JAR -->
  483. <mkdir dir="${output-dir}/META-INF"/>
  484. <echo file="${output-dir}/META-INF/VERSION">${version.full}</echo>
  485. <echo file="${output-dir}/META-INF/GWT-VERSION">${gwt-version}</echo>
  486. <emma enabled="${emma.enabled}" >
  487. <instr instrpath="${result-classes-core}"
  488. destdir="${result-classes-core-for-emma-war}"
  489. mode="copy"
  490. metadatafile="${result-path}/war.es"
  491. merge="false"
  492. >
  493. <filter includes="com.vaadin.*" />
  494. <filter excludes="com.vaadin.terminal.gwt.*" />
  495. </instr>
  496. </emma>
  497. <jar jarfile="${output-dir}/WebContent/WEB-INF/lib/${lib-jar-name}"
  498. compress="true" manifest="build/package/META-INF/MANIFEST.MF" duplicate="preserve">
  499. <metainf dir="${output-dir}/META-INF"/>
  500. <manifest>
  501. <attribute name="Vaadin-Package-Version" value="1" />
  502. <attribute name="Vaadin-Widgetsets" value="com.vaadin.terminal.gwt.DefaultWidgetSet" />
  503. <attribute name="Implementation-Vendor" value="Vaadin Ltd" />
  504. <attribute name="Implementation-URL" value="http://vaadin.com" />
  505. <attribute name="Implementation-Version" value="${version.full}" />
  506. <attribute name="GWT-Version" value="${gwt-version}" />
  507. <attribute name="GWT-Version-Dependencies" value="${gwt-version-dependencies}" />
  508. <attribute name="Bundle-Version" value="${version.full}" />
  509. </manifest>
  510. <!-- Include any instrumented class files before the normal classes -->
  511. <fileset dir="${result-classes-core-for-emma-war}" />
  512. <fileset dir="${result-classes-core}"/>
  513. <!-- add sources -->
  514. <fileset dir="${result-src-core}"/>
  515. <fileset dir="${output-dir}/WebContent">
  516. <patternset>
  517. <include name="VAADIN/widgetsets/com.vaadin.terminal.gwt.DefaultWidgetSet/**/*" />
  518. <include name="VAADIN/themes/base/**/*" />
  519. <include name="VAADIN/themes/chameleon/**/*" />
  520. <include name="VAADIN/themes/liferay/**/*" />
  521. <include name="VAADIN/themes/runo/**/*" />
  522. <include name="VAADIN/themes/reindeer/**/*" />
  523. <include name="VAADIN/vaadinBootstrap.js" />
  524. <include name="release-notes.html" />
  525. <include name="license.html" />
  526. <include name="css/**" />
  527. <include name="img/**" />
  528. </patternset>
  529. </fileset>
  530. </jar>
  531. <!-- Generate the Export-Package attribute in the manifest of the JAR -->
  532. <java classname="com.vaadin.buildhelpers.GeneratePackageExports" failonerror="true" fork="yes">
  533. <arg value="${output-dir}/WebContent/WEB-INF/lib/${lib-jar-name}"/>
  534. <classpath>
  535. <pathelement location="${buildhelpers-classes}" />
  536. </classpath>
  537. </java>
  538. <echo>##teamcity[publishArtifacts '${output-dir}/WebContent/WEB-INF/lib/${lib-jar-name}']</echo>
  539. </target>
  540. <target name="vaadin-sources.jar" depends="init">
  541. <jar file="${result-path}/${lib-sources-jar-name}" compress="true">
  542. <fileset dir="${result-src-core}">
  543. <patternset>
  544. <include name="**/*.java" />
  545. </patternset>
  546. </fileset>
  547. <fileset dir="${output-dir}/WebContent">
  548. <patternset>
  549. <include name="release-notes.html" />
  550. <include name="license.html" />
  551. <include name="css/**" />
  552. <include name="img/**" />
  553. </patternset>
  554. </fileset>
  555. </jar>
  556. </target>
  557. <!-- ================================================================== -->
  558. <!-- Documentation -->
  559. <!-- ================================================================== -->
  560. <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
  561. <!-- Documentation: Add Javadoc to doc -->
  562. <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
  563. <target name="javadoc" depends="init, preprocess-src">
  564. <property name="javadoc.destdir" value="${output-dir}/WebContent/docs/api"/>
  565. <javadoc destdir="${javadoc.destdir}" author="true" version="true" use="true" windowtitle="${product-name}" classpathref="compile.classpath.client-side">
  566. <packageset dir="${result-src-core}"/>
  567. <doctitle>${javadoc.doctitle}</doctitle>
  568. <!-- <header><![CDATA[<script type="text/javascript" src=".html-style/style.js"></script>]]></header> -->
  569. <bottom>${javadoc.bottom}</bottom>
  570. <link offline="true" href="http://java.sun.com/j2se/1.5.0/docs/api/" packagelistLoc="build/javadoc/j2se-1.5.0" />
  571. <link offline="true" href="http://java.sun.com/j2ee/1.4/docs/api/" packagelistLoc="build/javadoc/j2ee-1.4" />
  572. </javadoc>
  573. <!-- Create a javadoc jar, mainly for Maven -->
  574. <jar file="${result-path}/${lib-javadoc-jar-name}" compress="true">
  575. <fileset dir="${javadoc.destdir}">
  576. <patternset>
  577. <include name="**" />
  578. </patternset>
  579. </fileset>
  580. <fileset dir="${output-dir}/WebContent">
  581. <patternset>
  582. <include name="release-notes.html" />
  583. <include name="license.html" />
  584. <include name="css/**" />
  585. <include name="img/**" />
  586. </patternset>
  587. </fileset>
  588. </jar>
  589. <!-- Append local style definitions. -->
  590. <echo>Appending local style definitions</echo>
  591. <concat destfile="${javadoc.destdir}/stylesheet.css" append="yes">
  592. <filelist dir="build/javadoc" files="stylesheet-local.css"/>
  593. </concat>
  594. </target>
  595. <!-- ================================================================== -->
  596. <!-- Difference to previous release package. -->
  597. <!-- ================================================================== -->
  598. <!-- This should be called after the Linux package is ready. -->
  599. <target name="differences" if="build.differences">
  600. <exec executable="python" searchpath="true" failonerror="true" output="${result-path}/differences.txt">
  601. <arg value="build/bin/package-diff.py"/>
  602. <arg value="${version.full}"/>
  603. </exec>
  604. <echo>##teamcity[publishArtifacts '${result-path}/differences.txt']</echo>
  605. </target>
  606. <!-- ================================================================== -->
  607. <!-- Custom build. -->
  608. <!-- ================================================================== -->
  609. <!-- Main target for the custom build. -->
  610. <!-- Need to read custom build configuration before calling clean-result -->
  611. <target name="custom-build" depends="custom-build-init, clean-result, nightly-init, init, build">
  612. </target>
  613. <!-- Initialize a custom build. -->
  614. <target name="custom-build-init">
  615. <echo>Preparing a custom build with properties file: ${build.properties.file}</echo>
  616. <!-- Custom build support -->
  617. <antcontrib:if>
  618. <isset property="build.properties.file"/>
  619. <then>
  620. <tstamp>
  621. <format property="build.date.compact" pattern="yyyyMMdd"/>
  622. </tstamp>
  623. <property file="${build.properties.file}" />
  624. <property name="version" value="${vaadin.version}"/>
  625. <property name="version.full" value="${version}-${build.date.compact}"/>
  626. </then>
  627. <!-- Otherwise version is set by the target "init" -->
  628. </antcontrib:if>
  629. </target>
  630. <target name="custom-build-maven-publish">
  631. <antcall target="nightly-maven-publish" />
  632. </target>
  633. <!-- ================================================================== -->
  634. <!-- Nightly build. -->
  635. <!-- ================================================================== -->
  636. <!-- Main target for the nightly build. -->
  637. <target name="nightly" depends="clean-result, nightly-init, init, build, javadoc, differences">
  638. </target>
  639. <!-- Initialize a nightly build. -->
  640. <target name="nightly-init" depends="build.properties">
  641. <!-- Mandatory parameters. -->
  642. <fail unless="build.number" message="The build.number property must be defined."/>
  643. <fail unless="nightly.publish" message="The nightly.publish property must be defined."/>
  644. <!-- Optional parameters. -->
  645. <property name="build.tag" value="dev"/>
  646. <echo>Base version: ${version}</echo>
  647. <echo>Build number: ${build.number}</echo>
  648. <echo>Build tag: ${build.tag}</echo>
  649. <echo>Publish target: ${nightly.publish}</echo>
  650. <echo>Demo publish target: ${nightly.demo.publish}</echo>
  651. <!-- Set build number. -->
  652. <tstamp>
  653. <format property="nightly.date" pattern="yyyyMMdd"/>
  654. </tstamp>
  655. <property name="version.full" value="${version}.${build.tag}-${nightly.date}-${build.number}"/>
  656. <echo>Version will be: ${version.full}</echo>
  657. <!-- Tell TeamCity the build name. Have to do it this way, because -->
  658. <!-- this script needs to get the plain build number as a parameter. -->
  659. <echo>##teamcity[buildNumber '${version}-c${build.number}']</echo>
  660. </target>
  661. <target name="nightly-teamcity-publish">
  662. <!-- Publish as a TeamCity artifact. -->
  663. <echo>##teamcity[publishArtifacts '${output-dir}/WebContent/WEB-INF/lib/${lib-jar-name}']</echo>
  664. </target>
  665. <!-- Copies the nightly build artifacts to the download server. -->
  666. <target name="nightly-download-publish" if="nightly.publish">
  667. <!-- Publish to the download server. -->
  668. <echo>Installing ${output-dir}/WebContent/WEB-INF/lib/${lib-jar-name} to ${nightly.publish}</echo>
  669. <echo>Hopefully you have permissions for the copy operation with SSH.</echo>
  670. <!-- Copy the linux installation package and the JAR. -->
  671. <exec executable="scp" searchpath="true" resultproperty="nightly.install.scp.result">
  672. <arg value="-B"/>
  673. <arg value="${output-dir}/WebContent/WEB-INF/lib/${lib-jar-name}"/>
  674. <arg value="${nightly.publish}"/>
  675. </exec>
  676. <echo>Result: ${nightly.install.scp.result}</echo>
  677. </target>
  678. <!-- Copies the nightly build artifacts to the download server. -->
  679. <target name="nightly-tests-publish" if="nightly.demo.publish" depends="internal-package-war">
  680. <fail unless="version.major" message="Major version must be defined in version.major"/>
  681. <fail unless="version.minor" message="Major version must be defined in version.minor"/>
  682. <!-- Publish to the demo server. -->
  683. <property name="src" value="${result-path}/${test-war-filename}"/>
  684. <property name="target" value="${nightly.demo.publish}/${version.major}.${version.minor}-${build.tag}.war"/>
  685. <echo>Installing ${src} to ${target}</echo>
  686. <!-- Copy the linux installation package and the JAR. -->
  687. <exec executable="scp" searchpath="true" resultproperty="nightly.demo.install.scp.result">
  688. <arg value="-B"/>
  689. <arg value="${src}"/>
  690. <arg value="${target}"/>
  691. </exec>
  692. <echo>Result: ${nightly.install.scp.result}</echo>
  693. </target>
  694. <target name="nightly-publish" depends="nightly-teamcity-publish, nightly-download-publish, nightly-tests-publish">
  695. </target>
  696. <target name="nightly-maven-pom.xml">
  697. <echo>Creating pom.xml for nightly build</echo>
  698. <property name="vaadin.version.maven" value="${version.major}.${version.minor}-SNAPSHOT" />
  699. <copy tofile="build/maven/pom.xml">
  700. <filterchain>
  701. <expandproperties />
  702. <replacetokens begintoken="@" endtoken="@">
  703. <token key="MAVEN-VERSION" value="${vaadin.version.maven}" />
  704. </replacetokens>
  705. </filterchain>
  706. <fileset file="build/maven/pom-template.xml"/>
  707. </copy>
  708. </target>
  709. <target name="nightly-maven-publish" depends="nightly-maven-pom.xml">
  710. <property file="${gpg.passphrase.file}" />
  711. <echo>Publishing ${output-dir}/WebContent/WEB-INF/lib/${lib-jar-name} to Maven repository</echo>
  712. <artifact:mvn>
  713. <arg value="gpg:sign-and-deploy-file"/>
  714. <!-- .. is a workaround as maven runs in the build directory -->
  715. <sysproperty key="file" value="../${output-dir}/WebContent/WEB-INF/lib/${lib-jar-name}" />
  716. <sysproperty key="pomFile" value="maven/pom.xml" />
  717. <sysproperty key="repositoryId" value="vaadin-snapshots" />
  718. <sysproperty key="url" value="${snapshot.repository.url}" />
  719. <sysproperty key="gpg.passphrase" value="${gpg.passphrase}" />
  720. </artifact:mvn>
  721. </target>
  722. <target name="local-maven-pom.xml">
  723. <echo>Creating pom.xml for local test build</echo>
  724. <fail unless="version.major" message="Major version must be defined in version.major"/>
  725. <fail unless="version.minor" message="Major version must be defined in version.minor"/>
  726. <property name="vaadin.version.maven" value="${version.major}.${version.minor}" />
  727. <copy tofile="build/maven/pom.xml">
  728. <filterchain>
  729. <expandproperties />
  730. <replacetokens begintoken="@" endtoken="@">
  731. <token key="MAVEN-VERSION" value="${vaadin.version.maven}" />
  732. </replacetokens>
  733. </filterchain>
  734. <fileset file="build/maven/pom-template.xml"/>
  735. </copy>
  736. </target>
  737. <target name="local-maven-publish" depends="local-maven-pom.xml">
  738. <echo>Publishing ${output-dir}/WebContent/WEB-INF/lib/${lib-jar-name} to the local Maven repository</echo>
  739. <artifact:mvn>
  740. <arg value="install:install-file"/>
  741. <!-- .. is a workaround as maven runs in the build directory -->
  742. <sysproperty key="file" value="../${output-dir}/WebContent/WEB-INF/lib/${lib-jar-name}" />
  743. <sysproperty key="pomFile" value="maven/pom.xml" />
  744. </artifact:mvn>
  745. </target>
  746. <!-- ================================================================== -->
  747. <!-- Automated tests. -->
  748. <!-- ================================================================== -->
  749. <target name="tests" depends="compile-tests, internal-package-war">
  750. <!-- Run all different types of tests in parallel to decrease testing time -->
  751. <parallel threadcount="3">
  752. <sequential>
  753. <!-- Sleep before running integration tests so testbench tests have time to compile and start -->
  754. <sleep minutes="4" />
  755. <antcall inheritrefs="true" inheritall="true" target="integration-tests"></antcall>
  756. </sequential>
  757. <antcall inheritrefs="true" inheritall="true" target="testbench-tests"></antcall>
  758. <antcall inheritrefs="true" inheritall="true" target="server-side-tests"></antcall>
  759. </parallel>
  760. <!-- Create a combined report from each test's sub report -->
  761. <emma enabled="${emma.enabled}" >
  762. <merge file="${result-path}/combined.es">
  763. <fileset dir="${result-path}" >
  764. <include name="*.ec" />
  765. <include name="*.em" />
  766. </fileset>
  767. </merge>
  768. <report sourcepath="${result-src-core}" >
  769. <fileset dir="${result-path}" >
  770. <include name="combined.es" />
  771. </fileset>
  772. <txt outfile="../${result-path}/coverage/coverage-combined/coverage.txt" />
  773. <html outfile="../${result-path}/coverage/coverage-combined/coverage.html" />
  774. </report>
  775. </emma>
  776. <echo>##teamcity[publishArtifacts '${result-path}/coverage']</echo>
  777. </target>
  778. <!-- Assumes java classes have been compiled but depends does not work out well as this is run from a <parallel> task-->
  779. <target name="server-side-tests" unless="tests.serverside.skip" depends="compile-tests">
  780. <emma enabled="${emma.enabled}" >
  781. <instr instrpath="${result-classes-core}"
  782. destdir="${result-classes-core-for-emma-junit}"
  783. mode="copy"
  784. metadatafile="${result-path}/unittests.em"
  785. merge="false"
  786. >
  787. <filter includes="com.vaadin.*" />
  788. <filter excludes="com.vaadin.terminal.gwt.*" />
  789. </instr>
  790. </emma>
  791. <junit printsummary="yes">
  792. <classpath>
  793. <pathelement path="${result-classes-core-for-emma-junit}" />
  794. <pathelement path="${result-classes-core}" />
  795. <pathelement path="${result-classes-junit}" />
  796. <path refid="compile.classpath.server-side-tests"></path>
  797. </classpath>
  798. <jvmarg value="-Demma.coverage.out.file=../${result-path}/unittests.ec" />
  799. <batchtest fork="yes">
  800. <fileset dir="tests/server-side" includes="**/*.java" excludes="**/Abstract*.java,com/vaadin/tests/data/bean/*.java,com/vaadin/tests/util/*.java,**/VaadinClasses.java" />
  801. <fileset dir="tests/client-side" includes="**/*.java" excludes="**/Abstract*.java" />
  802. </batchtest>
  803. </junit>
  804. <emma enabled="${emma.enabled}" >
  805. <report sourcepath="${result-src-core}" >
  806. <fileset dir="${result-path}" >
  807. <include name="unittests.*" />
  808. </fileset>
  809. <txt outfile="../${result-path}/coverage/coverage-unittests/unittests_coverage.txt" />
  810. <html outfile="../${result-path}/coverage/coverage-unittests/unittests_coverage.html" />
  811. </report>
  812. </emma>
  813. <echo>##teamcity[publishArtifacts '${result-path}/coverage']</echo>
  814. </target>
  815. <!-- Assumes java classes have been compiled but depends does not work out well as this is run from a <parallel> task-->
  816. <target name="testbench-tests" unless="tests.testbench.skip">
  817. <fail unless="product-file" message="The 'product-file' property must be defined."/>
  818. <fail unless="version" message="The 'version' property must be defined."/>
  819. <echo>Version: ${version.full}</echo>
  820. <!-- Parameters for the test.xml script. -->
  821. <fail unless="com.vaadin.testbench.tester.host" message="The 'com.vaadin.testbench.tester.host' property must be defined."/>
  822. <fail unless="com.vaadin.testbench.deployment.url" message="The 'com.vaadin.testbench.deployment.url' property must be defined."/>
  823. <fail unless="com.vaadin.testbench.lib.dir" message="The 'com.vaadin.testbench.lib.dir' property must be defined."/>
  824. <property name="com.vaadin.testbench.screenshot.block.error" value="0.025"/>
  825. <property name="com.vaadin.testbench.debug" value="false"/>
  826. <property name="package.name" value="${base-name}"/>
  827. <!-- Only Linux tests allowed. TODO: Generalize this. -->
  828. <property name="package.filename" value="${result-path}/${test-war-filename}"/>
  829. <!-- Run the separate test script. -->
  830. <ant antfile="tests/test.xml" target="test-package" inheritall="false" inheritrefs="true">
  831. <!-- This is provided so that the test script can copy the -->
  832. <!-- "tests" classes after unpacking the package. -->
  833. <property name="output-dir" value="${output-dir}"/>
  834. <!-- Convert tests to run multiple times if failed. -->
  835. <property name="retries" value="2"/>
  836. <property name="package.filename" value="${basedir}/${package.filename}"/>
  837. <property name="testing.testarea" value="/tmp/testarea"/>
  838. <property name="package.name" value="${package.name}"/>
  839. <property name="test-output-dir" value="../build/test-output" />
  840. <property name="com.vaadin.testbench.tester.host" value="${com.vaadin.testbench.tester.host}"/>
  841. <property name="com.vaadin.testbench.deployment.url" value="${com.vaadin.testbench.deployment.url}"/>
  842. <property name="com.vaadin.testbench.lib.dir" value="${com.vaadin.testbench.lib.dir}"/>
  843. <property name="com.vaadin.testbench.debug" value="${com.vaadin.testbench.debug}"/>
  844. <property name="com.vaadin.testbench.screenshot.block.error" value="${com.vaadin.testbench.screenshot.block.error}"/>
  845. <property name="deps.initialized" value="${deps.initialized}"/>
  846. </ant>
  847. <emma enabled="${emma.enabled}" >
  848. <report sourcepath="${result-src-core}" >
  849. <fileset dir="${result-path}" >
  850. <include name="war.*" />
  851. </fileset>
  852. <txt outfile="../${result-path}/coverage/coverage-testbench/testbench_coverage.txt" />
  853. <html outfile="../${result-path}/coverage/coverage-testbench/testbench_coverage.html" />
  854. </report>
  855. </emma>
  856. <echo>##teamcity[publishArtifacts '${result-path}/coverage/']</echo>
  857. </target>
  858. <!-- Assumes java classes have been compiled but depends does not work out well as this is run from a <parallel> task-->
  859. <target name="integration-tests" depends="init-deps" unless="tests.integration.skip">
  860. <!-- Parameters for the test.xml script. -->
  861. <fail unless="com.vaadin.testbench.tester.host" message="The 'com.vaadin.testbench.tester.host' property must be defined."/>
  862. <fail unless="com.vaadin.testbench.lib.dir" message="The 'com.vaadin.testbench.lib.dir' property must be defined."/>
  863. <fail unless="sshkey.file" message="The 'sshkey.file' property must be defined."/>
  864. <!-- Empty passphrase if no passphrase defined -->
  865. <property name="passphrase" value="" />
  866. <property name="tests.war" location="${result-path}/${test-war-filename}" />
  867. <!-- Run the separate test script. -->
  868. <ant antfile="tests/integration_tests.xml" target="integration-test-all" inheritall="false" inheritrefs="true">
  869. <!-- This is provided so that the test script can copy the -->
  870. <!-- "tests" classes after unpacking the package. -->
  871. <property name="output-dir" value="${output-dir}"/>
  872. <property name="com.vaadin.testbench.tester.host" value="${com.vaadin.testbench.tester.host}"/>
  873. <property name="com.vaadin.testbench.lib.dir" value="${com.vaadin.testbench.lib.dir}"/>
  874. <property name="sshkey.file" value="${sshkey.file}" />
  875. <property name="passphrase" value="${passphrase}" />
  876. <property name="demo.war" value="${tests.war}"/>
  877. <property name="deps.initialized" value="${deps.initialized}"/>
  878. </ant>
  879. </target>
  880. </project>
  881. <!-- These are for emacs. -->
  882. <!-- Keep this comment at the end of the file
  883. Local variables:
  884. mode: xml
  885. sgml-omittag:nil
  886. sgml-shorttag:nil
  887. sgml-namecase-general:nil
  888. sgml-general-insert-case:lower
  889. sgml-minimize-attributes:nil
  890. sgml-always-quote-attributes:t
  891. sgml-indent-step:4
  892. sgml-indent-data:t
  893. sgml-parent-document:nil
  894. sgml-exposed-tags:nil
  895. sgml-local-catalogs:("/etc/sgml/catalog" "/usr/share/xemacs21/xemacs-packages/etc/psgml-dtds/CATALOG")
  896. sgml-local-ecat-files:("ECAT" "~/sgml/ECAT" "/usr/share/sgml/ECAT" "/usr/local/share/sgml/ECAT" "/usr/local/lib/sgml/ECAT")
  897. End:
  898. -->