Commit 69fa7366 authored by Quality Assurance's avatar Quality Assurance Committed by qa

Better wildfireHome support

git-svn-id: http://svn.igniterealtime.org/svn/repos/wildfire/trunk@5813 b35dd754-fafc-0310-a699-88a17e54d16e
parent c27f92a8
...@@ -106,7 +106,7 @@ ...@@ -106,7 +106,7 @@
<property name="plugin.src.dir" value="${src.dir}/plugins"/> <property name="plugin.src.dir" value="${src.dir}/plugins"/>
<property name="plugin.dev.dir" value=""/> <!-- Set by a developer as alt plugin location --> <property name="plugin.dev.dir" value=""/> <!-- Set by a developer as alt plugin location -->
<property name="plugin.dev.dest.dir" value="${target.dir}/plugins-dev"/> <property name="plugin.dev.dest.dir" value="${target.dir}/plugins-dev"/>
<property name="plugin.dest.dir" value="${target.wildfireHome}/plugins"/> <property name="plugin.dest.dir" value="${target.dir}/plugins"/>
<property name="nonrelease.plugin.dir" value="${basedir}/plugins-tmp"/> <property name="nonrelease.plugin.dir" value="${basedir}/plugins-tmp"/>
<property name="webapp.dest.dir" value="${target.dir}/webapp"/> <property name="webapp.dest.dir" value="${target.dir}/webapp"/>
<property name="war.name" value="wildfire.war"/> <property name="war.name" value="wildfire.war"/>
...@@ -353,8 +353,6 @@ ...@@ -353,8 +353,6 @@
<fileset dir="${lib.build.dir}" includes="jasper-compiler.jar"/> <fileset dir="${lib.build.dir}" includes="jasper-compiler.jar"/>
</copy> </copy>
<!-- Setup environment -->
<antcall target="wildfireHome"/>
</target> </target>
<!-- run =================================================================================== --> <!-- run =================================================================================== -->
...@@ -417,17 +415,18 @@ ...@@ -417,17 +415,18 @@
</war> </war>
<!-- Create a Wildfire home --> <!-- Create a Wildfire home -->
<copy todir="${war.dest.dir}/wildfireHome"> <antcall target="-config">
<fileset dir="${target.wildfireHome}"> <param name="config.dir" value="${war.dest.dir}/wildfireHome" />
<include name="conf/**/*.*"/> </antcall>
<include name="resources/**/*"/>
<include name="plugins/*.*"/> <!-- Force create the plugins dir (will be empty) -->
</fileset> <mkdir dir="${war.dest.dir}/wildfireHome/plugins"/>
<copy todir="${war.dest.dir}/wildfireHome/plugins" failonerror="false">
<fileset dir="${plugin.dest.dir}" includes="*.*" />
</copy> </copy>
<!-- Force create the logs dir (will be empty) --> <!-- Force create the logs dir (will be empty) -->
<mkdir dir="${war.dest.dir}/wildfireHome/logs"/> <mkdir dir="${war.dest.dir}/wildfireHome/logs"/>
<!-- Force create the plugins dir (will be empty) -->
<mkdir dir="${war.dest.dir}/wildfireHome/plugins"/>
</target> </target>
<!-- javadoc =============================================================================== --> <!-- javadoc =============================================================================== -->
...@@ -592,47 +591,28 @@ ...@@ -592,47 +591,28 @@
</junit> </junit>
</target> </target>
<!-- wildfireHome ========================================================================== --> <!-- -config ============================================================================ -->
<target name="wildfireHome" description="Create a wildfireHome directory in target.wildfireHome."> <!-- Creates conf and resources folders in config.dir folder -->
<!-- Set this to true to enable a pre-setup wildfireHome directory --> <target name="-config" >
<property name="wildfireHome.preconfigured" value="false"/> <property name="config.dir" value="${target.dir}" />
<mkdir dir="${target.wildfireHome}" /> <!-- Copy conf dir -->
<copy todir="${config.dir}">
<!-- Copy lib dir --> <fileset dir="${src.dir}" includes="conf/**/*.*"></fileset>
<copy todir="${target.wildfireHome}/lib"> </copy>
<fileset dir="${jar.dest.dir}" includes="*.*"></fileset>
</copy>
<!-- Copy appropriate wildfireHome dir -->
<if>
<equals arg1="${wildfireHome.preconfigured}" arg2="true"/>
<then>
<!-- Copy pre-configured wildfireHome dir -->
<copy todir="${target.wildfireHome}">
<fileset dir="${basedir}/build/wildfireHome" includes="**/*.*" />
</copy>
</then>
<else>
<!-- Copy conf dir -->
<copy todir="${target.wildfireHome}">
<fileset dir="${src.dir}" includes="conf/**/*.*"></fileset>
</copy>
</else>
</if>
<!-- Copy database scripts --> <!-- Copy database scripts -->
<if> <if>
<equals arg1="${copy.dbscripts}" arg2="true"/> <equals arg1="${copy.dbscripts}" arg2="true"/>
<then> <then>
<copy todir="${target.wildfireHome}/resources"> <copy todir="${config.dir}/resources">
<fileset dir="${src.dir}" includes="database/**/*.sql"></fileset> <fileset dir="${src.dir}" includes="database/**/*.sql"></fileset>
</copy> </copy>
</then> </then>
</if> </if>
<!-- Copy security resources --> <!-- Copy security resources -->
<copy todir="${target.wildfireHome}/resources"> <copy todir="${config.dir}/resources">
<fileset dir="${src.dir}"> <fileset dir="${src.dir}">
<include name="security/*"/> <include name="security/*"/>
<include name="security/*.*"/> <include name="security/*.*"/>
...@@ -640,16 +620,55 @@ ...@@ -640,16 +620,55 @@
</copy> </copy>
<!-- Copy native authentication files --> <!-- Copy native authentication files -->
<copy todir="${target.wildfireHome}/resources"> <copy todir="${config.dir}/resources">
<fileset dir="${src.dir}/resources"> <fileset dir="${src.dir}/resources">
<include name="nativeAuth/**"/> <include name="nativeAuth/**"/>
</fileset> </fileset>
</copy> </copy>
</target>
<!-- wildfireHome ========================================================================== -->
<target name="wildfireHome" description="Create a wildfireHome directory in target.wildfireHome.">
<!-- Set this to true to enable a pre-setup wildfireHome directory -->
<property name="wildfireHome.preconfigured" value="false"/>
<property name="wildfireHome.no.plugins" value="false"/>
<mkdir dir="${target.wildfireHome}" />
<antcall target="-config">
<param name="config.dir" value="${target.wildfireHome}" />
</antcall>
<!-- Copy lib dir -->
<copy todir="${target.wildfireHome}/lib">
<fileset dir="${jar.dest.dir}" includes="*.*"></fileset>
</copy>
<!-- Overwrite config with build/wildfireHome dir, if requested -->
<if>
<equals arg1="${wildfireHome.preconfigured}" arg2="true"/>
<then>
<!-- Copy pre-configured wildfireHome dir -->
<copy todir="${target.wildfireHome}">
<fileset dir="${basedir}/build/wildfireHome" includes="**/*.*" />
</copy>
</then>
</if>
<!-- Copy admin Plugin --> <!-- Copy admin Plugin -->
<antcall target="adminPlugin"> <antcall target="adminPlugin">
<param name="plugin.dest.dir" value="${target.wildfireHome}/plugins" /> <param name="plugin.dest.dir" value="${target.wildfireHome}/plugins" />
</antcall> </antcall>
<!-- Copy compiled plugins if we need to -->
<if>
<equals arg1="${wildfireHome.no.plugins}" arg2="false"/>
<then>
<copy todir="${target.wildfireHome}/plugins" failonerror="false">
<fileset dir="${plugin.dest.dir}"/>
</copy>
</then>
</if>
<!-- Copy bin dir --> <!-- Copy bin dir -->
<copy todir="${target.wildfireHome}"> <copy todir="${target.wildfireHome}">
...@@ -786,7 +805,7 @@ ...@@ -786,7 +805,7 @@
<!-- Make & copy the search plugin. --> <!-- Make & copy the search plugin. -->
<copy todir="${release.out.dir}"> <copy todir="${release.out.dir}">
<fileset dir="${target.wildfireHome}"> <fileset dir="${target}">
<include name="plugins/search.jar"/> <include name="plugins/search.jar"/>
</fileset> </fileset>
</copy> </copy>
...@@ -794,6 +813,7 @@ ...@@ -794,6 +813,7 @@
<!-- Copy all prepare dirs to the binary dist --> <!-- Copy all prepare dirs to the binary dist -->
<antcall target="wildfireHome"> <antcall target="wildfireHome">
<param name="target.wildfireHome" value="${release.out.dir}"/> <param name="target.wildfireHome" value="${release.out.dir}"/>
<param name="wildfireHome.no.plugins" value="true"/>
</antcall> </antcall>
<!-- Remove the development scripts --> <!-- Remove the development scripts -->
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment