forrest-svn mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rgard...@apache.org
Subject svn commit: r170571 - /forrest/trunk/plugins/build.xml
Date Tue, 17 May 2005 11:30:38 GMT
Author: rgardler
Date: Tue May 17 04:30:38 2005
New Revision: 170571

URL: http://svn.apache.org/viewcvs?rev=170571&view=rev
Log:
re-commit changes to publish docs when a plugin is deployed (something went wrong previously)

Modified:
    forrest/trunk/plugins/build.xml

Modified: forrest/trunk/plugins/build.xml
URL: http://svn.apache.org/viewcvs/forrest/trunk/plugins/build.xml?rev=170571&r1=170570&r2=170571&view=diff
==============================================================================
--- forrest/trunk/plugins/build.xml (original)
+++ forrest/trunk/plugins/build.xml Tue May 17 04:30:38 2005
@@ -17,30 +17,39 @@
 -->
 <project default="local-deploy" basedir="." name="Forrest_Plugins_build_file">
   <property environment="env"/>
-  <property name="forrest.home"               location="${env.FORREST_HOME}"/>   
-  <property name="forrest.core"               location="${env.FORREST_HOME}/main" />
 
-  <property name="forrest.ant.lib.dir"        location="${forrest.home}/tools/ant/lib"/>
 
-  <property name="forrest.build.dir"          location="${forrest.home}/build"/>
-  <property name="forrest.plugins.dir"        location="${forrest.home}/plugins"/>
-  
-  <property name="plugins.dir"                location="${ant.file.Forrest_Plugins_build_file}/.."/>
-  <property name="plugins.dist-dir"           location="build/dist"/>
-  <property name="plugins.localDeploy-dir"    location="${forrest.build.dir}/plugins"/>
+  <property name="forrest.version"					  value="0.7"/>
+  <property name="forrest.home"                       location="${env.FORREST_HOME}"/>
  
+  <property name="forrest.core"                       location="${env.FORREST_HOME}/main"
/>  
+  <property name="forrest.ant.lib.dir"                location="${forrest.home}/tools/ant/lib"/>
 
+  <property name="forrest.build.dir"                  location="${forrest.home}/build"/>
+  <property name="forrest.plugins.dir"                location="${forrest.home}/plugins"/>
+  <property name="forrest.plugins.build.dir"          location="${forrest.home}/plugins/build"/>
+  <property name="forrest.plugins.dist.dir"           location="${forrest.plugins.build.dir}/dist"/>
+  <property name="forrest.plugins.template.dir"       location="${forrest.plugins.dir}/pluginTemplate"/>

+  <property name="forrest.plugins.localDeploy.dir"    location="${forrest.build.dir}/plugins"/>
+  <property name="forrest.plugins.descriptor.file"    location="${forrest.plugins.dir}/plugins.xml"/>
   
+  <!-- the plugin config (i.e. applies to current plugin) -->
   <property name="plugin.src.dir"             value="src"/>
+  <property name="plugin.java.dir"            value="${plugin.src.dir}/java"/>	
+  <property name="plugin.lib.dir"             value="lib"/>
   <property name="plugin.resources.dir"       value="resources"/>
   <property name="plugin.stylesheets.dir"     value="${plugin.resources.dir}/stylesheets"/>
   
-  <property name="plugin.template.dir"        value="${forrest.plugins.dir}/pluginTemplate"/>
-  
   <property name="deploy.svn.user"            value=""/>
   <property name="deploy.svn.password"        value=""/>
-  <property name="deploy.svn.url"             value="https://svn.apache.org/repos/asf/forrest/site/plugins"/>
-  <property name="deploy.svn.svn-dir"         location="${forrest.build.dir}/svn-plugins-deploy"/>
-  <property name="deploy.svn.svn-filestoadd"  location="build/svn-deploy.toadd"/>
+  <property name="deploy.plugins.svn.url"     value="https://svn.apache.org/repos/asf/forrest/site/plugins"/>
+  <property name="deploy.plugin.docs.svn.url" value="https://svn.apache.org/repos/asf/forrest/site/${forrest.version}/docs/plugins"/>
+  <property name="deploy.plugins.svn-dir"     location="${forrest.build.dir}/svn-plugins-deploy"/>
+  <property name="deploy.docs.svn-dir"        location="${forrest.build.dir}/svn-plugin-docs-deploy"/>
+  <property name="deploy.plugins.svn-filestoadd"  location="build/svn-plugin.deploy.toadd"/>
+  <property name="deploy.docs.svn-filestoadd"  location="build/svn-docs.deploy.toadd"/>
+  <property name="deploy.plugins.sandbox.dir" location="${deploy.plugins.svn-dir}"/>
+  <property name="deploy.docs.sandbox.dir"    location="${deploy.docs.svn-dir}"/>
   
   <property name="build.dir"                  location="build"/>
   <property name="build.classes"              location="${build.dir}/classes"/>
+  <property name="build.docs"                 location="${build.dir}/site"/>
     
   <taskdef resource="net/sf/antcontrib/antcontrib.properties">
     <classpath>
@@ -94,17 +103,17 @@
     
     <path id="classpath">
       <fileset dir="${forrest.home}/lib" includes="**/*.jar"/>
-      <fileset dir="lib" includes="*.jar"/>
-      <fileset dir="lib" includes="*.zip"/>
+      <fileset dir="${plugin.lib.dir}" includes="*.jar"/>
+      <fileset dir="${plugin.lib.dir}" includes="*.zip"/>
     </path>
   	
-    <available file="${java.dir}" property="java_exists" type="dir"/>
+    <available file="${plugin.java.dir}" property="java_exists" type="dir"/>
     
   </target>
   
   <target name="clean" depends="init">
-    <delete dir="${plugins.localDeploy-dir}/${plugin-name}"/>
-    <delete dir="${plugins.dist-dir}"/>
+    <delete dir="${forrest.plugins.localDeploy.dir}/${plugin-name}"/>
+    <delete dir="${forrest.plugins.dist.dir}"/>
   </target>
   
   
@@ -115,35 +124,40 @@
           
     <echo>Locally deploying ${plugin-name}</echo>
     
-    <copy toDir="${plugins.localDeploy-dir}/${plugin-name}">
-      <fileset dir="${plugins.dir}/${plugin-name}">
+    <copy toDir="${forrest.plugins.localDeploy.dir}/${plugin-name}">
+      <fileset dir="${forrest.plugins.dir}/${plugin-name}">
+        <exclude name="lib/**"/>
         <exclude name="build/**"/>
       </fileset>
     </copy>
+  	<copy toFile="${forrest.plugins.localDeploy.dir}/lib/${plugin-name}.jar"
+  	      file="${build.dir}/${plugin-name}.jar"
+  	      failonerror="false"/>
 
-    <copy toFile="${plugins.localDeploy-dir}/lib/${plugin-name}.jar"
-       file="${build.dir}/${plugin-name}.jar"
-       failonerror="false"/>
-
-    <!-- add to the entity catalog -->
-    <copy file="${forrest.core}/var/initial_catalog.xcat"
-       tofile="${plugins.localDeploy-dir}/catalog.xcat"
-       overwrite="false"/>
-    <if>
-      <available file="${plugins.localDeploy-dir}/${plugin-name}/resources/schema/catalog.xcat"/>
-      <then>
-        <xslt in="${plugins.localDeploy-dir}/catalog.xcat"
-            out="${plugins.localDeploy-dir}/catalog.xcat.new"
-            style="${forrest.core}/var/catalogMountSnippet.xsl"
-            force="true">
-          <param name="plugin-catalog-path"
-            expression="${plugin-name}/resources/schema/catalog.xcat"/>
-        </xslt>
-        <move file="${plugins.localDeploy-dir}/catalog.xcat.new"
-          tofile="${plugins.localDeploy-dir}/catalog.xcat"/>
-      </then>
-    </if>
-
+     <!-- add to the entity catalog -->
+     <copy file="${forrest.core}/var/initial_catalog.xcat"
+        tofile="${forrest.plugins.localDeploy.dir}/catalog.xcat"
+        overwrite="false"/>
+     <if>
+       <available file="${forrest.plugins.localDeploy.dir}/${plugin-name}/resources/schema/catalog.xcat"/>
+       <then>
+         <xslt in="${forrest.plugins.localDeploy.dir}/catalog.xcat"
+             out="${forrest.plugins.localDeploy.dir}/catalog.xcat.new"
+             style="${forrest.core}/var/catalogMountSnippet.xsl"
+             force="true">
+           <param name="plugin-catalog-path"
+             expression="${plugin-name}/resources/schema/catalog.xcat"/>
+         </xslt>
+         <move file="${forrest.plugins.localDeploy.dir}/catalog.xcat.new"
+           tofile="${forrest.plugins.localDeploy.dir}/catalog.xcat"/>
+       </then>
+     </if>
+            
+  	<copy toDir="${forrest.plugins.localDeploy.dir}/lib"
+      failonerror="false">
+  	    <fileset dir="lib"/>
+    </copy>
+    
     <antcall target="build"/>
   </target>
   
@@ -152,14 +166,16 @@
   
   <target name="deploy-plugins.xml"
           description="Deployes the plugins descriptor file (plugins.xml) to the website
SVN repository"
-          depends="checkout-deployed">
-    <copy todir="${deploy.svn.svn-dir}" 
+          depends="checkout-deployed-plugins">
+  	
+    <copy todir="${deploy.plugins.svn-dir}" 
           overwrite="true"
-          file="${forrest.plugins.dir}/plugins.xml"/>
+          file="${forrest.plugins.descriptor.file}"/>
+  	
     <!-- check in to SVN -->
     <svncommit
-        target="${deploy.svn.svn-dir}"
-        repositoryurl="${deploy.svn.url}"
+        target="${deploy.plugins.svn-dir}"
+        repositoryurl="${deploy.plugins.svn.url}"
         commitmessage="Deployment plugins descriptor file plugins.xml (deployed by 'deploy-plugins.xml'
target of plugin build script)"
     />
   </target>
@@ -211,51 +227,62 @@
           
   <target name="deploy"
           description="Deploy the plugin to SVN"
-          depends="dist, checkout-deployed, deploy-plugins.xml">
+          depends="clean, deploy-plugins.xml, deploy-docs, dist, checkout-deployed-plugins">
     <echo>Deploying ${plugin-name} to the web server</echo>
-  	    
-    <!-- copy new files into sandbox -->
-    <copy todir="${deploy.svn.svn-dir}" 
+	
+    <!-- copy new plugin files into sandbox -->
+    <copy todir="${deploy.plugins.svn-dir}" 
           overwrite="true" 
-          file="${plugins.dist-dir}/${plugin-name}.zip"/>
+          file="${forrest.plugins.dist.dir}/${plugin-name}.zip"/>
      
     <!-- add new files to SVN -->
     <!-- svnadd doesn't work (it doesn't change the working directory properly) -->
-    <exec executable="svn" dir="${deploy.svn.svn-dir}" output="${deploy.svn.svn-filestoadd}"
failonerror="true">
+    <exec executable="svn" dir="${deploy.plugins.svn-dir}" output="${deploy.plugins.svn-filestoadd}"
failonerror="true">
       <arg value="status"/>
     </exec>
     <!-- the status columns make all lines invalid filenames
       we remove the status columns for the new files so the only valid
       filenames in the list are new files
     -->
-    <replace file="${deploy.svn.svn-filestoadd}" token="?      " value=""/>
-    <replace file="${deploy.svn.svn-filestoadd}" token="M      " value=""/>
+    <replace file="${deploy.plugins.svn-filestoadd}" token="?      " value=""/>
+    <replace file="${deploy.plugins.svn-filestoadd}" token="M      " value=""/>
     <!-- don't fail on error here because
       1) the targets file might have 'bad' filenames but we should continue
       2) we would've already failed if the svn executable wasn't found
     -->
-    <exec executable="svn" dir="${deploy.svn.svn-dir}">
+    <exec executable="svn" dir="${deploy.plugins.svn-dir}">
       <arg value="add"/>
       <arg value="--targets"/>
-      <arg value="${deploy.svn.svn-filestoadd}"/>
+      <arg value="${deploy.plugins.svn-filestoadd}"/>
     </exec>
-    
     <!-- check in to SVN -->
     <svncommit
-        target="${deploy.svn.svn-dir}"
-        repositoryurl="${deploy.svn.url}"
+        target="${deploy.plugins.svn-dir}"
+        repositoryurl="${deploy.plugins.svn.url}"
         commitmessage="Deployment of ${plugin-name} plugin (deployed by 'deploy' target of
plugin build script)"
     />
   </target>
+	   
+  <target name="checkout-deployed-docs" 
+	      description="Retrieve the currently deployed plugin files">    
+	<!-- get current plugins directory from SVN -->
+    <svncheckout
+        repositoryurl="${deploy.plugin.docs.svn.url}"
+        username="${deploy.svn.user}"
+        password="${deploy.svn.password}"
+        destination="${deploy.docs.svn-dir}"
+        failonerror="true"
+    />
+  </target>
    
-  <target name="checkout-deployed" 
+  <target name="checkout-deployed-plugins" 
 	      description="Retrieve the currently deployed plugin files">    
 	<!-- get current plugins directory from SVN -->
     <svncheckout
-        repositoryurl="${deploy.svn.url}"
+        repositoryurl="${deploy.plugins.svn.url}"
         username="${deploy.svn.user}"
         password="${deploy.svn.password}"
-        destination="${deploy.svn.svn-dir}"
+        destination="${deploy.plugins.svn-dir}"
         failonerror="true"
     />
   </target>
@@ -267,13 +294,13 @@
     </ant>    
   </target>
   
-  <!-- FIXME: needs to append FOrrest version number to filename -->
+  <!-- FIXME: needs to append plugin version number to filename -->
   <target name="dist"
           description="Build the distribution archive for all the plugins"
-          depends="init, test, docs">
-    <mkdir dir="${plugins.dist-dir}"/>  
-    <zip destfile="${plugins.dist-dir}/${plugin-name}.zip"
-       basedir="${plugins.dir}/${plugin-name}"
+          depends="init">
+    <mkdir dir="${forrest.plugins.dist.dir}"/>  
+    <zip destfile="${forrest.plugins.dist.dir}/${plugin-name}.zip"
+       basedir="${forrest.plugins.dir}/${plugin-name}"
        includes="**"
        excludes="**/build/**"/>
   </target>
@@ -287,7 +314,7 @@
     <mkdir dir="${plugin-name}/${plugin.stylesheets.dir}"/>
     <copy todir="${plugin-name}"
           filtering="true">
-      <fileset dir="${plugin.template.dir}"/>
+      <fileset dir="${forrest.plugins.template.dir}"/>
       <filterset>
         <filter token="plugin-name" value="${plugin-name}"/>
       </filterset>
@@ -305,7 +332,7 @@
   <!-- =================================================================== -->
   <target name="compile" depends="init" if="java_exists">
     <mkdir dir="${build.classes}"/>
-    <javac srcdir=   "${java.dir}"
+    <javac srcdir=   "${plugin.java.dir}"
       destdir=       "${build.classes}"
       debug=         "${build.compiler.debug}"
       optimize=      "${build.compiler.optimize}"
@@ -315,7 +342,7 @@
     </javac>
   	
   	<copy todir="${build.classes}">
-  		<fileset dir="${java.dir}">
+  		<fileset dir="${plugin.java.dir}">
   			<exclude name="**/*.java"/>
 		</fileset>
   	</copy>



Mime
View raw message