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

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