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.2KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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="bin/**" />
  19. <exclude name="buildhelpers/**" />
  20. <exclude name="all/**" />
  21. </fileset>
  22. </ivy:buildlist>
  23. <path id="build-path">
  24. <path location="buildhelpers/build.xml" />
  25. <path refid="ivy.build.path" />
  26. <path location="all/build.xml" />
  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. <parallel>
  46. <!-- JUnit tests, can be run without a server -->
  47. <subant buildpathref="build-path" target="test" />
  48. <!-- Server deployment + TestBench tests -->
  49. <antcall target="integration-test" />
  50. </parallel>
  51. </target>
  52. <target name="integration-test" depends="buildorder">
  53. <property name="war.file" location="result/artifacts/${vaadin.version}/vaadin-uitest/vaadin-uitest-${vaadin.version}.war" />
  54. <ant antfile="uitest/build.xml" target="test-testbench">
  55. <property name="war.file" location="${war.file}" />
  56. </ant>
  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>