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

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <?xml version="1.0"?>
  2. <project name="vaadin-theme-compiler" basedir="." default="publish-local" xmlns:ivy="antlib:org.apache.ivy.ant" xmlns:antcontrib="antlib:net.sf.antcontrib">
  3. <description>
  4. Compiles build helpers used when building other modules.
  5. </description>
  6. <include file="../common.xml" as="common" />
  7. <include file="../build.xml" as="vaadin" />
  8. <include file="../gwt-files.xml" as="gwtfiles" />
  9. <!-- global properties -->
  10. <property name="module.name" value="vaadin-theme-compiler" />
  11. <property name="module.symbolic" value="com.vaadin.theme-compiler" />
  12. <property name="result.dir" value="result" />
  13. <property name="parser.src.dir" value="src/com/vaadin/sass/internal/parser" />
  14. <property name="generate.dir" value="${result.dir}/generated/${parser.src.dir}" />
  15. <property name="header.file" location="apache2header.txt" />
  16. <path id="classpath.compile.custom">
  17. </path>
  18. <path id="classpath.test.custom" />
  19. <!--<property name="classes.exclude" value="com/vaadin/buildhelpers/**"
  20. /> -->
  21. <target name="parser">
  22. <!-- Copy javacc-5.0.jar to ${result.dir}/javacc/javacc.jar as the
  23. javacc task requires the jar to be named javacc.jar -->
  24. <property name="javacc.home" location="${result.dir}/javacc" />
  25. <ivy:retrieve organisation="net.java.dev.javacc" module="javacc" revision="5.0" inline="true" type="jar" pattern="${javacc.home}/[artifact].[ext]" />
  26. <delete dir="${generate.dir}" />
  27. <mkdir dir="${generate.dir}" />
  28. <!-- Generate new parser files in another directory, this ensure
  29. they are always generated -->
  30. <copy file="${parser.src.dir}/Parser.jj" todir="${generate.dir}" />
  31. <javacc target="${generate.dir}/Parser.jj" javacchome="${javacc.home}">
  32. </javacc>
  33. <!-- Add headers to the generated files and copy back to src -->
  34. <antcontrib:foreach target="prepend.generated.file.header" param="path">
  35. <path>
  36. <fileset dir="${generate.dir}" includes="*.java" />
  37. </path>
  38. </antcontrib:foreach>
  39. </target>
  40. <target name="prepend.generated.file.header">
  41. <basename property="file" file="${path}" />
  42. <concat destfile="${parser.src.dir}/${file}">
  43. <header filtering="no" trimleading="no" file="${header.file}" />
  44. <path path="${generate.dir}/${file}" />
  45. </concat>
  46. </target>
  47. <target name="jar" depends="parser">
  48. <antcall target="common.jar">
  49. <reference torefid="extra.jar.includes" refid="empty.reference" />
  50. </antcall>
  51. </target>
  52. <target name="publish-local" depends="jar">
  53. <antcall target="common.sources.jar">
  54. <reference torefid="extra.jar.includes" refid="empty.reference" />
  55. </antcall>
  56. <antcall target="common.javadoc.jar" />
  57. <antcall target="common.publish-local" />
  58. </target>
  59. <target name="clean">
  60. <antcall target="common.clean" />
  61. </target>
  62. <target name="checkstyle">
  63. <antcall target="common.checkstyle">
  64. <param name="cs.src" location="src" />
  65. </antcall>
  66. </target>
  67. <target name="test" depends="checkstyle">
  68. <antcall target="common.test.run" />
  69. </target>
  70. </project>