- <!-- User based property file that overrides any property below -->
- <property file="${user.name}-build.properties" />
-
- <!-- Project based property file -->
- <property file="build.properties" />
-
- <!-- Installation specific property file -->
- <property file="install.properties" />
-
- <!-- Load ant-contrib tasks -->
- <taskdef resource="net/sf/antcontrib/antlib.xml" />
-
- <!-- Load Checkstyle tasks -->
- <taskdef resource="checkstyletask.properties" />
-
- <!-- Classpath for building core classes-->
- <path id="build-path">
- <fileset dir="${build-lib.dir}" includes="**/*.jar" />
- <fileset dir="${lib.dir}" includes="**/*.jar" />
- </path>
-
- <!-- Classpath for testing classes-->
- <path id="test-path">
- <path refid="build-path" />
- <pathelement location="${core-classes.dir}" />
- <pathelement location="${core-src.dir}" />
- <pathelement location="${test-classes.dir}" />
- <pathelement location="${test-classes.dir}/data" />
- <pathelement location="${test-classes.dir}/log4j.xml" />
- <pathelement location="${test-src.dir}" />
- <pathelement location="${classpathres.dir}" />
- </path>
-
- <!-- Prepare directory structure for build -->
- <target name="build-init">
- <mkdir dir="${build.dir}" />
- </target>
-
- <!-- Compile core (non-test) classes -->
- <target name="compile-core" depends="build-init, clean-compile">
- <mkdir dir="${core-prep-source.dir}" />
- <mkdir dir="${core-classes.dir}" />
-
- <copy todir="${core-prep-source.dir}" preservelastmodified="true">
- <fileset dir="${core-src.dir}" />
- <filterset begintoken="$" endtoken="$">
- <filter token="IDP_HOME" value="${idp.home}" />
- <filter token="IDP_VERSION" value="${version}" />
- </filterset>
- </copy>
-
- <javac srcdir="${core-prep-source.dir}" destdir="${core-classes.dir}" includes="**/*.java" debug="on" source="1.5">
- <classpath refid="build-path" />
- </javac>
-
- <delete dir="${core-prep-source.dir}" />
-
- </target>
-
- <!-- Compile unit test classes -->
- <target name="compile-test" depends="compile-core">
- <mkdir dir="${test-classes.dir}" />
-
- <javac srcdir="${test-src.dir}" destdir="${test-classes.dir}" includes="**/*.java" debug="on" source="1.5">
- <classpath refid="test-path" />
- </javac>
-
- </target>
-
- <!-- Compile and run unit tests -->
- <target name="test" depends="compile-core, compile-test" description="Runs the unit tests for the project.">
- <mkdir dir="${test-results.dir}" />
-
- <echo message="Excuting unit tests using endorsed directory ${java.endorsed.dirs}" />
- <junit printsummary="off" fork="yes" forkmode="once" haltonerror="false" haltonfailure="false" dir="${basedir}" errorproperty="testFailed">
- <jvmarg value="-Djava.endorsed.dirs=${java.endorsed.dirs}" />
- <classpath refid="test-path" />
- <formatter type="xml" />
- <batchtest todir="${test-results.dir}">
- <fileset dir="${test-classes.dir}">
- <include name="**/*Test.class" />
- </fileset>
- </batchtest>
- </junit>
- <junitreport todir="${test-results.dir}">
- <fileset dir="${test-results.dir}">
- <include name="TEST-*.xml" />
- </fileset>
- <report format="frames" todir="${test-report.dir}" />
- </junitreport>
-
- <echo message="Test report available at ${test-report.dir}/index.html" />
- <fail if="testFailed" message="Test failure; see ${test-report.dir}/index.html for more information." />
- </target>
-
- <!-- Javadoc core (non-test) classes -->
- <target name="javadoc" description="Creates the JavaDoc documentatin for the project.">
- <mkdir dir="${javadoc.dir}" />
- <javadoc packagenames="org.opensaml.*" sourcepath="${core-src.dir}" destdir="${javadoc.dir}" author="false" version="true" windowtitle="${ant.project.name} ${version} Java API" doctitle="${ant.project.name} ${version} Java API" bottom="${copyright}" overview="${core-src.dir}/overview.html">
- <classpath refid="build-path" />
- </javadoc>
- </target>
-
- <!-- Removes previously compiled files -->
- <target name="clean-compile">
- <delete dir="${build.dir}" />
- <delete dir="${dist.dir}" />
- </target>
-
- <!-- Removes all build generated content -->
- <target name="clean" depends="clean-compile" description="Removes any artifact produced by the build process.">
- <delete dir="${javadoc.dir}" />
- <delete dir="${reports.dir}" />
- <delete dir="${dist.dir}" />
- </target>
-
- <!-- Create JAR file -->
- <target name="package" depends="compile-core" description="Creates the project library jar file.">
- <mkdir dir="${dist.dir}" />
-
- <if>
- <equals arg1="${jdk.target}" arg2="1.4" />
- <then>
- <java classname="com.rc.retroweaver.Weaver">
- <arg value="-source" />
- <arg value="${core-classes.dir}" />
- <classpath>
- <fileset dir="${thirdpaty-lib.dir}">
- <include name="**/*.jar" />
- </fileset>
- </classpath>
- </java>
-
- <echo message="**************************************************************" />
- <echo message=" Remember, you must include the retroweaver-rt jar" />
- <echo message=" file, located in the thirdparty-lib directory, along with the" />
- <echo message=" ${jar.name} on your" />
- <echo message=" classpath in order to use this with JDK 1.4" />
- <echo message="**************************************************************" />
-
- </then>
- </if>
-
- <jar destfile="${dist.dir}/${jar.name}" whenempty="fail">
- <fileset dir="${classpathres.dir}" />
- <zipfileset dir="${metainf.dir}" prefix="META-INF/" />
- <zipfileset dir="${core-classes.dir}" />
- </jar>
-
- </target>
-
- <target name="install" depends="package" description="Installs the identity provider software.">
- <mkdir dir="${idp.home}" />
- <mkdir dir="${idp.home}/lib" />
- <mkdir dir="${idp.home}/conf" />
- <mkdir dir="${idp.home}/logs" />
- <mkdir dir="${idp.home}/bin" />
- <mkdir dir="${idp.home}/war" />
- <mkdir dir="${idp.home}/metadata" />
+ <!-- User based property file that overrides any property below -->
+ <property file="${user.name}-build.properties" />
+
+ <!-- Project based property file -->
+ <property file="build.properties" />
+
+ <!-- Installation specific property file -->
+ <property file="install.properties" />
+
+ <!-- Load ant-contrib tasks -->
+ <taskdef resource="net/sf/antcontrib/antlib.xml" />
+
+ <!-- Load Internet2 ant extensions -->
+ <taskdef resource="edu/internet2/middleware/ant/antlib.xml" />
+
+ <!-- Load Checkstyle tasks -->
+ <taskdef resource="checkstyletask.properties" />
+
+ <!-- Classpath for building core classes-->
+ <path id="build-path">
+ <fileset dir="${build-lib.dir}" includes="**/*.jar" />
+ <fileset dir="${lib.dir}" includes="**/*.jar" />
+ </path>
+
+ <!-- Classpath for testing classes-->
+ <path id="test-path">
+ <path refid="build-path" />
+ <pathelement location="${core-classes.dir}" />
+ <pathelement location="${core-src.dir}" />
+ <pathelement location="${test-classes.dir}" />
+ <pathelement location="${test-classes.dir}/data" />
+ <pathelement location="${test-classes.dir}/log4j.xml" />
+ <pathelement location="${test-src.dir}" />
+ <pathelement location="${classpathres.dir}" />
+ </path>
+
+ <!-- Prepare directory structure for build -->
+ <target name="build-init">
+ <mkdir dir="${build.dir}" />
+ </target>
+
+ <!-- Compile core (non-test) classes -->
+ <target name="compile-core" depends="build-init, clean-compile">
+ <mkdir dir="${core-prep-source.dir}" />
+ <mkdir dir="${core-classes.dir}" />
+
+ <copy todir="${core-prep-source.dir}" preservelastmodified="true">
+ <fileset dir="${core-src.dir}" />
+ <filterset begintoken="$" endtoken="$">
+ <filter token="IDP_HOME" value="${idp.home}" />
+ <filter token="IDP_VERSION" value="${version}" />
+ </filterset>
+ </copy>
+
+ <javac srcdir="${core-prep-source.dir}"
+ destdir="${core-classes.dir}"
+ includes="**/*.java"
+ debug="on"
+ source="1.5">
+ <classpath refid="build-path" />
+ </javac>
+
+ <delete dir="${core-prep-source.dir}" />
+
+ </target>
+
+ <!-- Compile unit test classes -->
+ <target name="compile-test" depends="compile-core">
+ <mkdir dir="${test-classes.dir}" />
+
+ <javac srcdir="${test-src.dir}" destdir="${test-classes.dir}" includes="**/*.java" debug="on" source="1.5">
+ <classpath refid="test-path" />
+ </javac>
+
+ </target>
+
+ <!-- Compile and run unit tests -->
+ <target name="test" depends="compile-core, compile-test" description="Runs the unit tests for the project.">
+ <mkdir dir="${test-results.dir}" />
+
+ <echo message="Excuting unit tests using endorsed directory ${java.endorsed.dirs}" />
+ <junit printsummary="off"
+ fork="yes"
+ forkmode="once"
+ haltonerror="false"
+ haltonfailure="false"
+ dir="${basedir}"
+ errorproperty="testFailed">
+ <jvmarg value="-Djava.endorsed.dirs=${java.endorsed.dirs}" />
+ <classpath refid="test-path" />
+ <formatter type="xml" />
+ <batchtest todir="${test-results.dir}">
+ <fileset dir="${test-classes.dir}">
+ <include name="**/*Test.class" />
+ </fileset>
+ </batchtest>
+ </junit>
+ <junitreport todir="${test-results.dir}">
+ <fileset dir="${test-results.dir}">
+ <include name="TEST-*.xml" />
+ </fileset>
+ <report format="frames" todir="${test-report.dir}" />
+ </junitreport>
+
+ <echo message="Test report available at ${test-report.dir}/index.html" />
+ <fail if="testFailed" message="Test failure; see ${test-report.dir}/index.html for more information." />
+ </target>
+
+ <!-- Javadoc core (non-test) classes -->
+ <target name="javadoc" description="Creates the JavaDoc documentatin for the project.">
+ <mkdir dir="${javadoc.dir}" />
+ <javadoc packagenames="org.opensaml.*"
+ sourcepath="${core-src.dir}"
+ destdir="${javadoc.dir}"
+ author="false"
+ version="true"
+ windowtitle="${ant.project.name} ${version} Java API"
+ doctitle="${ant.project.name} ${version} Java API"
+ bottom="${copyright}"
+ overview="${core-src.dir}/overview.html">
+ <classpath refid="build-path" />
+ </javadoc>
+ </target>
+
+ <!-- Removes previously compiled files -->
+ <target name="clean-compile">
+ <delete dir="${build.dir}" />
+ <delete dir="${dist.dir}" />
+ </target>
+
+ <!-- Removes all build generated content -->
+ <target name="clean" depends="clean-compile" description="Removes any artifact produced by the build process.">
+ <delete dir="${javadoc.dir}" />
+ <delete dir="${reports.dir}" />
+ <delete dir="${dist.dir}" />
+ </target>
+
+ <!-- Create JAR file -->
+ <target name="package" depends="compile-core" description="Creates the project library jar file.">
+ <mkdir dir="${dist.dir}" />
+
+ <if>
+ <equals arg1="${jdk.target}" arg2="1.4" />
+ <then>
+ <java classname="com.rc.retroweaver.Weaver">
+ <arg value="-source" />
+ <arg value="${core-classes.dir}" />
+ <classpath>
+ <fileset dir="${thirdpaty-lib.dir}">
+ <include name="**/*.jar" />
+ </fileset>
+ </classpath>
+ </java>
+
+ <echo message="**************************************************************" />
+ <echo message=" Remember, you must include the retroweaver-rt jar" />
+ <echo message=" file, located in the thirdparty-lib directory, along with the" />
+ <echo message=" ${jar.name} on your" />
+ <echo message=" classpath in order to use this with JDK 1.4" />
+ <echo message="**************************************************************" />
+
+ </then>
+ </if>
+
+ <jar destfile="${dist.dir}/${jar.name}" whenempty="fail">
+ <fileset dir="${classpathres.dir}" />
+ <zipfileset dir="${metainf.dir}" prefix="META-INF/" />
+ <zipfileset dir="${core-classes.dir}" />
+ </jar>
+
+ </target>
+
+ <target name="install" depends="package" description="Installs the identity provider software.">
+ <input message="Where should the Shibboleth Identity Provider software be installed? [default: ${idp.home}]"
+ addproperty="idp.home.input"
+ defaultvalue="${idp.home}" />
+ <var name="idp.home" value="${idp.home.input}" />
+
+ <input message="What is the hostname of the Shibboleth Identity Provider server?" addproperty="idp.hostname" />
+
+ <mkdir dir="${idp.home}" />
+ <mkdir dir="${idp.home}/bin" />
+ <mkdir dir="${idp.home}/conf" />