-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathbuild.xml
More file actions
executable file
·97 lines (84 loc) · 3.92 KB
/
build.xml
File metadata and controls
executable file
·97 lines (84 loc) · 3.92 KB
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
<project name="ExportZip" default="dist" basedir=".">
<description>
Java-based ExportZip workflow component.
</description>
<!-- set global properties for this build -->
<property file="build.properties" />
<property name="source" location="${basedir}/source" />
<property name="build" location="${basedir}/build" />
<property name="dist" location="${basedir}/dist" />
<property name="lib" location="../CommonLibraries" />
<property name="javadoc" location="${basedir}/javadoc" />
<property name="version" value="1.0" />
<property name="component.id" value="ExportZip" />
<property name="component.version" value="v${version} 2015" />
<property name="ToolTemplate.jar" value="${dist}/${component.id}-${version}.jar" />
<path id="lib.path">
<fileset dir="${lib}">
<include name="**/**.jar" />
</fileset>
</path>
<target name="dist" depends="compile" description="generate the distribution">
<!-- Create the distribution directory -->
<mkdir dir="${dist}" />
<path id="build-classpath">
<fileset dir="${lib}">
<include name="*.jar" />
</fileset>
</path>
<manifestclasspath property="lib.list" jarfile="${ToolTemplate.jar}">
<classpath refid="build-classpath" />
</manifestclasspath>
<jar jarfile="${ToolTemplate.jar}" basedir="${build}" includes="edu/cmu/pslc/learnsphere/exports/zip/**">
<manifest>
<attribute name="Main-Class" value="edu.cmu.pslc.learnsphere.exports.zip.ExportZipMain" />
<attribute name="Class-Path" value="${lib.list}" />
</manifest>
</jar>
</target>
<path id="run.classpath">
<pathelement path="${ToolTemplate.jar}" />
<path refid="lib.path" />
<pathelement path="." />
</path>
<target name="init">
<!-- Create the time stamp in DSTAMP -->
<tstamp />
<!-- Create the build directory structure used by compile -->
<mkdir dir="${build}" />
<mkdir dir="${dist}" />
</target>
<target name="compile" depends="init" description="compile the source ">
<!-- Compile the java code from ${source} into ${build} -->
<javac srcdir="${source}" destdir="${build}" debug="on">
<classpath refid="lib.path" />
</javac>
</target>
<!-- Delete the temporary directories. -->
<target name="clean" description="clean up">
<delete dir="${build}" />
<delete dir="${dist}" />
<delete dir="${javadoc}" />
</target>
<target name="javadoc" depends="compile" description="Create javadoc documentation">
<mkdir dir="${javadoc}" />
<javadoc sourcepath="${source}" destdir="${javadoc}" packagenames="*.*" author="true" private="true" version="true" doctitle="<h1>${component.id} (Version ${component.version})</h1>" windowtitle="${component.id} (Version ${component.version})">
<classpath refid="lib.path" />
</javadoc>
</target>
<target name="runComponent" depends="clean, compile, dist" description="executes ExportZip">
<java classname="edu.cmu.pslc.learnsphere.exports.zip.ExportZipMain" fork="true">
<classpath refid="run.classpath" />
<arg value="-componentXmlFile" />
<arg value="${basedir}/test/components/ComponentExport.xml" />
<arg value="-workflowDir" />
<arg value="${basedir}/test/" />
<arg value="-toolDir" />
<arg value="${basedir}/" />
<arg value="-schemaFile" />
<arg value="${basedir}/schemas/ExportZip_v1_0.xsd" />
<jvmarg value="-Xmx1048m"/>
<!-- <arg value="-preprocess" /> Use this to test preprocessing. -->
</java>
</target>
</project>