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 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271
|
<project name="Mozilla Java LDAP SDK" default="show" basedir=".">
<!-- ***** BEGIN LICENSE BLOCK *****
- Version: MPL 1.1/GPL 2.0/LGPL 2.1
-
- The contents of this file are subject to the Mozilla Public License Version
- 1.1 (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
- http://www.mozilla.org/MPL/
-
- Software distributed under the License is distributed on an "AS IS" basis,
- WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- for the specific language governing rights and limitations under the
- License.
-
- The Original Code is mozilla.org code.
-
- The Initial Developer of the Original Code is
- Netscape Communications Corporation.
- Portions created by the Initial Developer are Copyright (C) 1999
- the Initial Developer. All Rights Reserved.
-
- Contributor(s):
- Tony Dahbura (tony@dahbura.com) initial creation of ant build files
-
- Alternatively, the contents of this file may be used under the terms of
- either the GNU General Public License Version 2 or later (the "GPL"), or
- the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- in which case the provisions of the GPL or the LGPL are applicable instead
- of those above. If you wish to allow use of your version of this file only
- under the terms of either the GPL or the LGPL, and not to allow others to
- use your version of this file under the terms of the MPL, indicate your
- decision by deleting the provisions above and replace them with the notice
- and other provisions required by the GPL or the LGPL. If you do not delete
- the provisions above, a recipient may use your version of this file under
- the terms of any one of the MPL, the GPL or the LGPL.
-
- ***** END LICENSE BLOCK ***** -->
<!-- ===================== Initialize Property Values =================== -->
<property file="build.properties"/>
<!-- Project Properties -->
<property name="name" value="java-sdk" />
<property name="year" value="2007" />
<property name="version" value="4.18" />
<property name="sdkjarfilename" value="ldapjdk.jar" />
<property name="filtjarfilename" value="ldapfilt.jar" />
<property name="jdnijarfilename" value="ldapsp.jar" />
<property name="beansjarfilename" value="ldapbeans.jar" />
<property name="doczipfilename" value="ldapdoc.zip" />
<!-- Build Defaults -->
<property name="jdk.dist" value="${basedir}/dist/classes"/>
<property name="filter.dist" value="${basedir}/dist/ldapfilt"/>
<property name="jndi.dist" value="${basedir}/dist/classes"/>
<property name="doc.dist" value="${basedir}/dist/doc"/>
<property name="package.dist" value="${basedir}/dist/packages"/>
<property name="src" value="."/>
<property name="build" value="build"/>
<property name="dist" value="dist"/>
<property name="jss.lib" value="/usr/lib/java/jss4.jar"/>
<!-- the following is to setup the correct info for sun jsse which
is jdk dependent -->
<property name="ssllibs14" value="${basedir}/ldapjdk/lib/jss4.jar"/>
<property name="ssllibs13" value="${basedir}/ldapjdk/lib/jaas.jar:${basedir}/ldapjdk/lib/jnet.jar:${basedir}/ldapjdk/lib/jsse.jar:${basedir}/ldapjdk/lib/jss4.jar"/>
<!-- we do not use the users existing classpath and instead build our own
comment the following line out if this is not desired -->
<property name="build.sysclasspath" value="ignore"/>
<!-- the following target is the default target so show some help -->
<target name="show">
<echo>The following targets are defined:
dist : will build entire sdk and package all the pieces
dist-jdk : will build only the ldap jdk jar (ldapjdk.jar)
dist-filter : will build only the ldap filter jar (ldapfilt.jar)
dist-beans : will build only the beans jar (ldapbeans.jar)
dist-jndi : will build only the jndi service provider (ldapsp.jar)
dist-docs : will package up all the documentation (ldapdoc.zip)
build : will compile the entire sdk but not package
build-jdk : will compile only the ldap jdk jar
build-filter : will compile only the filter classes
build-beans : will compile only the ldap beans
build-jndi : will compile only the jndi service provider
build-docs : will compile the complete javadocs
clean : will remove all compiled files and packages
clean-dists : will remove all the jars and zips
clean-builds : will remove all the compiled classes
</echo>
</target>
<target name="init">
<echo>compiling for jdk version=${ant.java.version}</echo>
<condition property="jsselibs" value="${ssllibs13}">
<or>
<equals arg1="${ant.java.version}" arg2="1.1" />
<equals arg1="${ant.java.version}" arg2="1.2" />
<equals arg1="${ant.java.version}" arg2="1.3" />
</or>
</condition>
<condition property="jsselibs" value="${ssllibs14}">
<not>
<or>
<equals arg1="${ant.java.version}" arg2="1.1" />
<equals arg1="${ant.java.version}" arg2="1.2" />
<equals arg1="${ant.java.version}" arg2="1.3" />
</or>
</not>
</condition>
<echo>ssl libraries path=${jsselibs}</echo>
<!-- create dist directories in case a clean was executed -->
<mkdir dir="${jdk.dist}"/>
<mkdir dir="${filter.dist}"/>
<mkdir dir="${jndi.dist}"/>
<mkdir dir="${doc.dist}"/>
<mkdir dir="${package.dist}"/>
</target>
<target name="dist" depends="dist-jdk,dist-filter,dist-beans,dist-jndi,dist-docs">
<echo>Building all packages....</echo>
</target>
<target name="dist-jdk" depends="build-jdk">
<!-- copy errors property files in to dist area for jarfile inclusion -->
<mkdir dir="${jdk.dist}/netscape/ldap/errors"/>
<copy todir="${jdk.dist}/netscape/ldap/errors">
<fileset dir="${basedir}/ldapjdk/netscape/ldap/errors">
<include name="*.props"/>
</fileset>
</copy>
<jar jarfile="${package.dist}/${sdkjarfilename}"
basedir="${jdk.dist}"
excludes="cvs/**"
includes="netscape/ldap/*.class,netscape/ldap/client/*.class,netscape/ldap/client/opers/*.class,netscape/ldap/ber/stream/*.class,netscape/ldap/controls/*.class,netscape/ldap/factory/*.class,netscape/ldap/util/*.class,netscape/ldap/errors/*.props,com/netscape/sasl/*.class,com/netscape/sasl/mechanisms/*.class,*.class"
/>
</target>
<target name="dist-filter" depends="build-filter">
<jar jarfile="${package.dist}/${filtjarfilename}"
basedir="${filter.dist}"
excludes="cvs/**"
includes="netscape/ldap/util/*.class"
/>
</target>
<target name="dist-beans" depends="build-beans">
<jar jarfile="${package.dist}/${beansjarfilename}"
basedir="${jdk.dist}"
excludes="cvs/**"
includes="netscape/ldap/beans/*"
/>
</target>
<target name="dist-jndi" depends="build-jndi">
<jar jarfile="${package.dist}/${jdnijarfilename}"
basedir="${jdk.dist}"
excludes="cvs/**"
includes="com/netscape/jndi/ldap/*.class com/netscape/jndi/ldap/common/*.class com/netscape/jndi/ldap/schema/*.class com/netscape/jndi/ldap/controls/*.class"
/>
</target>
<target name="dist-docs" depends="build-docs">
<jar jarfile="${package.dist}/${doczipfilename}"
update="no"
basedir="${doc.dist}"
excludes="cvs/**"
includes="*.html *.css netscape/ldap/*.html netscape/ldap/beans/*.html netscape/ldap/controls/*.html netscape/ldap/util/*.html netscape/ldap/ber/stream/*.html"
/>
</target>
<!-- The following targets do the builds (compiles of the source files) -->
<target name="build" depends="build-jdk,build-filter,build-beans,build-jndi"/>
<target name="build-jdk" depends="init">
<!-- Compile the java jdk code from ${src} into ${dest} -->
<javac srcdir="${basedir}/ldapjdk/com" destdir="${jdk.dist}"
release="8"
excludes="cvs/**"
classpath="${jsselibs}"
/>
<javac srcdir="${basedir}/ldapjdk/netscape" destdir="${jdk.dist}"
release="8"
excludes="cvs/**"
classpath="${jsselibs}"
/>
<javac srcdir="${basedir}/tools" destdir="${jdk.dist}"
release="8"
excludes="cvs/**"
classpath="${jsselibs}"
/>
</target>
<target name="build-filter" depends="init,build-jdk">
<javac srcdir="${basedir}/ldapfilter" destdir="${filter.dist}"
release="8"
excludes="cvs/**"
classpath="${jdk.dist}:${jsselibs}"
/>
</target>
<target name="build-beans" depends="init">
<!-- Compile the java jdk bean code from ${src} into ${dest} -->
<javac srcdir="${basedir}/ldapbeans" destdir="${jdk.dist}"
release="8"
excludes="cvs/**"
classpath="${jsselibs}"
/>
</target>
<target name="build-jndi" depends="init,build-jdk">
<!-- Compile the java code from ${src} into ${dest} -->
<javac srcdir="${basedir}/ldapsp" destdir="${jndi.dist}"
release="8"
excludes="cvs/**"
classpath="${jsselibs}:${basedir}/ldapsp/lib/jndi.jar"
/>
</target>
<target name="build-docs">
<!-- Create the javadocs for the sdk -->
<javadoc
packagenames="netscape.ldap.*,netscape.ldap.beans.*,netscape.ldap.controls.*,netscape.ldap.util.*,netscape.ldap.factory.*,com.netscape.sasl.*,com.netscape.sasl.mechanisms.*,netscape.ldap.ber.stream.*"
sourcepath="${basedir}/ldapbeans:${basedir}/ldapjdk"
sourcefiles="${basedir}/tools/LDAPDelete.java,${basedir}/tools/LDAPModify.java,${basedir}/tools/LDAPSearch.java,${basedir}/tools/LDAPTool.java"
destdir="${doc.dist}"
author="true"
version="true"
use="true"
classpath="${basedir}/ldapjdk:${jss.lib}:${basedir}/ldapjdk/lib/jss32_stub.jar:${basedir}/ldapbeans"
additionalparam="-Xdoclint:none">
</javadoc>
<javadoc packagenames="com.netscape.jndi.ldap.controls.*"
sourcepath="${basedir}/ldapsp"
destdir="${doc.dist}/ldapsp"
classpath="${jndi.dist}:${basedir}/ldapsp:${basedir}/ldapsp/lib/jndi.jar"
author="true"
version="true"
use="true"
additionalparam="-Xdoclint:none">
</javadoc>
</target>
<target name="clean" depends="clean-dists,clean-builds"/>
<target name="clean-dists">
<!-- Delete the jar and zip files -->
<delete includeEmptyDirs="true">
<fileset dir="${package.dist}" includes="*.jar *.zip" />
</delete>
</target>
<target name="clean-builds">
<!-- Delete the .class and javadoc files built up from builds -->
<delete includeEmptyDirs="true">
<fileset dir="${basedir}/dist" excludes="**/*.jar **/*.zip"/>
</delete>
</target>
</project>
|