summaryrefslogtreecommitdiff
path: root/support/ant/test.xml
blob: d171ae6481a86201691a880c697bf5db18ea17d9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<project name="scala.scalac4ant.test" default="build.jar" basedir=".">

  <!-- the compiler MUST be on your classpath -->

  <property name="jar.file" value="scalac4ant.jar"/>
  <property name="sources" value="src.scala" />            <!-- the source directory -->
  <property name="build.dir" value="build"/>               <!-- the target directory -->

  <!-- task definition for scalac -->
  <!-- due to a bug in ant, giving a classpath here does not work. 
       scalac4jar and the scalac compiler must be on your classpath already -->
  <taskdef name="scalac"
           classname="scala.tools.scalac4ant.AntTask"/>

  <target name="init">
    <mkdir dir="${build.dir}"/>
  </target>

  <!-- testing the ant task by compiling the ant task -->

  <target name="build.anttask" depends="init">
    <scalac srcdir="${sources}" destdir="${build.dir}" force="true">
      <include name="scala/tools/scalac4ant/*.scala"/>
    </scalac>
  </target>

 <!-- building jar -->

  <target name="build.jar" depends="build.anttask">
    <!-- Create war file  -->
    <jar jarfile="${jar.file}" basedir="${build.dir}">
	 <include name="scala/tools/scalac4ant/**"/>
    </jar>
  </target>  

</project>