You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

taskcontainer.xml 1.3 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <project default="dont-run-this">
  2. <property name="build.dir" value="build"/>
  3. <target name="dont-run-this">
  4. <fail>This build file is supposed to be run by a Unit test</fail>
  5. </target>
  6. <target name="testPropertyExpansion">
  7. <sequential>
  8. <property name="foo" value="it worked"/>
  9. <echo message="As attribute: ${foo}"/>
  10. <echo>As nested text: ${foo}</echo>
  11. </sequential>
  12. </target>
  13. <target name="testTaskdef">
  14. <mkdir dir="${build.dir}"/>
  15. <javac srcdir="containersrc" destdir="${build.dir}" debug="on"/>
  16. <sequential>
  17. <taskdef name="sseq" classpath="${build.dir}" classname="test.SpecialSeq"/>
  18. <sseq>
  19. <fileset dir="."/>
  20. <property name="foo" value="it worked"/>
  21. <echo message="As attribute: ${foo}"/>
  22. <echo>As nested text: ${foo}</echo>
  23. <nested message="As nested task: ${foo}"/>
  24. </sseq>
  25. </sequential>
  26. </target>
  27. <target name="testCaseInsensitive">
  28. <taskdef name="Prattle" classname="org.apache.tools.ant.taskdefs.Echo"/>
  29. <taskdef name="Seq"
  30. classname="org.apache.tools.ant.taskdefs.Sequential"/>
  31. <Prattle>hello</Prattle>
  32. <Seq>
  33. <Prattle> world</Prattle>
  34. </Seq>
  35. </target>
  36. <target name="cleanup">
  37. <delete dir="${build.dir}"/>
  38. </target>
  39. </project>