You are viewing a plain text version of this content. The canonical link for it is here.
Posted to svn@forrest.apache.org by rg...@apache.org on 2004/10/30 01:14:33 UTC

svn commit: rev 56003 - in forrest/trunk/forrestcore: . src/core src/core/targets

Author: rgardler
Date: Fri Oct 29 16:14:32 2004
New Revision: 56003

Modified:
   forrest/trunk/forrestcore/build.xml
   forrest/trunk/forrestcore/src/core/forrest.build.xml
   forrest/trunk/forrestcore/src/core/targets/plugins.xml
Log:
Rebuild plugin sitemap each time forrest is run to prevent unnecessary plugin mounts (Fixes FOR-337)

Modified: forrest/trunk/forrestcore/build.xml
==============================================================================
--- forrest/trunk/forrestcore/build.xml	(original)
+++ forrest/trunk/forrestcore/build.xml	Fri Oct 29 16:14:32 2004
@@ -67,11 +67,7 @@
     </echo>
     
     <mkdir dir="${build.dir}"/>
-    
-    <mkdir dir="${plugins.dir}"/>
-    <copy file="src/core/var/initial_plugins_sitemap.xmap"
-      tofile="${plugins.dir}/sitemap.xmap"/>
-    
+        
     <path id="classpath">
       <fileset dir="lib" includes="**/*.jar"/>
       <fileset dir="${tools.dir}/jetty" includes="servlet*.jar"/>

Modified: forrest/trunk/forrestcore/src/core/forrest.build.xml
==============================================================================
--- forrest/trunk/forrestcore/src/core/forrest.build.xml	(original)
+++ forrest/trunk/forrestcore/src/core/forrest.build.xml	Fri Oct 29 16:14:32 2004
@@ -296,7 +296,7 @@
   </target>
 
   <!-- Sets up properties and filters -->
-  <target name="init" depends="init-props, init-skins, install-required-plugins">
+  <target name="init" depends="init-props, init-skins, init-plugins">
     <available property="xml-forrest.jar.exists" file="${forrest.build.lib-dir}/xml-forrest.jar"/>
     <fail unless="xml-forrest.jar.exists">You must build forrest before you can run it.  In ${forrest.root-dir} run './build.sh' (linux) or 'build' (windows)</fail>
   </target>

Modified: forrest/trunk/forrestcore/src/core/targets/plugins.xml
==============================================================================
--- forrest/trunk/forrestcore/src/core/targets/plugins.xml	(original)
+++ forrest/trunk/forrestcore/src/core/targets/plugins.xml	Fri Oct 29 16:14:32 2004
@@ -32,11 +32,7 @@
     <ant antfile="${project.temp-dir}/pluginlist2echobuild.xml"/>
       </sequential>
     </for>
-  </target>  
-          
-  <!-- private -->        
-                
-  <target name="init-plugins" depends="init-props, install-required-plugins"/>   
+  </target>   
 
   <target name="plugin-unavailable">   
     <property name="plugin.unavailable" value="true"/>
@@ -69,7 +65,7 @@
      </delete>
   </target>  
   
-  <target name="configure-plugin" if="plugin.unavailable">
+  <target name="configure-plugin">
      <!-- add the snippet to plugins/sitemap.xmap that will mount the plugin
           specific sitemap -->
      <xslt in="${forrest.plugins-dir}/sitemap.xmap"
@@ -78,8 +74,6 @@
        force="true">
            <param name="plugin-name" expression="${plugin.name}"/>  
      </xslt>
-     <move file="${forrest.plugins-dir}/sitemap.xmap" 
-       tofile="${forrest.plugins-dir}/sitemap.xmap.old"/>
      <move file="${forrest.plugins-dir}/sitemap.xmap.new" 
        tofile="${forrest.plugins-dir}/sitemap.xmap"/>
   </target>
@@ -122,13 +116,23 @@
     </for>
   </target>    
   
-  <target name="install-plugin" depends="check-plugin, fetch-plugin, unpack-plugin, configure-plugin"/>
+  <target name="install-plugin" depends="check-plugin, fetch-plugin, unpack-plugin"/>
   
-  <target name="install-required-plugins">
-    <for list="${project.required.plugins}" param="name">
+  <target name="init-plugins" depends="init-props"
+    description="ensure the required plugins are available locally, if any are not download them automatically">
+    
+    <mkdir dir="${forrest.plugins-dir}"/>
+    <copy file="${forrest.home}/var/initial_plugins_sitemap.xmap"
+      tofile="${forrest.plugins-dir}/sitemap.xmap"
+      overwrite="true"/>
+    
+      <for list="${project.required.plugins}" param="name">
       <sequential>
         <echo>Installing plugin: @{name}</echo>
         <antcall target="install-plugin">
+          <param name="plugin.name" value="@{name}"/>
+        </antcall>
+        <antcall target="configure-plugin">
           <param name="plugin.name" value="@{name}"/>
         </antcall>
       </sequential>