Corrected various bugs that caused the build to break
authorlajoie <lajoie@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Fri, 8 Jul 2005 23:33:19 +0000 (23:33 +0000)
committerlajoie <lajoie@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Fri, 8 Jul 2005 23:33:19 +0000 (23:33 +0000)
git-svn-id: https://subversion.switch.ch/svn/shibboleth/java-idp/trunk@1703 ab3bd59b-922f-494d-bb5f-6f0a3c29deca

build.xml
custom/README.txt
custom/extension-build.xml

index 4efb630..b928d6b 100755 (executable)
--- a/build.xml
+++ b/build.xml
 
        <!-- 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, clean-ext" />
+       <target name="clean-all" depends="clean-build, clean-dist, clean-test, clean-javadocs, clean-util" />
        <target name="clean-build">
                <delete dir="${build}" />
                <delete dir="${custom.libs}"/>
                <delete dir="${custom.webapges}"/>
+           <antcall target="ext-clean">
+               <param name="exts.dir" value="${custom}"/>
+           </antcall>
        </target>
        <target name="clean-test">
                <delete>
index 9f2f006..cf2e6d6 100644 (file)
@@ -24,7 +24,7 @@ the following directories
     your-extension-directory/
        etc/ - [Optional] This directory contains anything that isn't java source but still needs 
               to be on the classpath.  This can include subdirectories, and can be excluded.
-       lib/ - [Optional] any third party jars your extension needs
+       lib/ - [REQUIRED if 'src' is present] any third party jars your extension needs
        src/ - [Optional] your extension's source
        tests/ - [Optional] Your extension's JUnit test case source.
        web/ - [Optional] Any web pages, images, JSPs, etc. that should be included with the war
@@ -55,4 +55,10 @@ III. Compile and deploy Shibboleth as normal.
 3. Cautionary Note
 DO NOT include libraries, with your extension, that are included with the Shibboleth
 IdP or SP.  If you do, and there are version mismatches between the two jars, you will get 
-unexpected exceptions during runtime as class versions conflict.
\ No newline at end of file
+unexpected exceptions during runtime as class versions conflict.
+
+4. Common Errors
+4.1 /path/to/extension/lib not found
+  This error occurs because Ant is unable to ignore references to directories of jars that don't
+  exist.  Simply create a 'lib' directory in your extension directory structure, you do not have 
+  to place anything in it.
\ No newline at end of file
index 2d73e07..2f9ba37 100644 (file)
           file name in the extension-build.properties file because if we read that file first the extension 
           build properties won't be able to override properties in it as properties are immutable once set.
         -->
+        <if>
+               <not>
+                       <available file="${ext.root}/build.properties"/>
+               </not>
+            <then>
+                <fail message="No build.properties file found for extension in ${ext.root}; this file is required."/>
+            </then>
+        </if>
         <property file="${ext.root}/build.properties" />
 
         <!-- Load default properties -->
             <then>
                 <echo message="Compiling extension source" />
                 <javac srcdir="${ext.src}" destdir="${ext.classes}" includes="**/*.java" debug="on" source="1.4">
-                    <!-- Shibboleth Classpath -->
+                    <!-- Shibboleth Libraries -->
                     <classpath refid="build.path" />
 
+                    <!-- Shibboleth Classes -->
+                    <classpath>
+                       <pathelement location="${build}"/>
+                    </classpath>
+                    
                     <!-- Extension libraries -->
                     <classpath>
                         <fileset dir="${ext.lib}">
                     <available file="${ext.src}" />
                     <then>
                         <echo message="Generating javadocs for extension ${ext.name}" />
-                        <javadoc sourcepath="${ext.src}" destdir="${ext.docs}" />
+                        <javadoc sourcepath="${ext.src}" 
+                                 destdir="${ext.docs}" 
+                                 packagenames="*"
+                                 author="true"
+                                 version="true"
+                                 windowtitle="${ext.name} Shibboleth Extension Java API"
+                                 doctitle="${ext.name} Shibboleth Extension Java API"
+                                 failonerror="false">
+                            <classpath refid="build.path" />
+                       </javadoc>
                     </then>
                 </if>
             </then>
     </target>
 
     <!-- Cleans up build generated resources -->
-    <target name="clean-ext" description="Cleans up any build created resources">
+    <target name="ext-clean" description="Cleans up any build created resources">
         <!-- Clean up all the modules -->
         <for keepgoing="true" param="module-path">
             <dirset dir="${exts.dir}">
                 <delete dir="${ext.dist}" />
             </sequential>
         </for>
-
-        <!-- Clean out all the staged libraries from the modules -->
-        <delete dir="${exts.dir}/lib" includeemptydirs="true">
-            <fileset dir="${exts.dir}/lib" includes="**/*" />
-        </delete>
-
-        <!-- Clean out all the staged web pages from the modules -->
-        <delete dir="${exts.dir}/web" includeemptydirs="true">
-            <fileset dir="${exts.dir}/web" includes="**/*" />
-        </delete>
     </target>
 
 </project>
\ No newline at end of file