Author: rgardler
Date: Fri Mar 4 22:52:50 2011
New Revision: 1078196
URL: http://svn.apache.org/viewvc?rev=1078196&view=rev
Log:
Allow all widget variables to be defiend from the command line or config file
Modified:
incubator/wookie/trunk/widgets/build.xml
Modified: incubator/wookie/trunk/widgets/build.xml
URL:
http://svn.apache.org/viewvc/incubator/wookie/trunk/widgets/build.xml?rev=1078196&r1=1078195&r2=1078196&view=diff
==============================================================================
--- incubator/wookie/trunk/widgets/build.xml (original)
+++ incubator/wookie/trunk/widgets/build.xml Fri Mar 4 22:52:50 2011
@@ -24,7 +24,36 @@
<target name="_get-widget-name" unless="widget.shortname">
<input message="What is the short name of the widget you wish
to work with?"
addproperty="widget.shortname"/>
- <fail unless="widget.shortname" message="Property
widget.shortname has not been set"/>
+ </target>
+
+ <target name="_get-widget-type"
+ description="get the type of widget required from the user,
unless it has been supplied in the command line"
+ unless="widget.type">
+ <input message="What type of widget template do you want to
use?"
+ validargs="basic,wave,jqueryMobile"
+ defaultvalue="basic"
+ addproperty="widget.type"/>
+ </target>
+
+ <target name="_get-widget-description"
+ description="get the description from the user, unless it has
been supplied in the command line"
+ unless="widget.description">
+ <input message="Provide a brief description of the purpose of the
${widget.shortname} widget"
+ addproperty="widget.description"/>
+ </target>
+
+ <target name="_get-widget-height"
+ description="get the height of the widget from the user, unless
it has been supplied in the command line"
+ unless="widget.height">
+ <input message="What is the default height of the
${widget.shortname} widget?"
+ addproperty="widget.height"
+ defaultvalue="480"/>
+ </target>
+
+ <target name="_get-widget-width"
+ description="get the width of the widget from the user, unless
it has been supplied in the command line"
+ unless="widget.width">
+ <input message="What is the default width of the widget you
wish to create?" addproperty="widget.width" defaultvalue="320"/>
</target>
<target name="_validate">
@@ -40,12 +69,8 @@
</target>
- <target name="seed-widget" description="Seed a new widget">
- <input message="What type of widget template do you want to use?"
validargs="basic,wave,jqueryMobile" defaultvalue="basic"
addproperty="widget.type"/>
- <input message="What is the short name of the widget you wish to
create?" addproperty="widget.shortname"/>
- <input message="Provide a brief description of the purpose of the
${widget.shortname} widget" addproperty="widget.description"/>
- <input message="What is the default height of the ${widget.shortname}
widget?" addproperty="widget.height" defaultvalue="480"/>
- <input message="What is the default width of the widget you wish to
create?" addproperty="widget.width" defaultvalue="320"/>
+ <target name="seed-widget" description="Seed a new widget"
+ depends="_get-widget-type, _get-widget-name,
_get-widget-description, _get-widget-height, _get-widget-width">
<antcall target="_create-widget-from-template"/>
</target>