Merge branch with new lq plugin for NL80211 support
[olsrd.git] / lib / pud / wireformat-java / resources / build.xml
1 <?xml version="1.0" standalone="yes" ?>
2 <project name="PROJECT" basedir="." default="build">
3         <description>
4                 Build file for distribution of Olsrd Pud Plugin Wireformat Library Java Bindings
5     </description>
6
7
8         <!-- Properties -->
9         <property name="fullname" value="Olsrd Pud Plugin Wireformat Library Java Bindings" />
10
11         <property name="name" value="PROJECT" />
12         <property name="version" value="PLUGIN_VER" />
13
14         <property name="debug" value="DEBUG" />
15         <property name="debug.flags" value="lines,vars,source" />
16         <property name="source.version" value="JAVAVERSIONSRC" />
17         <property name="target.version" value="JAVAVERSIONDST" />
18
19         <property name="build.dir" location="${basedir}/BUILD_DIR/classes" />
20         <property name="src.dir" location="${basedir}/JAVASRC" />
21         <property name="lib.dir" location="${basedir}/LIBDIR_BUILD" />
22
23         <property name="jar.file" value="${lib.dir}/${name}.jar" />
24
25         <property name="javadoc.dir" location="${basedir}/doc/javadoc" />
26         <property name="javac.bootclasspath" location="${basedir}/resources/ee.j2se/${source.version}/ee.j2se.jar" />
27
28         <!--
29
30          Targets
31
32         -->
33
34         <target name="getgitcommit" description="Retrieve the Git Commit SHA1">
35                 <exec dir="${basedir}" executable="git" outputproperty="git.commit.sha" failonerror="false" error="/dev/null">
36                         <arg value="rev-parse" />
37                         <arg value="HEAD" />
38                 </exec>
39         </target>
40
41         <target name="init" description="initialisation build environment for ${name}">
42                 <mkdir dir="${build.dir}" />
43         </target>
44
45         <target name="clean" description="clean build environment">
46                 <delete dir="${build.dir}" />
47                 <delete dir="${javadoc.dir}" />
48         </target>
49
50         <target name="build" description="Build plugin jar file" depends="clean,init,getgitcommit">
51                 <echo message="Compiling Plugin classes. (debug: ${debug})" />
52                 <javac bootclasspath="${javac.bootclasspath}" srcdir="${src.dir}" destdir="${build.dir}" source="${source.version}" target="${target.version}" debug="${debug}" debuglevel="${debug.flags}" includeantruntime="false" />
53
54                 <delete file="${jar.file}" />
55                 <jar destfile="${jar.file}">
56                         <fileset dir="${build.dir}">
57                                 <include name="**/*.class" />
58                         </fileset>
59                         <manifest>
60                                 <attribute name="Class-Path" value="." />
61                                 <attribute name="Version" value="${version}" />
62                                 <attribute name="Git-SHA1" value="${git.commit.sha}" />
63                         </manifest>
64                 </jar>
65         </target>
66
67         <target name="src-zip" depends="init">
68                 <!-- make the zip file -->
69                 <zip zipfile="${lib.dir}/${name}-src.zip">
70                         <zipfileset dir="${src.dir}" />
71                 </zip>
72         </target>
73
74         <target name="release" description="Build plugin jar file" depends="clean, init, build, src-zip, javadoc-zip">
75         </target>
76
77         <!-- Generate JavaDoc -->
78         <target name="javadoc">
79                 <delete dir="${javadoc.dir}" />
80                 <mkdir dir="${javadoc.dir}" />
81                 <javadoc bootclasspath="${javac.bootclasspath}" destdir="${javadoc.dir}" windowtitle="${fullname}" use="yes" linksource="yes" splitindex="yes" access="private" author="true" nodeprecated="false" nodeprecatedlist="false" noindex="false" nonavbar="false" notree="false" version="true" source="${source.version}" sourcepath="${src.dir}" maxmemory="256M">
82                         <packageset dir="${src.dir}" defaultexcludes="yes">
83                                 <include name="org/olsr/**" />
84                         </packageset>
85                 </javadoc>
86         </target>
87
88         <!-- Create zip file containing the API HTML pages. -->
89         <target name="javadoc-zip" depends="init,javadoc">
90                 <!-- make the zip file -->
91                 <zip zipfile="${lib.dir}/${name}-doc.zip">
92                         <zipfileset dir="${javadoc.dir}" />
93                 </zip>
94         </target>
95
96 </project>