New signature logic
[java-idp.git] / build.xml
index d00f890..48be80a 100755 (executable)
--- a/build.xml
+++ b/build.xml
 
 <project name="Shibboleth" default="dist-all" basedir=".">
 
-       <!-- Set global properties for this build -->
-    <property name="opensaml" value="${root}/../../../opensaml/java/lib" />
-       <property name="distname" value="shibboleth" />
-       <property name="root" value="." />
-       <property name="src" value="${root}/src" />
-    <property name="bld" value="${root}/build" />
-       <property name="approot" value="${root}/webApplication" />
-       <property name="build" value="${approot}/WEB-INF/classes" />
-       <property name="libdir" value="${approot}/WEB-INF/lib" />
-       <property name="lib" value="${root}/lib" />
-       <property name="dist" value="${root}/dist" />
-
-
-       <!-- Construct the CLASSPATH -->
-       <path id="build.path">
-               <pathelement path="${classpath}" />
-               <pathelement location="${build}" />
-        <pathelement location="${bld}" />
-               <fileset dir="${libdir}">
-                       <include name="**/*.jar" />
-               </fileset>
-               <fileset dir="${lib}">
-                       <include name="**/*.jar" />
-               </fileset>
-               <fileset dir="${opensaml}">
-                       <include name="opensaml.jar" />
-               </fileset>
-       </path>
-
-
-       <!-- Prepare directory structure for project build-->
-       <target name="init">
-               <mkdir dir="${bld}" />
-               <mkdir dir="${build}" />
-               <mkdir dir="${dist}" />
-       </target>
-
-
-       <!-- Compile classes and move them to ${build} -->
-       <target name="compile-all" depends="package-common">
-               <javac srcdir="${src}" destdir="${build}" includes="**/*.java" debug="on">
-                       <exclude name="edu/internet2/middleware/shibboleth/aaLocal/**" />
-                       <exclude name="edu/internet2/middleware/shibboleth/common/**" />
-                       <exclude name="edu/internet2/middleware/eduPerson/**" />
-                       <classpath refid="build.path" />
-               </javac>
-       </target>
-
-       <target name="compile-common" depends="init">
-               <javac srcdir="${src}" destdir="${bld}" debug="on">
-                       <include name="edu/internet2/middleware/eduPerson/*.java" />
-                       <include name="edu/internet2/middleware/shibboleth/common/*.java" />
-                       <classpath refid="build.path" />
-               </javac>
-               <copy todir="${bld}/schemas">
+    <!-- Set global properties for this build -->
+    <property name="distname" value="shibboleth" />
+    <property name="root" value="." />
+    <property name="src" value="${root}/src" />
+    <property name="approot" value="${root}/webApplication" />
+    <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="dist" value="${root}/dist" />
+    <property name="docs" value="${root}/docs" />
+    <property name="javadocs" value="${docs}/api" />
+
+    <property name="year" value="2002"/>
+    <property name="copyright" value="Copyright &#169; ${year} UCAID. All Rights Reserved."/>
+
+
+    <!-- Construct the CLASSPATH -->
+    <path id="build.path">
+        <pathelement path="${classpath}" />
+        <pathelement location="${build}" />
+        <fileset dir="${libdir}">
+            <include name="**/*.jar" />
+        </fileset>
+        <fileset dir="${buildlibs}">
+            <include name="**/*.jar" />
+        </fileset>
+    </path>
+
+
+    <!-- Prepare directory structure for project build-->
+    <target name="init">
+    <mkdir dir="${build}" />
+    <mkdir dir="${dist}" />
+    </target>
+
+
+    <!-- This target should be run before checking code into the repository -->
+    <target name="pre-checkin" depends="compile-all, test-all, clean-all" />
+
+
+    <!-- Compile classes and move them to ${build} -->
+    <target name="compile-all" depends="init">
+        <javac srcdir="${src}" destdir="${build}" includes="**/*.java" debug="on">
+            <exclude name="edu/internet2/middleware/shibboleth/hs-cmu/**" />
+            <classpath refid="build.path" />
+        </javac>
+        <copy todir="${build}/schemas">
             <fileset dir="${src}/schemas"/>
         </copy>
+    </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-all, package, clean-build" />
-       <target name="dist-origin" depends="compile-all, package, clean-build" />
-       <target name="dist-target" depends="compile-all, package, clean-build" />
-       <target name="dist-wayf" depends="compile-all, package, clean-build" />
-
-       <target name="dist-common" depends="clean-common, compile-common, package-common" />
-
-       <target name="package">
-               <war warfile="${dist}/${distname}.war" webxml="${approot}/WEB-INF/web.xml" basedir="${approot}" update="no" />
-       </target>
-
-       <target name="package-common" depends="compile-common">
-               <jar jarfile="${dist}/${distname}.jar" basedir="${bld}">
-                       <include name="schemas/**" />
-                       <include name="edu/internet2/middleware/shibboleth/common/**" />
-                       <include name="edu/internet2/middleware/eduPerson/**" />
-               </jar>
+    <!-- Create various product distributions and move them to ${dist} -->
+    <target name="dist" depends="dist-all" />
+    <target name="dist-all" depends="compile-all, test-all, package-all, clean-build" />
+    <target name="package-all">
+        <war warfile="${dist}/${distname}.war" webxml="${approot}/WEB-INF/web.xml" basedir="${approot}" update="no" />
+    </target>
+
+    <target name="dist-origin" depends="compile-all, test-origin, package-origin, clean-build" />
+    <target name="package-origin">
+        <war warfile="${dist}/${distname}-origin.war" webxml="${configroot}/origin.xml" basedir="${approot}" update="no" />
+    </target>
+
+    <target name="dist-target" depends="compile-all, test-target, package-target, clean-build" />
+    <target name="package-target">
+        <war warfile="${dist}/${distname}-target.war" webxml="${configroot}/target.xml" basedir="${approot}" update="no" />
+    </target>
+
+    <target name="dist-target-includewayf" depends="compile-all, test-target, test-wayf, package-target-includewayf, clean-build" />
+    <target name="package-target-includewayf">
+        <war warfile="${dist}/${distname}-target.war" webxml="${configroot}/target-includewayf.xml" basedir="${approot}" update="no" />
+    </target>
+
+    <!-- Build utilities -->
+    <target name="build-util" depends="compile-all">
+        <jar jarfile="${dist}/shib-util.jar" basedir="${build}" />
+    </target>
+
+    <target name="dist-wayf" depends="compile-all, test-wayf, package-wayf, clean-build" />
+    <target name="package-wayf">
+        <war warfile="${dist}/${distname}-wayf.war" webxml="${configroot}/wayf.xml" basedir="${approot}" update="no" />
+    </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" />
+    <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>
 
-
-       <!-- Cleanup after the build, test, and distribution processes -->
-       <target name="clean-all" depends="clean-build, clean-dist, clean-test" />
-       <target name="clean-build">
-               <delete dir="${build}" />
-        <delete dir="${bld}" />
-       </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-common">
-               <delete dir="${bld}/schemas" />
-               <delete dir="${bld}/edu/internet2/middleware/shibboleth/common" />
-               <delete dir="${bld}/edu/internet2/middleware/eduPerson" />
-       </target>
-       
-       <!-- Run automated tests on compiled code -->
-       <target name="test-all" depends="test-common" />
-       <target name="test-common" depends="compile-all">
-               <junit printsummary="no" fork="no" haltonfailure="yes" haltonerror="no">
-                       <classpath refid="build.path" />
-                       <formatter type="plain" />
-                       <test name="edu.internet2.middleware.shibboleth.common.AQHTest" />
-               </junit>
-       </target>
+    
+    <!-- Run automated tests on compiled code -->
+    <target name="test-all" depends="test-origin, test-target, test-wayf" />
+    <target name="test-origin" depends="test-common" />
+    <target name="test-target" depends="test-common" />
+    <target name="test-wayf" depends="test-common" />
+    <target name="test-common" depends="compile-all">
+        <junit printsummary="no" fork="no" haltonfailure="yes" haltonerror="no">
+            <classpath refid="build.path" />
+            <formatter type="plain" />
+        <!-- <test name="edu.internet2.middleware.shibboleth.common.AQHTest" /> -->
+        </junit>
+    </target>
 
 </project>
-