<!-- 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>
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
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
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