root/other-projects/the-macronizer/trunk/build.xml @ 30063

Revision 30063, 1.8 KB (checked in by davidb, 5 years ago)

Replacement of NetBeans? based ant compile files with much simpler build.xml that only needs a Java JDK, not a Java EE to compile and be deployed

  • Property svn:mime-type set to application/xml
Line 
1<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2<project basedir="." default="war" name="TheMacronizer">
3
4  <property environment="env"/>
5
6  <property name="dist.dir.exp" location="releases" />
7 
8  <property name="dist.filename.exp"   value="TheMacronizer.war" />
9  <property name="build.dir.exp"   location="web" />
10  <property name="lib.dir.exp"  location="web/WEB-INF/lib" />
11 
12  <!--
13      If changing these values, make sure you run 'ant clean'
14  -->
15  <property name="javac.source" value="1.8" />
16  <property name="javac.target" value="${javac.source}" />
17  <property name="javac.debug"  value="true" />
18
19
20  <path id="classpath.exp">
21    <fileset dir="${lib.dir.exp}">
22    <include name="*.jar" />
23    </fileset>
24  </path>
25   
26 
27  <target name="clean">
28    <!-- delete only the class files built by themacronizer -->
29    <delete dir="${build.dir.exp}/WEB-INF/classes"/>
30  </target>
31
32 
33  <target name="init">
34    <echo message="${ant.project.name}: ${ant.file}"/>
35    <mkdir dir="${build.dir.exp}/WEB-INF/classes"/>
36    <mkdir dir="${build.dir.exp}/WEB-INF/classes/monogram"/>
37    <copy includeemptydirs="false" todir="${build.dir.exp}/WEB-INF/classes/monogram/data">
38      <fileset dir="src/java/monogram/data" />
39    </copy>
40  </target>
41   
42  <target depends="init" name="build">
43    <javac source="${javac.source}" target="${javac.target}" debug="${javac.debug}"
44       encoding="utf-8"
45           destdir="${build.dir.exp}/WEB-INF/classes" includeantruntime="false">                               
46      <src path="src"/>
47           
48      <classpath>
49    <path refid="classpath.exp"/>
50    <pathelement location="src/jars/servlet-api.jar"/>
51    <pathelement path="src/java"/>           
52      </classpath>
53    </javac>
54  </target>
55
56   
57  <target depends="build" name="war">
58    <jar destfile="${dist.filename.exp}"> 
59      <fileset dir="${build.dir.exp}" />
60    </jar>
61  </target>
62 
63</project>
Note: See TracBrowser for help on using the browser.