|
| 1 | +<project name="BarChart" default="dist" basedir="."> |
| 2 | + <description> |
| 3 | + Java-based BarChart workflow component. |
| 4 | + </description> |
| 5 | + |
| 6 | + <!-- set global properties for this build --> |
| 7 | + <property file="build.properties" /> |
| 8 | + <property name="source" location="${basedir}/source" /> |
| 9 | + <property name="build" location="${basedir}/build" /> |
| 10 | + <property name="dist" location="${basedir}/dist" /> |
| 11 | + <property name="lib" location="../CommonLibraries" /> |
| 12 | + <property name="javadoc" location="${basedir}/javadoc" /> |
| 13 | + |
| 14 | + <property name="version" value="1.0" /> |
| 15 | + |
| 16 | + <property name="component.id" value="BarChart" /> |
| 17 | + <property name="component.version" value="v${version} 2015" /> |
| 18 | + |
| 19 | + <property name="ToolTemplate.jar" value="${dist}/${component.id}-${version}.jar" /> |
| 20 | + |
| 21 | + <path id="lib.path"> |
| 22 | + <fileset dir="${lib}"> |
| 23 | + <include name="**/**.jar" /> |
| 24 | + </fileset> |
| 25 | + </path> |
| 26 | + |
| 27 | + <target name="dist" depends="compile" description="generate the distribution"> |
| 28 | + <!-- Create the distribution directory --> |
| 29 | + <mkdir dir="${dist}" /> |
| 30 | + |
| 31 | + <path id="build-classpath"> |
| 32 | + <fileset dir="${lib}"> |
| 33 | + <include name="*.jar" /> |
| 34 | + </fileset> |
| 35 | + </path> |
| 36 | + <manifestclasspath property="lib.list" jarfile="${ToolTemplate.jar}"> |
| 37 | + <classpath refid="build-classpath" /> |
| 38 | + </manifestclasspath> |
| 39 | + <jar jarfile="${ToolTemplate.jar}" basedir="${build}" includes="edu/cmu/pslc/learnsphere/visualization/d3/**"> |
| 40 | + <manifest> |
| 41 | + <attribute name="Main-Class" value="edu.cmu.pslc.learnsphere.visualization.d3.BarChartMain" /> |
| 42 | + <attribute name="Class-Path" value="${lib.list}" /> |
| 43 | + </manifest> |
| 44 | + </jar> |
| 45 | + </target> |
| 46 | + |
| 47 | + <path id="run.classpath"> |
| 48 | + <pathelement path="${ToolTemplate.jar}" /> |
| 49 | + <path refid="lib.path" /> |
| 50 | + <pathelement path="." /> |
| 51 | + </path> |
| 52 | + |
| 53 | + <target name="init"> |
| 54 | + <!-- Create the time stamp in DSTAMP --> |
| 55 | + <tstamp /> |
| 56 | + <!-- Create the build directory structure used by compile --> |
| 57 | + <mkdir dir="${build}" /> |
| 58 | + <mkdir dir="${dist}" /> |
| 59 | + </target> |
| 60 | + |
| 61 | + <target name="compile" depends="init" description="compile the source "> |
| 62 | + <!-- Compile the java code from ${source} into ${build} --> |
| 63 | + <javac srcdir="${source}" destdir="${build}" debug="on"> |
| 64 | + <classpath refid="lib.path" /> |
| 65 | + </javac> |
| 66 | + </target> |
| 67 | + |
| 68 | + <!-- Delete the temporary directories. --> |
| 69 | + <target name="clean" description="clean up"> |
| 70 | + <delete dir="${build}" /> |
| 71 | + <delete dir="${dist}" /> |
| 72 | + <delete dir="${javadoc}" /> |
| 73 | + </target> |
| 74 | + |
| 75 | + <target name="javadoc" depends="compile" description="Create javadoc documentation"> |
| 76 | + <mkdir dir="${javadoc}" /> |
| 77 | + <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})"> |
| 78 | + <classpath refid="lib.path" /> |
| 79 | + </javadoc> |
| 80 | + </target> |
| 81 | + |
| 82 | + <target name="runComponent" depends="clean, compile, dist" description="executes BarChart"> |
| 83 | + <java classname="edu.cmu.pslc.learnsphere.visualization.d3.BarChartMain" fork="true"> |
| 84 | + <classpath refid="run.classpath" /> |
| 85 | + <arg value="-componentXmlFile" /> |
| 86 | + <arg value="${basedir}/test/components/ComponentBarChart.xml" /> |
| 87 | + <arg value="-workflowDir" /> |
| 88 | + <arg value="${basedir}/test/" /> |
| 89 | + <arg value="-toolDir" /> |
| 90 | + <arg value="${basedir}/" /> |
| 91 | + <arg value="-schemaFile" /> |
| 92 | + <arg value="${basedir}/schemas/BarChart_v1_0.xsd" /> |
| 93 | + <jvmarg value="-Xmx1048m"/> |
| 94 | + <!-- <arg value="-preprocess" /> Use this to test preprocessing. --> |
| 95 | + </java> |
| 96 | + </target> |
| 97 | + |
| 98 | +</project> |
0 commit comments