Author: rgardler
Date: Tue Dec 4 21:15:26 2012
New Revision: 1417189
URL: http://svn.apache.org/viewvc?rev=1417189&view=rev
Log:
alloe deployment of expanded widgets
Modified:
wookie/trunk/widgets/build.xml
wookie/trunk/widgets/templates/build.xml
wookie/trunk/widgets/templates/readme.txt
wookie/trunk/widgets/templates/widgets_build.xml
Modified: wookie/trunk/widgets/build.xml
URL:
http://svn.apache.org/viewvc/wookie/trunk/widgets/build.xml?rev=1417189&r1=1417188&r2=1417189&view=diff
==============================================================================
--- wookie/trunk/widgets/build.xml (original)
+++ wookie/trunk/widgets/build.xml Tue Dec 4 21:15:26 2012
@@ -60,11 +60,12 @@
<input message="What is the default width of the widget you
wish to create?" addproperty="widget.width" defaultvalue="320"/>
</target>
- <target name="_clean">
+ <target name="_clean">
+ <delete dir="${widget.build.dir}" failonerror="false"/>
+ <mkdir dir="${widget.build.dir}"/>
</target>
<target name="_init" depends="_get-widget-name, _clean">
- <delete file="${widget.build.dir}/${widget.shortname}.wgt"
failonerror="false"/>
<mkdir dir="${widget.build.dir}"/>
</target>
@@ -109,11 +110,21 @@
<echo>Widget package created at
${widget.build.dir}/${widget.shortname}.wgt</echo>
</target>
- <target name="deploy-widget" depends="build-widget">
+ <target name="deploy-widget" depends="build-widget"
+ if="widget.deploy.compressed">
<copy tofile="${widget.deploy.dir}/${widget.shortname}.wgt"
file="${widget.build.dir}/${widget.shortname}.wgt"/>
- <echo>Deployed "${widget.shortname}" to
${widget.deploy.dir}/${widget.shortname}.wgt</echo>
+ <echo>Deployed "${widget.shortname}" in compressed form to
${widget.deploy.dir}/${widget.shortname}.wgt</echo>
</target>
+
+ <target name="deploy-expanded-widget" depends="build-widget"
+ if="widget.deploy.expanded">
+ <mkdir dir="${widget.deploy.dir}/${widget.shortname}"/>
+ <copy todir="${widget.deploy.dir}/${widget.shortname}">
+ <fileset dir="${widget.build.dir}/${widget.shortname}"/>
+ </copy>
+ <echo>Deployed "${widget.shortname}" in expanded form to
${widget.deploy.dir}/${widget.shortname}/</echo>
+ </target>
<target name="deploy-all" description="deploy all widgets in the base
directory">
<echo>Deploying widgets from ${wookie.widgets.dir}
Modified: wookie/trunk/widgets/templates/build.xml
URL:
http://svn.apache.org/viewvc/wookie/trunk/widgets/templates/build.xml?rev=1417189&r1=1417188&r2=1417189&view=diff
==============================================================================
--- wookie/trunk/widgets/templates/build.xml (original)
+++ wookie/trunk/widgets/templates/build.xml Tue Dec 4 21:15:26 2012
@@ -474,12 +474,12 @@
</target>
<target name="_generate_and_deploy_widget"
- description="Generates a widget from its template and then deploys
to a live server"
+ description="Generates a widget from its template and then deploys
it in compressed form (e.g. .wgt file)"
depends="_generate_widget">
<!-- Deploy the widget -->
- <antcall target="deploy-widget">
- <param name="widget.shortname" value="${widget.shortname}"/>
- </antcall>
+
+ <antcall target="deploy-widget" inheritAll="true"/>
+ <antcall target="deploy-expanded-widget" inheritAll="true"/>
</target>
<target name="_init_widget_generation">
@@ -496,4 +496,4 @@
<delete dir="${widget.build.dir}/${widget.shortname}"/>
</target>
-</project>
\ No newline at end of file
+</project>
Modified: wookie/trunk/widgets/templates/readme.txt
URL:
http://svn.apache.org/viewvc/wookie/trunk/widgets/templates/readme.txt?rev=1417189&r1=1417188&r2=1417189&view=diff
==============================================================================
--- wookie/trunk/widgets/templates/readme.txt (original)
+++ wookie/trunk/widgets/templates/readme.txt Tue Dec 4 21:15:26 2012
@@ -300,7 +300,22 @@ ensure that they all get built when call
created above.
*** Deploying to alternative locations
-By default
+You can change the location widgets are deployed to by setting the
+property "widget.deploy.dir" in the command line or in the widgets
+build.xml file.
+*** Deploying in compressed or expanded form
+By default widgets are deployed in compressed ".wgt" files
+only. However, if you want to deploy in uncompressed (expanded) format
+you can do so by setting the propery "widget.deploy.expanded" in the
+command line or in the widgets build.xml file.
+
+To supress deployment in compressed form it is not quite so easy. You
+must first override the widgets_build.xml file (see "Your own widgets
+directories" above). In this file you will need to comment out the following
line:
+
+ <property name="widget.deploy.compressed" value="true"/>
+
+
* Building templatised widgets
To build and deploy the widgets run "ant generate-all-widgets" from
Modified: wookie/trunk/widgets/templates/widgets_build.xml
URL:
http://svn.apache.org/viewvc/wookie/trunk/widgets/templates/widgets_build.xml?rev=1417189&r1=1417188&r2=1417189&view=diff
==============================================================================
--- wookie/trunk/widgets/templates/widgets_build.xml (original)
+++ wookie/trunk/widgets/templates/widgets_build.xml Tue Dec 4 21:15:26 2012
@@ -17,7 +17,6 @@
-->
<!--
-
This is a template file for widget build directories that exist outside of
the Wookie directory. It is useful for managing widgets in your own projects.
@@ -26,7 +25,12 @@ the Wookie directory. It is useful for m
<!-- Edit the value of wookie.root.dir so that it points to your Wookie
install -->
<property name="wookie.root.dir" location="../../../"/>
+ <!-- Uncomment this line if you want to deploy widgets in expanded form -->
+ <!-- <property name="widget.deploy.expanded" value="true"/> -->
+ <!-- Comment this line if you do not want to deploy widgets in compressed
form -->
+ <property name="widget.deploy.compressed" value="true"/>
+ <property name="project.build.dir" location="build"/>
<property name="widget.deploy.dir"
location="${project.build.dir}/webapp/wookie/deploy"/>
<property name="default.widget.definitions.dir" location="."/>
<property name="wookie.template.dir"
location="${wookie.root.dir}/widgets/templates"/>