No need for special log4j exclusion rule in build
[java-idp.git] / build.xml
index 13fa751..b4efd1a 100755 (executable)
--- a/build.xml
+++ b/build.xml
@@ -1,9 +1,5 @@
-<project name="Shibboleth Identity Provider" basedir="." default="package">
-
-       <tstamp>
-               <format property="build-date" pattern="ddMMyyyy'T'kkmmss" timezone="GMT" />
-       </tstamp>
-
+<project name="Shibboleth Identity Provider" basedir="." default="install">
+       
        <!-- User based property file that overrides any property below -->
        <property file="${user.name}-build.properties" />
 
                <mkdir dir="${idp.home}/logs" />
                <mkdir dir="${idp.home}/bin" />
                <mkdir dir="${idp.home}/war" />
-               <mkdir dir="${idp.home}/temp/metadata" />
+               <mkdir dir="${idp.home}/metadata" />
 
                <copy todir="${idp.home}/lib" preservelastmodified="true">
                        <fileset dir="${lib.dir}" />
                        <fileset file="${dist.dir}/${jar.name}" />
+                       <fileset file="${build-lib.dir}/servlet-2.4.jar" />
                </copy>
+               
+               <if>
+                       <available file="${idp.home}/conf" />
+                       <then>
+                               <mkdir dir="${idp.home}/conf.bak" />
+                               <copy todir="${idp.home}/conf.bak" preservelastmodified="true">
+                                       <fileset dir="${idp.home}/conf" />
+                               </copy>
+                       </then>
+               </if>
 
-               <copy todir="${idp.home}/conf" preservelastmodified="true">
+               <copy todir="${idp.home}/conf" preservelastmodified="true" overwrite="${idp.overwrite-config}">
                        <fileset dir="${conf.dir}" />
                        <filterset begintoken="$" endtoken="$">
                                <filter token="IDP_HOME" value="${idp.home}" />
                        </filterset>
                </copy>
 
-               <symlink link="${idp.home}/bin/aacli.sh" resource="shib-tools.sh" overwrite="true" />
                <chmod file="${idp.home}/bin/*.sh" perm="+x" />
 
                <copy todir="${webinf-temp.dir}">
                                <filter token="IDP_VERSION" value="${version}" />
                        </filterset>
                </copy>
-               <jar destfile="${dist.dir}/${war.name}" whenempty="fail">
+               <jar destfile="${idp.home}/war/${war.name}" whenempty="fail">
                        <zipfileset dir="${webinf-temp.dir}" prefix="WEB-INF/" />
                        <zipfileset dir="${webpages.dir}" prefix="" />
-                       <zipfileset dir="${lib.dir}" prefix="WEB-INF/lib/" excludes="**/log4j*.jar" />
+                       <zipfileset dir="${lib.dir}" prefix="WEB-INF/lib/" />
                        <zipfileset file="${dist.dir}/${jar.name}" prefix="WEB-INF/lib/" />
                </jar>
-               <copy todir="${idp.home}/war" file="${dist.dir}/${war.name}" preservelastmodified="true" />
 
        </target>