move configuration files into a conf directory (which will be copied onto the filesys...
[java-idp.git] / build.xml
index 18417f3..71f691b 100755 (executable)
--- a/build.xml
+++ b/build.xml
-<!-- Main build configutaion for Shibboleth java components - Walter Hoehn 06/04/2002 -->
-
-<project name="Shibboleth" default="install" basedir=".">
-
-    <!-- Set global properties for this build -->
-    <property name="distname" value="shibboleth" />
-    <property name="root" value="." />
-    <property name="src" value="${root}/src/" />
-    <property name="tests" value="${root}/tests/" />
-    <property name="approot" value="${root}/webApplication/" />
-    <property name="appconfig" value="${src}/conf/" />
-    <property name="configroot" value="${root}/webAppConfig/" />
-    <property name="build" value="${approot}/WEB-INF/classes/" />
-    <property name="libdir" value="${approot}/WEB-INF/lib/" />
-    <property name="buildlibs" value="${root}/lib/" />
-    <property name="endorsed" value="${root}/endorsed/" />
-    <property name="distlibs" value="${root}/lib/" />
-    <property name="dist" value="${root}/dist/" />
-    <property name="docs" value="${root}/doc/" />
-    <property name="javadocs" value="${docs}/api/" />
-
-    <property name="year" value="2002-2005"/>
-    <property name="copyright" value="Copyright &#169; ${year} UCAID. All Rights Reserved."/>
-       
-    <!-- antcontrib tasks -->
-    <taskdef resource="net/sf/antcontrib/antcontrib.properties" classpath="${buildlibs}/ant-contrib.jar"/>
+<project name="Shibboleth Identity Provider" basedir="." default="package">
        
-    <!-- Construct the CLASSPATH -->
-    <path id="build.path">
-        <pathelement path="${classpath}" />
-        <pathelement location="${build}" />
-        <fileset dir="${endorsed}">
-            <include name="**/*.jar" />
-        </fileset>
-        <fileset dir="${libdir}">
-            <include name="**/*.jar" />
-        </fileset>
-        <fileset dir="${buildlibs}">
-            <include name="**/*.jar" />
-        </fileset>
-    </path>
-
-   <path id="test.path">
-      <path refid="build.path"/>
-      <pathelement location="${tests}"/>
-    </path>
-
-
-    <!-- Prepare directory structure for project build-->
-    <target name="init">
-        <mkdir dir="${build}" />
-        <mkdir dir="${dist}" />
-        <var file="build.properties" />
-    </target>
-
-    <target name="install.init">
-       <taskdef name="xinput" classname="edu.internet2.middleware.shibboleth.utils.ant.XInput" classpath="${build}"/>
-       <typedef name="xoption" classname="edu.internet2.middleware.shibboleth.utils.ant.XInputOption" classpath="${build}"/>
-    </target>
-
-
-    <!-- This target should be run before checking code into the repository -->
-    <target name="pre-checkin" depends="compile, test-all, clean-all" />
-
-
-    <!-- Compile classes and move them to ${build} -->
-    <target name="compile" depends="init"
-       description="Compile source file, combine with schemas and conf directories">
-        <javac srcdir="${src}" destdir="${build}" includes="**/*.java" debug="on" 
-               target="1.4" source="1.4">
-            <classpath refid="build.path" />
-        </javac>
-        <copy todir="${build}/schemas">
-            <fileset dir="${src}/schemas"/>
-        </copy>
-        <!-- configuration is now stored outside of shibboleth.war
-        <copy todir="${build}/conf">
-            <fileset dir="${src}/conf"/>
-        </copy>
-        -->
-    </target>
-    
-    <target name="compile-tests" depends="compile">
-        <javac srcdir="${tests}" destdir="${build}" includes="**/*.java" debug="on" target="1.4" source="1.4">
-            <classpath refid="build.path" />
-        </javac>
-    </target>
-
-
-       <!-- Generate API docs -->
-       <target name="javadocs">
-               <mkdir dir="${docs}" />
-               <mkdir dir="${javadocs}" />
-               <javadoc packagenames='edu.internet2.middleware.*'
-                       sourcepath='${src}' destdir='${javadocs}'
-                       author='true' version='true'
-                       windowtitle='Shibboleth Java API' doctitle='Shibboleth Java API'
-                       bottom='${copyright}'>
-                <classpath refid="build.path" />
-        </javadoc>
-       </target>
-
-    <!-- Create various product distributions and move them to ${dist} -->
-
-    <target name="dist-all" depends="compile, test-all, package-all, clean-build" />
-       
-    <target name="package-all">
-        <war warfile="${dist}/${distname}.war" webxml="${configroot}/all.xml" basedir="${approot}" update="no" />
-    </target>
-
-    <target name="dist-IdP-SP" depends="compile, package-IdP-SP, clean-build" 
-       description="Build application from source, create shibboleth.war file for IdP and SP"/>
-    <target name="package-IdP-SP" depends="compile"
-       description="Create shibboleth.war file from build output and IdP-SP deployment descriptor">
-        <war warfile="${dist}/${distname}.war" webxml="${configroot}/IdP-SP.xml" basedir="${approot}" update="no" />
-    </target>
-
-    <target name="dist-wayf" depends="compile, package-wayf, clean-build" />
-    <target name="package-wayf">
-        <war warfile="${dist}/${distname}-wayf.war" webxml="${configroot}/wayf.xml" basedir="${approot}" update="no" />
-    </target>
-
-    <!-- Build utilities -->
-    <target name="build-util" depends="compile">
-        <jar jarfile="${distlibs}/shib-util.jar" basedir="${build}" />
-    </target>
-
-    
-    <!-- Cleanup after the build, test, and distribution processes -->
-    <target name="clean" depends="clean-all" />
-    <target name="clean-all" depends="clean-build, clean-dist, clean-test, clean-javadocs, clean-util" />
-    <target name="clean-build">
-        <delete dir="${build}" />
-    </target>
-    <target name="clean-test">
-        <delete>
-            <fileset dir="${root}">
-                <include name="**/TEST*.txt" />
-            </fileset>
-        </delete>
-    </target>
-    <target name="clean-dist">
-        <delete dir="${dist}" />
-    </target>
-       <target name="clean-javadocs">
-               <delete dir="${javadocs}" />
-       </target>
-    <target name="clean-util">
-        <delete>
-            <fileset dir="${buildlibs}">
-                <include name="shib-util.jar" />
-            </fileset>
-        </delete>
-    </target>
-
-    <!-- Run automated tests on compiled code -->
-    <target name="test-all" depends="test-IdP, test-SP" />
-    <target name="test-IdP" depends="compile-tests">
-        <junit printsummary="no" fork="yes" haltonfailure="yes" haltonerror="yes" dir="${root}">
-                       <jvmarg value="-Djava.endorsed.dirs=${endorsed}" />
-            <classpath refid="test.path" />
-            <formatter type="plain" />
-            <test name="edu.internet2.middleware.shibboleth.aa.arp.ArpTests" />
-                       <test name="edu.internet2.middleware.shibboleth.aa.attrresolv.ResolverTests" />
-                       <test name="edu.internet2.middleware.shibboleth.common.CredentialsTests" />
-                       <test name="edu.internet2.middleware.shibboleth.common.provider.NameMapperTests" />
-                       <test name="edu.internet2.middleware.shibboleth.common.TrustTests" />
-                       <test name="edu.internet2.middleware.shibboleth.idp.provider.DNHostNameExtractionTests" />
-                       <test name="edu.internet2.middleware.shibboleth.metadata.MetadataTests" />
-        </junit>
-    </target>
-    <target name="test-SP" depends="compile-tests">
-        <junit printsummary="no" fork="yes" haltonfailure="yes" haltonerror="yes" dir="${root}">
-                       <jvmarg value="-Djava.endorsed.dirs=${endorsed}" />
-            <classpath refid="test.path" />
-            <formatter type="plain" />
-            <test name="edu.internet2.middleware.shibboleth.aap.AAPTests" />
-        </junit>
-    </target>
-    
-    <!-- Tomcat Management -->
-    <target name="setupTomcatTasks">
-       <path id="tomcat.classpath">
-                   <fileset dir="${tomcat.home}/server/lib" includes="catalina-ant.jar"/>
-           </path>
-
-       <taskdef name="tomcatStart" classname="org.apache.catalina.ant.StartTask" classpathref="tomcat.classpath"/>
-       <taskdef name="tomcatStop" classname="org.apache.catalina.ant.StopTask" classpathref="tomcat.classpath"/>
-           <taskdef name="tomcatDeploy" classname="org.apache.catalina.ant.DeployTask" classpathref="tomcat.classpath"/>
-       <taskdef name="tomcatUndeploy" classname="org.apache.catalina.ant.UndeployTask" classpathref="tomcat.classpath"/>
-       </target>
-    
-    <target name="tomcat.start" depends="setupTomcatTasks" description="Start a deployed webapp using Tomcat manager">
-        <tomcatStart url="${tomcat.url}" username="${tomcat.username}" password="${tomcat.password}" path="/${distname}"/>
-    </target>
-
-    <target name="tomcat.stop" depends="setupTomcatTasks" description="Stop a deployed webapp using Tomcat manager">
-        <tomcatStop url="${tomcat.url}" username="${tomcat.username}" password="${tomcat.password}" path="/${distname}"/>
-    </target>
-
-    <target name="tomcat.deploy" depends="setupTomcatTasks" description="Upload and deploy using Tomcat manager">
-        <tomcatDeploy url="${tomcat.url}" username="${tomcat.username}" password="${tomcat.password}" path="/${distname}"
-               war="file:${basedir}/${dist}/${distname}.war"/>
-    </target>
-
-    <target name="tomcat.undeploy" depends="setupTomcatTasks" description="Undeploy using Tomcat manager">
-        <tomcatUndeploy url="${tomcat.url}" username="${tomcat.username}" password="${tomcat.password}" path="/${distname}"/>
-    </target>
+       <tstamp>
+               <format property="build-date" pattern="ddMMyyyy'T'kkmmss" timezone="GMT"/>
+       </tstamp>\r
+
+       <!-- User based property file that overrides any property below -->
+       <property file="${user.name}-build.properties"/>
+               
+       <!-- Project based property file -->\r
+    <property file="build.properties" />\r
+\r
+    <!-- Load ant-contrib tasks -->\r
+    <taskdef resource="net/sf/antcontrib/antlib.xml" />
        
-    
-    <!-- Automated key generation -->
-       <target name="genSecret" depends="compile">
-       <taskdef name="genSecret" classname="edu.internet2.middleware.shibboleth.utils.HandleRepositorySecretGenerator" classpathref="build.path"/>
-               <genSecret keyStorePath="${appconfig}/handle.jks" keyStorePassword="shibhs" keyStoreKeyAlias="handleKey" keyStoreKeyPassword="shibhs" />
-       </target>
-
-    <target name="genSalt" depends="compile">
-        <taskdef name="genSalt" classname="edu.internet2.middleware.shibboleth.utils.HandleRepositorySecretGenerator" classpathref="build.path"/>
-        <genSalt keyStorePath="${appconfig}/persistent.jks" keyStorePassword="shibhs" keyStoreKeyAlias="handleKey" keyStoreKeyPassword="shibhs" />
-    </target>
+       <!-- Load Checkstyle tasks -->
+       <taskdef resource="checkstyletask.properties" />\r
+\r
+    <!-- Classpath for building core classes-->\r
+    <path id="build-path">\r
+        <fileset dir="${build-lib.dir}" includes="**/*.jar" />\r
+        <fileset dir="${lib.dir}" includes="**/*.jar" />\r
+    </path>\r
+\r
+    <!-- Classpath for testing classes-->\r
+    <path id="test-path">\r
+        <path refid="build-path" />\r
+        <pathelement location="${core-classes.dir}" />\r
+        <pathelement location="${core-src.dir}" />\r
+        <pathelement location="${test-classes.dir}" />
+       <pathelement location="${test-classes.dir}/data" />
+       <pathelement location="${test-classes.dir}/log4j.xml" />\r
+        <pathelement location="${test-src.dir}" />\r
+        <pathelement location="${classpathres.dir}" />\r
+    </path>\r
+\r
+    <!-- Prepare directory structure for build -->\r
+    <target name="build-init">\r
+        <mkdir dir="${build.dir}" />\r
+    </target>\r
+\r
+    <!-- Compile core (non-test) classes -->\r
+    <target name="compile-core" depends="build-init, clean-compile">\r
+        <mkdir dir="${core-classes.dir}" />\r
+\r
+        <javac srcdir="${core-src.dir}" destdir="${core-classes.dir}" includes="**/*.java" debug="on" source="1.5">\r
+            <classpath refid="build-path" />\r
+        </javac>\r
+\r
+    </target>\r
+\r
+    <!-- Compile unit test classes -->\r
+    <target name="compile-test" depends="compile-core">\r
+        <mkdir dir="${test-classes.dir}" />\r
+\r
+        <javac srcdir="${test-src.dir}" destdir="${test-classes.dir}" includes="**/*.java" debug="on" source="1.5">\r
+            <classpath refid="test-path" />\r
+        </javac>\r
+\r
+    </target>\r
+\r
+    <!-- Compile and run unit tests -->\r
+    <target name="test" depends="compile-core, compile-test" description="Runs the unit tests for the project.">\r
+        <mkdir dir="${test-results.dir}" />\r
+\r
+       <echo message="Excuting unit tests using endorsed directory ${java.endorsed.dirs}" />\r
+        <junit printsummary="off" fork="yes" forkmode="once" haltonerror="false" haltonfailure="false" dir="${basedir}" errorproperty="testFailed">\r
+               <jvmarg value="-Djava.endorsed.dirs=${java.endorsed.dirs}" />\r
+            <classpath refid="test-path" />\r
+            <formatter type="xml" />\r
+            <batchtest todir="${test-results.dir}">\r
+                <fileset dir="${test-classes.dir}">\r
+                    <include name="**/*Test.class" />\r
+                </fileset>\r
+            </batchtest>\r
+        </junit>\r
+       <junitreport todir="${test-results.dir}">\r
+         <fileset dir="${test-results.dir}">\r
+           <include name="TEST-*.xml"/>\r
+         </fileset>\r
+         <report format="frames" todir="${test-report.dir}"/>\r
+       </junitreport>
+       
+       <echo message="Test report available at ${test-report.dir}/index.html" />
+       <fail if="testFailed" message="Test failure; see ${test-report.dir}/index.html for more information."/>\r
+    </target>\r
+\r
+    <!-- Javadoc core (non-test) classes -->\r
+    <target name="javadoc" description="Creates the JavaDoc documentatin for the project.">\r
+        <mkdir dir="${javadoc.dir}" />\r
+        <javadoc packagenames="org.opensaml.*" \r
+                    sourcepath="${core-src.dir}" \r
+                    destdir="${javadoc.dir}" \r
+                    author="false" version="true" \r
+                    windowtitle="${ant.project.name} ${version} Java API" \r
+                    doctitle="${ant.project.name} ${version} Java API" \r
+                    bottom="${copyright}"\r
+                    overview="${core-src.dir}/overview.html">\r
+            <classpath refid="build-path" />\r
+        </javadoc>\r
+    </target>\r
+\r
+    <!-- Removes previously compiled files -->\r
+    <target name="clean-compile">\r
+        <delete dir="${build.dir}" />\r
+    </target>\r
+\r
+    <!-- Removes all build generated content -->\r
+    <target name="clean" depends="clean-compile" description="Removes any artifact produced by the build process.">\r
+        <delete dir="${javadoc.dir}" />
+       <delete dir="${reports.dir}" />\r
+        <delete dir="${dist.dir}" />\r
+    </target>\r
+\r
+    <!-- Create JAR file -->\r
+    <target name="package" depends="compile-core, test" description="Creates the project library jar file.">\r
+        <mkdir dir="${dist.dir}" />\r
+\r
+        <if>\r
+            <equals arg1="${jdk.target}" arg2="1.4" />\r
+            <then>\r
+                <java classname="com.rc.retroweaver.Weaver">\r
+                    <arg value="-source" />\r
+                    <arg value="${core-classes.dir}" />\r
+                    <classpath>\r
+                        <fileset dir="${thirdpaty-lib.dir}">\r
+                            <include name="**/*.jar" />\r
+                        </fileset>\r
+                    </classpath>\r
+                </java>\r
+\r
+                <echo message="**************************************************************" />\r
+                <echo message="    Remember, you must include the retroweaver-rt jar" />\r
+                <echo message="    file, located in the thirdparty-lib directory, along with the" />\r
+                <echo message="    ${jar.name} on your" />\r
+                <echo message="    classpath in order to use this with JDK 1.4" />\r
+                <echo message="**************************************************************" />\r
+\r
+            </then>\r
+        </if>\r
+\r
+        <jar destfile="${dist.dir}/${jar.name}" whenempty="fail">\r
+               <fileset dir="${classpathres.dir}" />
+               <fileset dir="${metainf.dir}" />
+               <fileset dir="${webinf.dir}" />
+               <fileset dir="${webpages.dir}" />
+               <zipfileset dir="${core-classes.dir}" prefix="/WEB-INF/classes/" />
+               <zipfileset dir="${lib.dir}" prefix="/WEB-INF/lib/" />\r
+       </jar>\r
+\r
+    </target>\r
+\r
+    <!-- **************************************************************** -->\r
+    <!-- ***                                                          *** -->\r
+    <!-- ***                     Developer Tasks                      *** -->\r
+    <!-- ***                                                          *** -->\r
+    <!-- **************************************************************** -->\r
        
-       <target name="exampleCertificate">
-               <genkey alias="tomcat" storepass="exampleorg"
-                       keystore="${tomcat.home}/conf/example.jks"
-                       keyalg="RSA" validity="365"
-                       dname="cn=shibboleth.example.org, o=example.org, c=US"
-               />
+       <!-- Checks code against style guidelines -->
+       <target name="checkstyle" description="Developer task: Produces coding standard compliance report.">
+               <mkdir dir="${reports.dir}" />
+               
+               <checkstyle config="${basedir}/checkstyle.xml"
+                                       failOnViolation="false"
+                       classpathref="build-path">
+                       <fileset dir="src" includes="**/*.java" />
+                       <formatter type="plain" toFile="${reports.dir}/checkstyle-report.txt" />
+               </checkstyle>
        </target>
-       
-       
-    <!-- Install Shibboleth -->
-    <target name="install" depends="init, install.init" description="Install Shibboleth">
-
-        <if>
-            <xinput type="confirm" defaultvalue="y">Do you want to install the Shibboleth Identity Provider?</xinput>
-            <then>
-                <antcall target="install.idp" />
-            </then>
-        </if>
-    </target>
-
-       <target name="install.idp" depends="init, install.init">
-        <xinput message="Deploying java web application.  Do you want to install it directly onto the filesystem or use the tomcat manager application?" 
-            addproperty="idp.install-type" type="menu" casesensitive="no">
-            <xoption>filesystem</xoption>
-            <xoption>manager</xoption>
-        </xinput>
-        
-        <antcall target="install.idp.${idp.install-type}" />
-    </target>
-
-    <target name="install.idp.filesystem" depends="init, install.init">
-        
-        <input message="Enter Shibboleth install directory [default: ${shib.home}]"
-            addproperty="shib.home.input" defaultvalue="${shib.home}" />
-        <var name="shib.home" value="${shib.home.input}" />
-
-        <input message="Enter tomcat home directory [default: ${tomcat.home}]"
-            addproperty="tomcat.home.input" defaultvalue="${tomcat.home}" />
-        <var name="tomcat.home" value="${tomcat.home.input}" />
-        
-        <copy file="${configroot}/idp.xml.dist" tofile="${configroot}/idp.xml" overwrite="true" />
-        <replace file="${configroot}/idp.xml" token="$SHIB_HOME$" value="${shib.home}" />
-        <war warfile="${dist}/${distname}.war" webxml="${configroot}/idp.xml" basedir="${approot}" update="no" />
-        <copy file="${dist}/${distname}.war" tofile="${tomcat.home}/webapps/${distname}.war" />
-
-        <if>
-            <available file="${shib.home}" />
-            <then>
-                <if>
-                    <xinput type="confirm">The directory `${shib.home}` already exists.  Do you want to overwrite the existing configuration?</xinput>
-                    <then>
-                        <delete dir="${shib.home}/etc" />
-                        <antcall target="install.idp.filesystem.config" />
-                    </then>
-                </if>
-            </then>
-            <else>
-                <antcall target="install.idp.filesystem.config" />
-            </else>
-        </if>
-
-        <antcall target="savePropertyFile" />
-    </target>
-
-       <target name="install.idp.filesystem.config" depends="init, install.init">
-        <mkdir dir="${shib.home}/etc" />
-        <copy todir="${shib.home}/etc" overwrite="true">
-            <fileset dir="${src}/conf" />
-        </copy>
-        <replace file="${shib.home}/etc/idp.xml" token="$SHIB_HOME$" value="${shib.home}" />
-    </target>
-
-       <target name="install.idp.manager" depends="init, install.init">
-        <antcall target="setupTomcatTasks" />
-        
-        <input message="Enter local tomcat directory [default: ${tomcat.home}]" addproperty="tomcat.home.input" defaultValue="${tomcat.home}" />
-        <var name="tomcat.home" value="${tomcat.home.input}" />
-        
-        <input message="Enter tomcat url [default: ${tomcat.url}]" addproperty="tomcat.url.input" defaultValue="${tomcat.url}" />
-        <var name="tomcat.url" value="${tomcat.url.input}" />
-        
-        <input message="Enter tomcat username [default: ${tomcat.username}]" addproperty="tomcat.username.input" defaultValue="${tomcat.username}" />
-        <var name="tomcat.username" value="${tomcat.username.input}" />
-        
-        <input message="Enter tomcat password [default: ${tomcat.password}]" addproperty="tomcat.password.input" defaultValue="${tomcat.password}" />
-        <var name="tomcat.password" value="${tomcat.password.input}" />
-        
-        <antcall target="tomcat.deploy" />
-        <antcall target="savePropertyFile" />
-    </target>
-
-    <target name="savePropertyFile">
-        <propertyfile file="build.properties">
-            <entry key="shib.home" value="${shib.home}" />
-            <entry key="tomcat.home" value="${tomcat.home}" />
-            <entry key="tomcat.url" value="${tomcat.url}" />
-            <entry key="tomcat.username" value="${tomcat.username}" />
-            <entry key="tomcat.password" value="${tomcat.password}" />
-        </propertyfile>
-    </target>
-    
-</project>
+       \r
+    <!-- Create TGZ source distribution -->
+    <target name="tgz-src-dist" depends="package, javadoc" description="Developer task: Creates the tar, gzipped source distribution.">
+        <tar tarfile="${dist.dir}/${src-dist.name}.tgz" compression="gzip">
+               <tarfileset dir="${build-lib.dir}" prefix="/build-lib/" />
+               <tarfileset dir="${lib.dir}" prefix="/lib/" />
+               <tarfileset dir="${resources.dir}" prefix="/resources/" />
+               <tarfileset dir="${core-src.dir}" prefix="/src/" />
+               <tarfileset dir="${test-src.dir}" prefix="/test/" />
+               <tarfileset dir="${doc.dir}" prefix="/doc/" />
+               <tarfileset file="${dist.dir}/${jar.name}" prefix="/dist/" />
+               <tarfileset file="${basedir}/*.*" prefix="/" />
+        </tar>
+       <checksum file="${dist.dir}/${src-dist.name}.tgz" />
+    </target>
+
+    <!-- Create TGZ binary distribution -->
+    <target name="tgz-bin-dist" depends="package, javadoc" description="Developer task: Creates the tar, gzipped binary distribution.">
+        <tar tarfile="${dist.dir}/${bin-dist.name}.tgz" compression="gzip">
+               <tarfileset dir="${lib.dir}" prefix="/lib/" />\r
+               <tarfileset dir="${resources.dir}" prefix="/resources/" />
+               <tarfileset dir="${doc.dir}" prefix="/doc/" />
+               <tarfileset file="${dist.dir}/${jar.name}" prefix="/dist/" />
+        </tar>
+       <checksum file="${dist.dir}/${bin-dist.name}.tgz" />
+    </target>
+
+    <!-- Create ZIP source distribution -->
+    <target name="zip-src-dist" depends="package, javadoc" description="Developer task: Creates the zipped source distribution.">
+        <zip zipfile="${dist.dir}/${src-dist.name}.zip" whenempty="fail">
+               <zipfileset dir="${build-lib.dir}" prefix="build-lib/" />
+               <zipfileset dir="${lib.dir}" prefix="lib/" />\r
+               <zipfileset dir="${resources.dir}" prefix="/resources/" />
+               <zipfileset dir="${core-src.dir}" prefix="src/" />
+               <zipfileset dir="${test-src.dir}" prefix="test/" />
+               <zipfileset dir="${doc.dir}" prefix="doc/" />
+               <zipfileset file="${dist.dir}/${jar.name}" prefix="/dist/" />
+               <zipfileset file="${basedir}/*.*" prefix="" />
+        </zip>
+       <checksum file="${dist.dir}/${src-dist.name}.zip" />
+    </target>
+
+    <!-- Create ZIP binary distribution -->
+    <target name="zip-bin-dist" depends="package, javadoc"  description="Developer task: Creates the zipped binary distribution.">
+        <zip zipfile="${dist.dir}/${bin-dist.name}.zip" whenempty="fail">
+               <zipfileset dir="${lib.dir}" prefix="lib/" />\r
+               <zipfileset dir="${resources.dir}" prefix="/resources/" />
+               <zipfileset dir="${doc.dir}" prefix="doc/" />
+               <zipfileset file="${dist.dir}/${jar.name}" prefix="/dist/" />
+        </zip>
+       <checksum file="${dist.dir}/${bin-dist.name}.zip" />
+    </target>\r
+\r
+</project>
\ No newline at end of file