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