Remove old web pages
[java-idp.git] / build.xml
index 71f691b..3a83aa2 100755 (executable)
--- a/build.xml
+++ b/build.xml
 <project name="Shibboleth Identity Provider" basedir="." default="package">
-       
+
        <tstamp>
-               <format property="build-date" pattern="ddMMyyyy'T'kkmmss" timezone="GMT"/>
+               <format property="build-date" pattern="ddMMyyyy'T'kkmmss" timezone="GMT" />
        </tstamp>\r
 
        <!-- User based property file that overrides any property below -->
-       <property file="${user.name}-build.properties"/>
-               
+       <property file="${user.name}-build.properties" />
+
        <!-- Project based property file -->\r
-    <property file="build.properties" />\r
+       <property file="build.properties" />
+
+       <!-- Installation specific property file -->
+       <property file="install.properties" />\r
 \r
-    <!-- Load ant-contrib tasks -->\r
-    <taskdef resource="net/sf/antcontrib/antlib.xml" />
-       
+       <!-- Load ant-contrib tasks -->\r
+       <taskdef resource="net/sf/antcontrib/antlib.xml" />
+
        <!-- Load Checkstyle tasks -->
        <taskdef resource="checkstyletask.properties" />\r
 \r
-    <!-- Classpath for building core classes-->\r
-    <path id="build-path">\r
-        <fileset dir="${build-lib.dir}" includes="**/*.jar" />\r
-        <fileset dir="${lib.dir}" includes="**/*.jar" />\r
-    </path>\r
-\r
-    <!-- Classpath for testing classes-->\r
-    <path id="test-path">\r
-        <path refid="build-path" />\r
-        <pathelement location="${core-classes.dir}" />\r
-        <pathelement location="${core-src.dir}" />\r
-        <pathelement location="${test-classes.dir}" />
-       <pathelement location="${test-classes.dir}/data" />
-       <pathelement location="${test-classes.dir}/log4j.xml" />\r
-        <pathelement location="${test-src.dir}" />\r
-        <pathelement location="${classpathres.dir}" />\r
-    </path>\r
-\r
-    <!-- Prepare directory structure for build -->\r
-    <target name="build-init">\r
-        <mkdir dir="${build.dir}" />\r
-    </target>\r
-\r
-    <!-- Compile core (non-test) classes -->\r
-    <target name="compile-core" depends="build-init, clean-compile">\r
-        <mkdir dir="${core-classes.dir}" />\r
-\r
-        <javac srcdir="${core-src.dir}" destdir="${core-classes.dir}" includes="**/*.java" debug="on" source="1.5">\r
-            <classpath refid="build-path" />\r
-        </javac>\r
-\r
-    </target>\r
-\r
-    <!-- Compile unit test classes -->\r
-    <target name="compile-test" depends="compile-core">\r
-        <mkdir dir="${test-classes.dir}" />\r
-\r
-        <javac srcdir="${test-src.dir}" destdir="${test-classes.dir}" includes="**/*.java" debug="on" source="1.5">\r
-            <classpath refid="test-path" />\r
-        </javac>\r
-\r
-    </target>\r
-\r
-    <!-- Compile and run unit tests -->\r
-    <target name="test" depends="compile-core, compile-test" description="Runs the unit tests for the project.">\r
-        <mkdir dir="${test-results.dir}" />\r
-\r
-       <echo message="Excuting unit tests using endorsed directory ${java.endorsed.dirs}" />\r
-        <junit printsummary="off" fork="yes" forkmode="once" haltonerror="false" haltonfailure="false" dir="${basedir}" errorproperty="testFailed">\r
-               <jvmarg value="-Djava.endorsed.dirs=${java.endorsed.dirs}" />\r
-            <classpath refid="test-path" />\r
-            <formatter type="xml" />\r
-            <batchtest todir="${test-results.dir}">\r
-                <fileset dir="${test-classes.dir}">\r
-                    <include name="**/*Test.class" />\r
-                </fileset>\r
-            </batchtest>\r
-        </junit>\r
-       <junitreport todir="${test-results.dir}">\r
-         <fileset dir="${test-results.dir}">\r
-           <include name="TEST-*.xml"/>\r
-         </fileset>\r
-         <report format="frames" todir="${test-report.dir}"/>\r
-       </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."/>\r
-    </target>\r
-\r
-    <!-- Javadoc core (non-test) classes -->\r
-    <target name="javadoc" description="Creates the JavaDoc documentatin for the project.">\r
-        <mkdir dir="${javadoc.dir}" />\r
-        <javadoc packagenames="org.opensaml.*" \r
-                    sourcepath="${core-src.dir}" \r
-                    destdir="${javadoc.dir}" \r
-                    author="false" version="true" \r
-                    windowtitle="${ant.project.name} ${version} Java API" \r
-                    doctitle="${ant.project.name} ${version} Java API" \r
-                    bottom="${copyright}"\r
-                    overview="${core-src.dir}/overview.html">\r
-            <classpath refid="build-path" />\r
-        </javadoc>\r
-    </target>\r
-\r
-    <!-- Removes previously compiled files -->\r
-    <target name="clean-compile">\r
-        <delete dir="${build.dir}" />\r
-    </target>\r
-\r
-    <!-- Removes all build generated content -->\r
-    <target name="clean" depends="clean-compile" description="Removes any artifact produced by the build process.">\r
-        <delete dir="${javadoc.dir}" />
-       <delete dir="${reports.dir}" />\r
-        <delete dir="${dist.dir}" />\r
-    </target>\r
-\r
-    <!-- Create JAR file -->\r
-    <target name="package" depends="compile-core, test" description="Creates the project library jar file.">\r
-        <mkdir dir="${dist.dir}" />\r
-\r
-        <if>\r
-            <equals arg1="${jdk.target}" arg2="1.4" />\r
-            <then>\r
-                <java classname="com.rc.retroweaver.Weaver">\r
-                    <arg value="-source" />\r
-                    <arg value="${core-classes.dir}" />\r
-                    <classpath>\r
-                        <fileset dir="${thirdpaty-lib.dir}">\r
-                            <include name="**/*.jar" />\r
-                        </fileset>\r
-                    </classpath>\r
-                </java>\r
-\r
-                <echo message="**************************************************************" />\r
-                <echo message="    Remember, you must include the retroweaver-rt jar" />\r
-                <echo message="    file, located in the thirdparty-lib directory, along with the" />\r
-                <echo message="    ${jar.name} on your" />\r
-                <echo message="    classpath in order to use this with JDK 1.4" />\r
-                <echo message="**************************************************************" />\r
-\r
-            </then>\r
-        </if>\r
-\r
-        <jar destfile="${dist.dir}/${jar.name}" whenempty="fail">\r
-               <fileset dir="${classpathres.dir}" />
-               <fileset dir="${metainf.dir}" />
-               <fileset dir="${webinf.dir}" />
-               <fileset dir="${webpages.dir}" />
-               <zipfileset dir="${core-classes.dir}" prefix="/WEB-INF/classes/" />
-               <zipfileset dir="${lib.dir}" prefix="/WEB-INF/lib/" />\r
-       </jar>\r
-\r
-    </target>\r
-\r
-    <!-- **************************************************************** -->\r
-    <!-- ***                                                          *** -->\r
-    <!-- ***                     Developer Tasks                      *** -->\r
-    <!-- ***                                                          *** -->\r
-    <!-- **************************************************************** -->\r
-       
+       <!-- Classpath for building core classes-->\r
+       <path id="build-path">\r
+               <fileset dir="${build-lib.dir}" includes="**/*.jar" />\r
+               <fileset dir="${lib.dir}" includes="**/*.jar" />\r
+       </path>\r
+\r
+       <!-- Classpath for testing classes-->\r
+       <path id="test-path">\r
+               <path refid="build-path" />\r
+               <pathelement location="${core-classes.dir}" />\r
+               <pathelement location="${core-src.dir}" />\r
+               <pathelement location="${test-classes.dir}" />
+               <pathelement location="${test-classes.dir}/data" />
+               <pathelement location="${test-classes.dir}/log4j.xml" />\r
+               <pathelement location="${test-src.dir}" />\r
+               <pathelement location="${classpathres.dir}" />\r
+       </path>\r
+\r
+       <!-- Prepare directory structure for build -->\r
+       <target name="build-init">\r
+               <mkdir dir="${build.dir}" />\r
+       </target>\r
+\r
+       <!-- Compile core (non-test) classes -->\r
+       <target name="compile-core" depends="build-init, clean-compile">\r
+               <mkdir dir="${core-classes.dir}" />\r
+\r
+               <javac srcdir="${core-src.dir}" destdir="${core-classes.dir}" includes="**/*.java" debug="on" source="1.5">\r
+                       <classpath refid="build-path" />\r
+               </javac>\r
+\r
+       </target>\r
+\r
+       <!-- Compile unit test classes -->\r
+       <target name="compile-test" depends="compile-core">\r
+               <mkdir dir="${test-classes.dir}" />\r
+\r
+               <javac srcdir="${test-src.dir}" destdir="${test-classes.dir}" includes="**/*.java" debug="on" source="1.5">\r
+                       <classpath refid="test-path" />\r
+               </javac>\r
+\r
+       </target>\r
+\r
+       <!-- Compile and run unit tests -->\r
+       <target name="test" depends="compile-core, compile-test" description="Runs the unit tests for the project.">\r
+               <mkdir dir="${test-results.dir}" />\r
+\r
+               <echo message="Excuting unit tests using endorsed directory ${java.endorsed.dirs}" />\r
+               <junit printsummary="off"\r
+                      fork="yes"\r
+                      forkmode="once"\r
+                      haltonerror="false"\r
+                      haltonfailure="false"\r
+                      dir="${basedir}"\r
+                      errorproperty="testFailed">\r
+                       <jvmarg value="-Djava.endorsed.dirs=${java.endorsed.dirs}" />\r
+                       <classpath refid="test-path" />\r
+                       <formatter type="xml" />\r
+                       <batchtest todir="${test-results.dir}">\r
+                               <fileset dir="${test-classes.dir}">\r
+                                       <include name="**/*Test.class" />\r
+                               </fileset>\r
+                       </batchtest>\r
+               </junit>\r
+               <junitreport todir="${test-results.dir}">\r
+                       <fileset dir="${test-results.dir}">\r
+                               <include name="TEST-*.xml" />\r
+                       </fileset>\r
+                       <report format="frames" todir="${test-report.dir}" />\r
+               </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." />\r
+       </target>\r
+\r
+       <!-- Javadoc core (non-test) classes -->\r
+       <target name="javadoc" description="Creates the JavaDoc documentatin for the project.">\r
+               <mkdir dir="${javadoc.dir}" />\r
+               <javadoc packagenames="org.opensaml.*"\r
+                        sourcepath="${core-src.dir}"\r
+                        destdir="${javadoc.dir}"\r
+                        author="false"\r
+                        version="true"\r
+                        windowtitle="${ant.project.name} ${version} Java API"\r
+                        doctitle="${ant.project.name} ${version} Java API"\r
+                        bottom="${copyright}"\r
+                        overview="${core-src.dir}/overview.html">\r
+                       <classpath refid="build-path" />\r
+               </javadoc>\r
+       </target>\r
+\r
+       <!-- Removes previously compiled files -->\r
+       <target name="clean-compile">\r
+               <delete dir="${build.dir}" />\r
+       </target>\r
+\r
+       <!-- Removes all build generated content -->\r
+       <target name="clean" depends="clean-compile" description="Removes any artifact produced by the build process.">\r
+               <delete dir="${javadoc.dir}" />
+               <delete dir="${reports.dir}" />\r
+               <delete dir="${dist.dir}" />\r
+       </target>\r
+\r
+       <!-- Create JAR file -->\r
+       <target name="package" depends="compile-core" description="Creates the project library jar file.">\r
+               <mkdir dir="${dist.dir}" />\r
+\r
+               <if>\r
+                       <equals arg1="${jdk.target}" arg2="1.4" />\r
+                       <then>\r
+                               <java classname="com.rc.retroweaver.Weaver">\r
+                                       <arg value="-source" />\r
+                                       <arg value="${core-classes.dir}" />\r
+                                       <classpath>\r
+                                               <fileset dir="${thirdpaty-lib.dir}">\r
+                                                       <include name="**/*.jar" />\r
+                                               </fileset>\r
+                                       </classpath>\r
+                               </java>\r
+\r
+                               <echo message="**************************************************************" />\r
+                               <echo message="    Remember, you must include the retroweaver-rt jar" />\r
+                               <echo message="    file, located in the thirdparty-lib directory, along with the" />\r
+                               <echo message="    ${jar.name} on your" />\r
+                               <echo message="    classpath in order to use this with JDK 1.4" />\r
+                               <echo message="**************************************************************" />\r
+\r
+                       </then>\r
+               </if>\r
+
+               <jar destfile="${dist.dir}/${jar.name}" whenempty="fail">
+                       <fileset dir="${classpathres.dir}" />
+                       <fileset dir="${metainf.dir}" />
+                       <zipfileset dir="${core-classes.dir}" />
+               </jar>
+
+               <copy todir="${webinf-temp.dir}">
+                       <fileset dir="${webinf.dir}" />
+                       <filterset begintoken="$" endtoken="$">
+                               <filter token="IDP_HOME" value="${idp.home}" />
+                               <filter token="IDP_VERSION" value="${version}" />
+                       </filterset>
+               </copy>
+\r
+               <jar destfile="${dist.dir}/${war.name}" whenempty="fail">\r
+                       <fileset dir="${classpathres.dir}" />
+                       <fileset dir="${metainf.dir}" />
+                       <fileset dir="${webinf-temp.dir}" />
+                       <fileset dir="${webpages.dir}" />
+                       <zipfileset dir="${lib.dir}" prefix="/WEB-INF/lib/" />
+                       <zipfileset file="${dist.dir}/${jar.name}" prefix="/WEB-INF/lib/" />\r
+               </jar>\r
+\r
+       </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" />
+
+               <copy todir="${idp.home}/lib" preservelastmodified="true">
+                       <fileset dir="${lib.dir}" />
+                       <fileset file="${dist.dir}/${jar.name}" />
+               </copy>
+
+               <copy todir="${idp.home}/conf" preservelastmodified="true">
+                       <fileset dir="${conf.dir}" />
+                       <filterset begintoken="$" endtoken="$">
+                               <filter token="IDP_HOME" value="${idp.home}" />
+                               <filter token="IDP_VERSION" value="${version}" />
+                       </filterset>
+               </copy>
+
+               <copy todir="${idp.home}/bin" preservelastmodified="true">
+                       <fileset dir="${tools.dir}" />
+                       <filterset begintoken="$" endtoken="$">
+                               <filter token="IDP_HOME" value="${idp.home}" />
+                               <filter token="IDP_VERSION" value="${version}" />
+                       </filterset>
+               </copy>
+
+               <copy todir="${idp.home}/war" file="${dist.dir}/${war.name}" preservelastmodified="true" />
+
+       </target>\r
+\r
+       <!-- **************************************************************** -->\r
+       <!-- ***                                                          *** -->\r
+       <!-- ***                     Developer Tasks                      *** -->\r
+       <!-- ***                                                          *** -->\r
+       <!-- **************************************************************** -->\r
+
        <!-- Checks code against style guidelines -->
        <target name="checkstyle" description="Developer task: Produces coding standard compliance report.">
                <mkdir dir="${reports.dir}" />
-               
-               <checkstyle config="${basedir}/checkstyle.xml"
-                                       failOnViolation="false"
-                       classpathref="build-path">
+
+               <checkstyle config="${basedir}/checkstyle.xml" failOnViolation="false" classpathref="build-path">
                        <fileset dir="src" includes="**/*.java" />
                        <formatter type="plain" toFile="${reports.dir}/checkstyle-report.txt" />
                </checkstyle>
-       </target>
-       \r
-    <!-- Create TGZ source distribution -->
-    <target name="tgz-src-dist" depends="package, javadoc" description="Developer task: Creates the tar, gzipped source distribution.">
-        <tar tarfile="${dist.dir}/${src-dist.name}.tgz" compression="gzip">
-               <tarfileset dir="${build-lib.dir}" prefix="/build-lib/" />
-               <tarfileset dir="${lib.dir}" prefix="/lib/" />
-               <tarfileset dir="${resources.dir}" prefix="/resources/" />
-               <tarfileset dir="${core-src.dir}" prefix="/src/" />
-               <tarfileset dir="${test-src.dir}" prefix="/test/" />
-               <tarfileset dir="${doc.dir}" prefix="/doc/" />
-               <tarfileset file="${dist.dir}/${jar.name}" prefix="/dist/" />
-               <tarfileset file="${basedir}/*.*" prefix="/" />
-        </tar>
-       <checksum file="${dist.dir}/${src-dist.name}.tgz" />
-    </target>
-
-    <!-- Create TGZ binary distribution -->
-    <target name="tgz-bin-dist" depends="package, javadoc" description="Developer task: Creates the tar, gzipped binary distribution.">
-        <tar tarfile="${dist.dir}/${bin-dist.name}.tgz" compression="gzip">
-               <tarfileset dir="${lib.dir}" prefix="/lib/" />\r
-               <tarfileset dir="${resources.dir}" prefix="/resources/" />
-               <tarfileset dir="${doc.dir}" prefix="/doc/" />
-               <tarfileset file="${dist.dir}/${jar.name}" prefix="/dist/" />
-        </tar>
-       <checksum file="${dist.dir}/${bin-dist.name}.tgz" />
-    </target>
-
-    <!-- Create ZIP source distribution -->
-    <target name="zip-src-dist" depends="package, javadoc" description="Developer task: Creates the zipped source distribution.">
-        <zip zipfile="${dist.dir}/${src-dist.name}.zip" whenempty="fail">
-               <zipfileset dir="${build-lib.dir}" prefix="build-lib/" />
-               <zipfileset dir="${lib.dir}" prefix="lib/" />\r
-               <zipfileset dir="${resources.dir}" prefix="/resources/" />
-               <zipfileset dir="${core-src.dir}" prefix="src/" />
-               <zipfileset dir="${test-src.dir}" prefix="test/" />
-               <zipfileset dir="${doc.dir}" prefix="doc/" />
-               <zipfileset file="${dist.dir}/${jar.name}" prefix="/dist/" />
-               <zipfileset file="${basedir}/*.*" prefix="" />
-        </zip>
-       <checksum file="${dist.dir}/${src-dist.name}.zip" />
-    </target>
-
-    <!-- Create ZIP binary distribution -->
-    <target name="zip-bin-dist" depends="package, javadoc"  description="Developer task: Creates the zipped binary distribution.">
-        <zip zipfile="${dist.dir}/${bin-dist.name}.zip" whenempty="fail">
-               <zipfileset dir="${lib.dir}" prefix="lib/" />\r
-               <zipfileset dir="${resources.dir}" prefix="/resources/" />
-               <zipfileset dir="${doc.dir}" prefix="doc/" />
-               <zipfileset file="${dist.dir}/${jar.name}" prefix="/dist/" />
-        </zip>
-       <checksum file="${dist.dir}/${bin-dist.name}.zip" />
-    </target>\r
+       </target>\r
 \r
 </project>
\ No newline at end of file