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.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <?xml version="1.0"?>
  2. <project name="vaadin" basedir="." default="package" xmlns:ivy="antlib:org.apache.ivy.ant">
  3. <include file="common.xml" as="common" />
  4. <path id="vaadin.buildhelpers.classpath" location="${vaadin.basedir}/buildhelpers/result/classes" />
  5. <!-- ================================= target: all ================================= -->
  6. <!--<target name="all" description="Compiles all parts of the project"
  7. depends="buildhelpers,theme-compiler,shared,server,client"> -->
  8. <target name="package" description="Compiles and packages all modules in the project" depends="buildorder">
  9. <subant buildpathref="build-path" target="publish-local">
  10. </subant>
  11. </target>
  12. <target name="buildorder" depends="official.build.checks">
  13. <!-- Find out a good build order -->
  14. <ivy:buildlist reference="ivy.build.path">
  15. <fileset dir="." includes="**/build.xml">
  16. <exclude name="build.xml" />
  17. <exclude name="build/**" />
  18. <exclude name="buildhelpers/**" />
  19. </fileset>
  20. </ivy:buildlist>
  21. <path id="build-path">
  22. <path location="buildhelpers/build.xml" />
  23. <path refid="ivy.build.path" />
  24. </path>
  25. </target>
  26. <target name="clean" depends="buildorder">
  27. <subant buildpathref="build-path" target="clean">
  28. </subant>
  29. <delete dir="result" />
  30. <!-- Clean IVY cache (~/.ivy2) so no old artifacts are fetched from
  31. there (leave everything but Vaadin artifacts) -->
  32. <delete dir="${ivy.cache.dir}/com.vaadin" />
  33. <delete dir="${ivy.cache.dir}/com.carrotsearch" />
  34. </target>
  35. <target name="checkstyle" depends="buildorder">
  36. <subant buildpathref="build-path" target="checkstyle" />
  37. </target>
  38. <target name="test" depends="buildorder">
  39. <subant buildpathref="build-path" target="test" />
  40. </target>
  41. <target name="test-all" depends="buildorder">
  42. <property name="war.file" location="result/artifacts/${vaadin.version}/vaadin-uitest/vaadin-uitest-${vaadin.version}.war" />
  43. <parallel>
  44. <sequential>
  45. <!-- Sleep before running integration tests so testbench
  46. tests have time to compile and start -->
  47. <sleep minutes="4" />
  48. <ant antfile="uitest/integration_tests.xml" target="integration-test-all" inheritall="false" inheritrefs="false">
  49. <property name="demo.war" value="${war.file}" />
  50. </ant>
  51. </sequential>
  52. <subant buildpathref="build-path" target="test" />
  53. <ant antfile="uitest/test.xml" target="test-package">
  54. <property name="war.file" location="${war.file}" />
  55. </ant>
  56. </parallel>
  57. </target>
  58. <target name="official.build.checks" if="build.release">
  59. <condition property="java.version.matches">
  60. <equals arg1="${ant.java.version}" arg2="${vaadin.java.version}" />
  61. </condition>
  62. <fail unless="java.version.matches" message="Java version is ${ant.java.version}, but Vaadin must be compiled with genuine Java ${vaadin.java.version} compiler." />
  63. <echo>Java version is ${ant.java.version} as required.</echo>
  64. </target>
  65. </project>