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 3.3KB

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