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

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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. </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
  32. there (leave everything but Vaadin artifacts) -->
  33. <delete dir="${ivy.cache.dir}/com.vaadin" />
  34. <delete dir="${ivy.cache.dir}/com.carrotsearch" />
  35. </target>
  36. <target name="checkstyle" depends="buildorder">
  37. <subant buildpathref="build-path" target="checkstyle" />
  38. </target>
  39. <target name="test" depends="buildorder">
  40. <subant buildpathref="build-path" target="test" />
  41. </target>
  42. <target name="test-all" depends="buildorder">
  43. <parallel>
  44. <!-- JUnit tests, can be run without a server -->
  45. <subant buildpathref="build-path" target="test" />
  46. <!-- Server deployment + TestBench tests -->
  47. <antcall target="integration-test" />
  48. </parallel>
  49. </target>
  50. <target name="integration-test" depends="buildorder">
  51. <property name="war.file" location="result/artifacts/${vaadin.version}/vaadin-uitest/vaadin-uitest-${vaadin.version}.war" />
  52. <ant antfile="uitest/build.xml" target="test-testbench">
  53. <property name="war.file" location="${war.file}" />
  54. </ant>
  55. </target>
  56. <target name="official.build.checks" if="build.release">
  57. <condition property="java.version.matches">
  58. <equals arg1="${ant.java.version}" arg2="${vaadin.java.version}" />
  59. </condition>
  60. <fail unless="java.version.matches" message="Java version is ${ant.java.version}, but Vaadin must be compiled with genuine Java ${vaadin.java.version} compiler." />
  61. <echo>Java version is ${ant.java.version} as required.</echo>
  62. </target>
  63. </project>