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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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. <!-- JUnit tests, can be run without a server -->
  45. <subant buildpathref="build-path" target="test" />
  46. <!-- Server deployment + TestBench tests -->
  47. <ant antfile="uitest/build.xml" target="test-testbench">
  48. <property name="war.file" location="${war.file}" />
  49. </ant>
  50. </parallel>
  51. </target>
  52. <target name="official.build.checks" if="build.release">
  53. <condition property="java.version.matches">
  54. <equals arg1="${ant.java.version}" arg2="${vaadin.java.version}" />
  55. </condition>
  56. <fail unless="java.version.matches" message="Java version is ${ant.java.version}, but Vaadin must be compiled with genuine Java ${vaadin.java.version} compiler." />
  57. <echo>Java version is ${ant.java.version} as required.</echo>
  58. </target>
  59. </project>