Simplification and commenting.

git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@39 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
hanna 2009-03-11 22:58:22 +00:00
parent 4af5e54411
commit 4ab1fa249b
1 changed files with 17 additions and 30 deletions

View File

@ -1,13 +1,16 @@
<project name="AnalysisTK" default="dist" basedir="." xmlns:ivy="antlib:org.apache.ivy.ant">
<description>
simple build file
</description>
<description>Compile and distribute the Sting analysis toolkit</description>
<!-- set global properties for this build -->
<property name="src" location="src"/>
<property name="build" location="build"/>
<property name="dist" location="dist"/>
<property name="lib" location="lib"/>
<path id="classpath">
<fileset dir="${lib}" includes="*.jar" />
</path>
<!-- ivy properties -->
<property name="ivy.install.version" value="2.0.0" />
<property name="ivy.home" value="${user.home}/.ant" />
@ -16,15 +19,19 @@
<property name="ivy.settings.dir" value="settings" />
<property file="${ivy.settings.dir}/ivysettings.properties" />
<target name="resolve">
<target name="resolve" depends="init"
description="locate and download library dependencies">
<!-- retrieve ivy if necessary -->
<mkdir dir="${ivy.jar.dir}" />
<get src="http://repo1.maven.org/maven2/org/apache/ivy/ivy/${ivy.install.version}/${ivy.jar.file}"
dest="${ivy.jar.dir}/${ivy.jar.file}"
usetimestamp="true"/>
<!-- initialize and load ivy -->
<taskdef resource="org/apache/ivy/ant/antlib.xml"
uri="antlib:org.apache.ivy.ant"
classpath="${ivy.jar.dir}/${ivy.jar.file}" />
<ivy:settings file="${ivy.settings.dir}/ivysettings.xml" />
<!-- retrieve dependencies -->
<ivy:retrieve />
</target>
@ -36,38 +43,19 @@
</target>
<target name="compile" depends="init,resolve"
description="compile the source " >
description="compile the source">
<!-- Compile the java code from ${src} into ${build} -->
<javac srcdir="${src}" destdir="${build}" >
<classpath>
<fileset dir="lib">
<include name="*.jar" />
</fileset>
</classpath>
</javac>
<javac srcdir="${src}" destdir="${build}" classpathref="classpath" />
</target>
<target name="dist" depends="compile"
description="generate the distribution" >
<!-- Create the distribution directory -->
description="generate the distribution" >
<mkdir dir="${dist}"/>
<pathconvert property="jar.classpath" pathsep=" ">
<mapper>
<chainedmapper>
<flattenmapper />
</chainedmapper>
</mapper>
<path>
<fileset dir="${lib}">
<include name="**/*.jar" />
</fileset>
</path>
<pathconvert property="jar.classpath" pathsep=" " refid="classpath">
<flattenmapper />
</pathconvert>
<echo message="libs.project = ${jar.classpath}" />
<!-- Put everything in ${build} into the MyProject-${DSTAMP}.jar file -->
<jar jarfile="${dist}/AnalysisTK.jar" basedir="${build}">
<manifest>
<attribute name="Class-Path" value="${jar.classpath}" />
@ -81,8 +69,7 @@
</target>
<target name="clean"
description="clean up" >
<!-- Delete the ${build} and ${dist} directory trees -->
description="clean up" >
<delete dir="${build}"/>
<delete dir="${dist}"/>
<delete dir="${lib}" />