Menu

[r6]: / trunk / build.xml  Maximize  Restore  History

Download this file

117 lines (95 with data), 4.4 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
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
<project name="vitforjava" default="dist" basedir=".">
<!-- set global properties for this build -->
<property name="project.name" value="VI Toolkit for Java" />
<property name="project.unixname" value="vitforjava" />
<property name="project.dotnotation" value="net.sf.vitoolkitforjava" />
<property name="project.slashnotation" value="net/sf/vitforjava" />
<property name="author" value="Schley Andrew Kutz &lt;sakutz@gmail.com&gt;" />
<property name="vendor" value="${author}" />
<property name="version" value="0.1.2" />
<property name="src" location="src" />
<property name="test" location="test" />
<property name="build" location="build" />
<property name="dist" location="dist" />
<property name="conf" location="conf" />
<property name="doc" location="doc" />
<property name="lib" location="lib" />
<target name="init" depends="clean">
<!-- Create the time stamp -->
<tstamp />
<!-- Create the build directory structure used by compile -->
<mkdir dir="${build}" />
</target>
<target name="compile" depends="init" 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>
</target>
<target name="dist" depends="compile" description="generate the distribution">
<!-- Set it up so we can create the manifest Classpath property -->
<property name="jar-all" location="lib" />
<fileset id="jars" dir="${jar-all}">
<include name="*.jar" />
</fileset>
<path id="cp">
<fileset refid="jars" />
</path>
<pathconvert property="classpath" refid="cp" pathsep=" " dirsep="/">
<map from="${jar-all}" to="lib" />
</pathconvert>
<manifest file="${conf}/MANIFEST.MF">
<attribute name="Built-By" value="${author}" />
<section name="${project.slashnotation}">
<attribute name="Specification-Title" value="${project.name}" />
<attribute name="Specification-Version" value="${version}" />
<attribute name="Specification-Vendor" value="${vendor}" />
<attribute name="Implementation-Title" value="${project.dotnotation}" />
<attribute name="Implementation-Version" value="${version}" />
<attribute name="Implementation-Vendor" value="${vendor}" />
<attribute name="Class-Path" value="${classpath}" />
<attribute name="Sealed" value="true" />
</section>
</manifest>
<!-- ***************************** src ***************************** -->
<!-- Create the javadocs -->
<javadoc sourcepath="${src}" destdir="${doc}" excludepackagenames="${project.dotnotation}.templateapplication">
<classpath>
<fileset dir="lib">
<include name="**/*.jar" />
</fileset>
</classpath>
</javadoc>
<!-- Sync the project (minus some dirs) to the dist src tree -->
<sync todir="${dist}/${project.unixname}-src-${version}">
<fileset dir="${basedir}" excludes="bin/ build/ dist/ conf/unitTests.properties" />
</sync>
<!-- Tar the dist src tree -->
<tar destfile="${dist}/${project.unixname}-src-${version}.tar.gz" basedir="${dist}" compression="gzip" includes="${project.unixname}-src-${version}/**" />
<!-- ***************************** src ***************************** -->
<!-- ***************************** bin ***************************** -->
<!-- Sync the lib directory to the dist bin tree -->
<sync todir="${dist}/${project.unixname}-bin-${version}/lib">
<fileset dir="lib/" />
</sync>
<!-- Sync the javadocs to the dist bin tree -->
<sync todir="${dist}/${project.unixname}-bin-${version}/doc">
<fileset dir="${doc}" />
</sync>
<!-- Jar up the project's built output -->
<jar jarfile="${dist}/${project.unixname}-bin-${version}/${project.unixname}-${version}.jar" basedir="${build}" manifest="${conf}/MANIFEST.MF" />
<!-- Tar the dist bin tree -->
<tar destfile="${dist}/${project.unixname}-bin-${version}.tar.gz" basedir="${dist}" compression="gzip" includes="${project.unixname}-bin-${version}/**" />
<!-- ***************************** bin ***************************** -->
</target>
<target name="clean" description="clean up">
<!-- Delete the ${build} and ${dist} directory trees -->
<delete dir="${build}" />
<delete dir="${dist}" />
<delete dir="${doc}" />
</target>
</project>