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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. <?xml version="1.0"?>
  2. <project name="vaadin-uitest" basedir="." default="publish-local" xmlns:ivy="antlib:org.apache.ivy.ant">
  3. <description>
  4. Provides a uitest WAR containing Vaadin UI tests
  5. </description>
  6. <include file="../common.xml" as="common" />
  7. <include file="../build.xml" as="vaadin" />
  8. <!-- global properties -->
  9. <property name="module.name" value="vaadin-uitest" />
  10. <property name="result.dir" value="result" />
  11. <property name="result.war" location="${result.dir}/lib/${module.name}-${vaadin.version}.war" />
  12. <path id="classpath.compile.custom">
  13. </path>
  14. <target name="dependencies">
  15. <!-- This is copied from common.xml to be able to add server.test.source to the source path -->
  16. <ivy:resolve resolveid="common" conf="build, build-provided" />
  17. <ivy:cachepath pathid="classpath.compile.dependencies" conf="build, build-provided" />
  18. </target>
  19. <target name="compile" description="Compiles the module" depends="dependencies">
  20. <fail unless="module.name" message="No module name given" />
  21. <property name="result.dir" location="result" />
  22. <property name="src" location="${result.dir}/../src" />
  23. <property name="classes" location="${result.dir}/classes" />
  24. <property name="server.test.sources" location="${result.dir}/../../server/tests/src" />
  25. <mkdir dir="${classes}" />
  26. <!-- TODO: Get rid of this -->
  27. <javac destdir="${classes}" source="${vaadin.java.version}" target="${vaadin.java.version}" debug="true" encoding="UTF-8" includeantruntime="false">
  28. <src path="${server.test.sources}" />
  29. <include name="com/vaadin/tests/data/bean/**" />
  30. <include name="com/vaadin/tests/VaadinClasses.java" />
  31. <include name="com/vaadin/data/util/sqlcontainer/SQLTestsConstants.java" />
  32. <classpath refid="classpath.compile.dependencies" />
  33. <classpath refid="classpath.compile.custom" />
  34. </javac>
  35. <javac destdir="${classes}" source="${vaadin.java.version}" target="${vaadin.java.version}" debug="true" encoding="UTF-8" includeantruntime="false">
  36. <src path="${src}" />
  37. <classpath location="${classes}" />
  38. <classpath refid="classpath.compile.dependencies" />
  39. <classpath refid="classpath.compile.custom" />
  40. </javac>
  41. </target>
  42. <target name="testing-widgetset" depends="dependencies,compile">
  43. <property name="module" value="com.vaadin.tests.widgetset.TestingWidgetSet" />
  44. <property name="style" value="OBF" />
  45. <property name="localWorkers" value="2" />
  46. <property name="extraParams" value="" />
  47. <property name="module.output.dir" location="${result.dir}/VAADIN/widgetsets" />
  48. <property name="work.dir" location="${result.dir}/work" />
  49. <mkdir dir="${module.output.dir}" />
  50. <echo>Compiling ${module} to ${module.output.dir}</echo>
  51. <!-- compile the module -->
  52. <java classname="com.google.gwt.dev.Compiler" classpathref="classpath.compile.dependencies" failonerror="yes" fork="yes" maxmemory="512m">
  53. <classpath location="src" />
  54. <classpath location="${classes}" />
  55. <arg value="-workDir" />
  56. <arg value="${work.dir}" />
  57. <arg value="-logLevel" />
  58. <arg value="TRACE" />
  59. <arg value="-war" />
  60. <arg value="${module.output.dir}" />
  61. <arg value="-style" />
  62. <arg value="${style}" />
  63. <arg value="-localWorkers" />
  64. <arg value="${localWorkers}" />
  65. <arg value="-strict" />
  66. <arg line="${extraParams}" />
  67. <arg value="${module}" />
  68. <sysproperty key="vFailIfNotSerializable" value="true" />
  69. <jvmarg value="-Xss8M" />
  70. <jvmarg value="-XX:MaxPermSize=256M" />
  71. <jvmarg value="-Djava.awt.headless=true" />
  72. </java>
  73. </target>
  74. <target name="war" depends="dependencies, compile, testing-widgetset">
  75. <property name="result.dir" location="result" />
  76. <property name="classes" location="${result.dir}/classes" />
  77. <property name="WebContent.dir" location="${vaadin.basedir}/WebContent" />
  78. <property name="deps.dir" location="${result.dir}/deps" />
  79. <property name="src" location="${result.dir}/../src" />
  80. <ivy:resolve resolveid="common" conf="build" />
  81. <ivy:cachepath pathid="classpath.runtime.dependencies" conf="build" />
  82. <delete dir="${deps.dir}" />
  83. <mkdir dir="${deps.dir}" />
  84. <copy todir="${deps.dir}" flatten="true">
  85. <path refid="classpath.runtime.dependencies" />
  86. </copy>
  87. <!-- Ensure filtered webcontent files are available -->
  88. <antcall target="common.filter.webcontent" />
  89. <war destfile="${result.war}" duplicate="fail" index="true">
  90. <fileset refid="common.files.for.all.jars" />
  91. <fileset dir="${result.dir}">
  92. <include name="VAADIN/widgetsets/**/*"/>
  93. </fileset>
  94. <fileset dir="${WebContent.dir}">
  95. <include name="statictestfiles/**" />
  96. <include name="VAADIN/themes/tests-*/**" />
  97. <include name="VAADIN/themes/reindeer-tests/**" />
  98. <include name="WEB-INF/*.xml" />
  99. </fileset>
  100. <classes dir="${classes}" />
  101. <classes dir="${src}" />
  102. <lib dir="${deps.dir}" />
  103. </war>
  104. </target>
  105. <target name="publish-local" depends="war">
  106. <antcall target="common.publish-local">
  107. <param name="conf" value="build" />
  108. </antcall>
  109. </target>
  110. <target name="clean">
  111. <antcall target="common.clean" />
  112. </target>
  113. <target name="checkstyle">
  114. <echo>Checkstyle is disabled for uitest for now</echo>
  115. </target>
  116. <target name="test" depends="checkstyle">
  117. <!--<antcall target="common.test.run" />-->
  118. <echo>WHAT? No JUnit tests for ${module.name}!</echo>
  119. </target>
  120. </project>