Fixed an IdP configuration schema bug.
[java-idp.git] / build.xml
index 52032ce..64b75a2 100755 (executable)
--- a/build.xml
+++ b/build.xml
@@ -1,6 +1,6 @@
 <!-- Main build configutaion for Shibboleth java components - Walter Hoehn 06/04/2002 -->
 
-<project name="Shibboleth" default="dist-origin" basedir=".">
+<project name="Shibboleth" default="dist-IdP" basedir=".">
 
     <!-- Set global properties for this build -->
     <property name="distname" value="shibboleth" />
@@ -19,7 +19,7 @@
     <property name="docs" value="${root}/doc/" />
     <property name="javadocs" value="${docs}/api/" />
 
-    <property name="year" value="2002"/>
+    <property name="year" value="2002-2005"/>
     <property name="copyright" value="Copyright &#169; ${year} UCAID. All Rights Reserved."/>
 
        <!-- Configure properties to find Tomcat and access the Manager application -->
 
 
     <!-- Compile classes and move them to ${build} -->
-    <target name="compile" depends="init">
-        <javac srcdir="${src}" destdir="${build}" includes="**/*.java" debug="on">
+    <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">
     <!-- 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-origin" depends="compile, test-origin, package-origin, clean-build" />
-    <target name="package-origin">
+    <target name="dist-IdP" depends="compile, test-IdP, package-IdP, clean-build" />
+    <target name="package-IdP">
         <war warfile="${dist}/${distname}.war" webxml="${configroot}/origin.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>
 
     <!-- Run automated tests on compiled code -->
-    <target name="test-all" depends="test-origin" />
-    <target name="test-origin" depends="compile-tests">
+    <target name="test-all" depends="test-IdP" />
+    <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="build.path" />
     <target name="undeploy" description="Undeploy using Tomcat manager">
         <tomcatUndeploy url="${url}" username="${username}" password="${password}" path="/${distname}"/>
     </target>
+       
+       <target name="distcopy" description="Copy shibboleth.war to {tomcat.home}/webapps (Tomcat must be stopped first)">
+               <!-- Deploy war file by copy and delete. Tomcat must not be
+                    running when this occurs. --> 
+               <copy file="${dist}/${distname}.war" 
+                       tofile="${tomcat.home}/webapps/${distname}.war" 
+               />
+               <delete dir="${tomcat.home}/webapps/${distname}" quiet="yes" />
+       </target>
+       
     
     <!-- Automated key generation -->
        <target name="genSecret" 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>
+       
+       <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"
+               />
+       </target>
 </project>