Author: rgardler
Date: Sat Mar 26 01:56:20 2011
New Revision: 1085627

URL: http://svn.apache.org/viewvc?rev=1085627&view=rev
Log:
Add a deploy-all target, it deploys all widgets in the directory if is run from

Also tidy up widget related properties and remove an old, unused propertu from 
build.xml

Modified:
    incubator/wookie/trunk/build.properties
    incubator/wookie/trunk/widgets/build.xml

Modified: incubator/wookie/trunk/build.properties
URL: 
http://svn.apache.org/viewvc/incubator/wookie/trunk/build.properties?rev=1085627&r1=1085626&r2=1085627&view=diff
==============================================================================
--- incubator/wookie/trunk/build.properties (original)
+++ incubator/wookie/trunk/build.properties Sat Mar 26 01:56:20 2011
@@ -8,15 +8,6 @@ wookie.domain=localhost
 wookie.port=8080
 wookie.path=wookie/
 
-# Widgets to deploy
-# This is an ant include file that will filter the directories in the widgets 
src folder
-# any widgets that match this filter will be deployed at runtime in the 
standalone server 
-widget.deploy.include=*/build.xml
-
-# The location of the wookie deployment directory, (required: defaults to 
location for
-# standalone server)
-widget.deploy.dir=build/webapp/wookie/deploy
-
 # The location of your servlets webapp directory, (required: defaults to 
location for
 # standalone server)
 servletEngine.webapp.dir=build/webapp
@@ -67,9 +58,17 @@ wookie.connector.dir=connector
 # Wookie W3c Parser properties
 wookie.parser.w3c.dir=parser
 
+#
 # Widget handling properties
-wookie.widgets.dir=widgets
+#
+# These are ant exclude and include pattern will filter the directories in the 
widgets src folder
+# any widgets that match this filter will be deployed at runtime in the 
standalone server 
+# or when "ant deploy-all" is run from any widget directory
+widget.deploy.include=*/build.xml
 widget.deploy.exclude=widget-template/build.xml
+# The location of the wookie deployment directory, (required: defaults to 
location for
+# standalone server)
+widget.deploy.dir=build/webapp/wookie/deploy
 
 # Feature handling properties
 wookie.features.dir=features

Modified: incubator/wookie/trunk/widgets/build.xml
URL: 
http://svn.apache.org/viewvc/incubator/wookie/trunk/widgets/build.xml?rev=1085627&r1=1085626&r2=1085627&view=diff
==============================================================================
--- incubator/wookie/trunk/widgets/build.xml (original)
+++ incubator/wookie/trunk/widgets/build.xml Sat Mar 26 01:56:20 2011
@@ -16,6 +16,9 @@
   limitations under the License.
 -->
 <project default="build-widget" basedir="." name="Wookie_widgets_build_file">
+       <property name="wookie_root_dir" location="../"/>
+       <property file="../local.build.properties"/>
+    <property file="../build.properties"/>
        <property name="project.build.dir" location="../build"/>
        <property name="widget.deploy.dir" 
location="${project.build.dir}/webapp/wookie/deploy"/>
        <property name="wookie.widgets.dir" location="."/>
@@ -90,7 +93,6 @@
     </target>   
        
        <target name="build-test-widget" description="Build a test widget that 
uses sensible settings. This is used when developing the widget template 
scripts.">
-               <property name="deployToDev" value="true"/>
                <property name="widget.type" value="basic"/>
                <property name="widget.shortname" value="TemplateTest"/>
                <property name="widget.description" value="A widget built from 
the standard widget template and using sensible default options for all 
configuration settings. This is used during development of the widget 
template"/>
@@ -108,8 +110,20 @@
     </target>
        
        <target name="deploy-widget" depends="build-widget">
-               <copy tofile="${widget.deploy.dir}/${widget.shortname}.wgt" 
+               <copy 
tofile="${wookie.root.dir}/${widget.deploy.dir}/${widget.shortname}.wgt" 
                          file="${widget.build.dir}/${widget.shortname}.wgt"/>
-               <echo>Deployed ${widget.shortname} to 
${widget.deploy.dir}/${widget.deploy.dir}/${widget.shortname}.wgt</echo>
+               <echo>Deployed ${wookie.root.dir}/${widget.shortname} to 
${widget.deploy.dir}/${widget.deploy.dir}/${widget.shortname}.wgt</echo>
+       </target>
+       
+       <target name="deploy-all" description="deploy all widgets in the base 
directory">
+       <echo>Deploying widgets from  ${wookie.widgets.dir}
+include: ${widget.deploy.include}
+exclude: ${widget.deploy.exclude}</echo>
+       <subant antfile="build.xml" target="deploy-widget" inheritall="true">
+         <fileset dir="${wookie.widgets.dir}">
+           <include name="${widget.deploy.include}"/>
+           <exclude name="${widget.deploy.exclude}"/>
+         </fileset>
+       </subant>
        </target>
 </project>


Reply via email to