-
Notifications
You must be signed in to change notification settings - Fork 6
/
build.xml
60 lines (48 loc) · 3.07 KB
/
build.xml
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<?xml version="1.0" encoding="UTF-8"?>
<!-- You may freely edit this file. See commented blocks below for -->
<!-- some examples of how to customize the build. -->
<!-- (If you delete it and reopen the project it will be recreated.) -->
<project name="rhino-for-webapps" default="default" basedir=".">
<description>Builds project files</description>
<property description="major release number" name="major" value="0" />
<property description="minor release number" name="minor" value="5" />
<property description="build number" name="number" value="2" />
<property description="build id" name="build_id" value="${major}.${minor}.${number}" />
<property description="Java Jars" name="JAVA_LIB_DIR" location="WEB-INF/lib" />
<property description="Rhino JS Engine" name="RHINO_JAR" location="${JAVA_LIB_DIR}/js.jar" />
<property description="JSLint Syntax Engine" name="JSLINT_JAR" location="${JAVA_LIB_DIR}/jslint4java-1.1.jar" />
<property description="Javax Servlet API" name="SERVLET_JAR" location="../../lib/servlet-api.jar" />
<property description="Log4j Logging API" name="LOG4J_JAR" location="${JAVA_LIB_DIR}/log4j-1.2.15.jar" />
<property name="PREFIX" location="${basedir}/" description="Target parent folder for built files" />
<property name="SRC_DIR" location="${PREFIX}/src" description="Folder for source files" />
<property name="DOCS_DIR" location="${PREFIX}/docs" description="Folder for docs target" />
<property name="TEST_DIR" location="${PREFIX}/test" description="Folder for test target" />
<property name="DIST_DIR" location="${PREFIX}/dist" description="Folder for jquery, min, lite and packed target" />
<property name="BUILD_DIR" location="${PREFIX}/build" description="Folder for build artifacts" />
<property name="CLASSES_DIR" location="${basedir}/WEB-INF/classes" description="Local Classes like Servlets" />
<!-- Files names for distribution -->
<property name="CLAYPOOL_JAR" location="${DIST_DIR}/claypool.${build_id}.jar" />
<property name="CLAYPOOL_LATEST_JAR" location="${DIST_DIR}/claypool.jar" />
<!-- Plugin File Names for Distribution -->
<!-- BUILD TARGETS -->
<target name="default" depends="compile, jar"/>
<target name="all" depends="default"/>
<target name="compile">
<javac srcdir="${CLASSES_DIR}" source="1.5" target="1.5">
<classpath>
<path location="${RHINO_JAR}"/>
<path location="${SERVLET_JAR}"/>
<path location="${LOG4J_JAR}"/>
</classpath>
</javac>
</target>
<target name="clean">
<delete dir="${DIST_DIR}" />
<delete dir="${BUILD_DIR}" />
</target>
<target name="jar">
<mkdir dir="${DIST_DIR}"/>
<jar destfile="${CLAYPOOL_JAR}" basedir="${CLASSES_DIR}" />
<copy file='${CLAYPOOL_JAR}' tofile='${CLAYPOOL_LATEST_JAR}'/>
</target>
</project>