Added "common" targets for shibboleth.jar
authorcantor <cantor@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Sat, 8 Jun 2002 06:54:55 +0000 (06:54 +0000)
committercantor <cantor@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Sat, 8 Jun 2002 06:54:55 +0000 (06:54 +0000)
git-svn-id: https://subversion.switch.ch/svn/shibboleth/java-idp/trunk@47 ab3bd59b-922f-494d-bb5f-6f0a3c29deca

build.xml

index 98ebb44..bffd13b 100755 (executable)
--- a/build.xml
+++ b/build.xml
@@ -3,13 +3,15 @@
 <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}/source" />
+       <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="buildlibs" value="${root}/buildlibs" />
+       <property name="lib" value="${root}/lib" />
        <property name="dist" value="${root}/dist" />
 
 
        <path id="build.path">
                <pathelement path="${classpath}" />
                <pathelement location="${build}" />
+        <pathelement location="${bld}" />
                <fileset dir="${libdir}">
                        <include name="**/*.jar" />
                </fileset>
-               <fileset dir="${buildlibs}">
+               <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="${build}" />
-       <mkdir dir="${dist}" />
+        <mkdir dir="${bld}" />
+           <mkdir dir="${build}" />
+        <mkdir dir="${dist}" />
        </target>
 
 
        <!-- Compile classes and move them to ${build} -->
-       <target name="compile-all" depends="init">
-               <javac srcdir="${src}" destdir="${build}" includes="**/*.java" excludes="edu/internet2/middleware/shibboleth/aaLocal/**" debug="on">
-                       <classpath refid="build.path" />
+       <target name="compile-all" depends="compile-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/shibboleth/eduPerson/**" />
+           <classpath refid="build.path" />
                </javac>
-               <copy todir="${build}/schemas">
-                        <fileset dir="${src}/schemas"/>
-                </copy>
        </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">
+            <fileset dir="${src}/schemas"/>
+        </copy>
+       </target>
 
 
        <!-- Create various product distributions and move them to ${dist} -->
        <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">
+               <jar jarfile="${dist}/${distname}.jar" basedir="${bld}">
+                       <include name="schemas/**" />
+                       <include name="edu/internet2/middleware/shibboleth/common/**" />
+                       <include name="edu/internet2/middleware/eduPerson/**" />
+               </jar>
+       </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>
                <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" />