You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wookie.apache.org by rg...@apache.org on 2011/09/26 22:27:52 UTC
svn commit: r1176030 -
/incubator/wookie/site/trunk/content/wookie/docs/widgets.mdtext
Author: rgardler
Date: Mon Sep 26 20:27:52 2011
New Revision: 1176030
URL: http://svn.apache.org/viewvc?rev=1176030&view=rev
Log:
Describe how to manage widgets outside of the wookie tree
Modified:
incubator/wookie/site/trunk/content/wookie/docs/widgets.mdtext
Modified: incubator/wookie/site/trunk/content/wookie/docs/widgets.mdtext
URL: http://svn.apache.org/viewvc/incubator/wookie/site/trunk/content/wookie/docs/widgets.mdtext?rev=1176030&r1=1176029&r2=1176030&view=diff
==============================================================================
--- incubator/wookie/site/trunk/content/wookie/docs/widgets.mdtext (original)
+++ incubator/wookie/site/trunk/content/wookie/docs/widgets.mdtext Mon Sep 26 20:27:52 2011
@@ -16,12 +16,16 @@ Notice: Licensed to the Apache Softwa
specific language governing permissions and limitations
under the License.
-This page contains some notes and guidance on how to build widgets that can be hosted in the Wookie Server.
+This page contains some notes and guidance on how to build widgets
+that can be hosted in the Wookie Server.
#Tutorials
-You will probably want to look at the tutorial found in h[ttp://svn.apache.org/repos/asf/incubator/wookie/trunk/tutorials/][1]
+You will probably want to look at the tutorial found in
+[http://svn.apache.org/repos/asf/incubator/wookie/trunk/tutorials/][1]
-More specifically the slides in [this open office presentation][2] will walk you through the creation of your first widget.
+More specifically the slides in [this open office
+presentation][2] will walk you through the creation
+of your first widget.
#Widget source directory
@@ -29,21 +33,40 @@ For ease of development you will probabl
version of Wookie as this provides a number of tools for working with Widgets.
This is not required, but this document assumes this to be the case.
-If you have checked out the source from SVN then you will be working in
-"trunk/widgets/WIDGET_NAME", where WIDGET_NAME is the name of the widget
-being developed. If you have downloaded a source release then you will work in
-the "/widgets" directory.
+## Working directory
-This directory contains widget sourcecode and build files.
-
-In the examples below we use "$WOOKIE_HOME" to indicate the directory you are
-using. There is no requirement to set this environment variable, but you
+You can get started right away from within the Wookie source
+directory. However, if you are not planning on submitting
+your widget code to the Apache Wookie project then you might
+want to work in your own directory. The following two sections
+describe how to work with either of these scenarios.
+
+## Wookie widget directories
+
+There are two widget directories for you to work in within the Wookie source. The
+first is intended for widgets that will go into production
+and is located at "/widgets". The second is for
+experimental or in-development widgets and can be found in
+"/scratchpad/widgets".
+
+## Own project directories
+
+If you want to work within your own widgets directory you
+must first setup your environment as follows.
+
+ 1. Create your chosen widget directory
+ 1. Copy "/widgets/build_template.xml" to your widget directory as "build.xml"
+ 1. Edit the value of the "wookie.root.dir" property so that it reflects the location of your wookie source directory
+
+In the examples below we use "$WIDGETS_HOME" to indicate the directory you are
+using and $WOOKIE_HOME to indicate the root directory of your
+Wookie sources. There is no requirement to set these environment variables, but you
might find it useful to do so.
#Create a widget
To create a widget:
- cd $WOOKIE_HOME/widgets
+ cd $WIDGETS_HOME
ant seed-widget
This is an interactive target that will ask you a number of questions
@@ -60,17 +83,22 @@ resource and javascript files.
#Build a Widget
- cd $WOOKIE_HOME
ant build-widget
-You will be asked the name of te widget to build. After a succesful build your widget package will be created in the /build/widgets directory.
+You will be asked the name of the widget to buildunless
+you set it with the -Dwidget.shortname property as described
+below.
+
+After a succesful build your widget package will be
+created in the /build/widgets directory.
#Deploy a widget
- cd $WOOKIE_HOME
ant deploy-widget
-You will be asked the name of the widget to deploy.
+You will be asked the name of the widget to deploy unless
+you set it with the -Dwidget.shortname property as described
+below.
Your widget will be hot deployed and you can use it immediately
(note the server must have hot deploy turned on for it to see the new widget).