-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
58 lines (45 loc) · 2.17 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
Google Wave Robot Sample
What is This
============
This is a sample program to demonstrate How-To implement googlewave Robot
in scala/Liftweb. This program is using Liftweb, but you will find that
the usage of Liftweb is not essential. You will be able to apply this sample to
your favorite scala based Web Application Framework very easily.
Please refer to src/main/webapp/WEB-INF/web.xml
How to Try
==========
1. At present time, Googleweb has expected that robots run on GAE/J.
So, you have to register your own application name at http://www.appspot.com/ .
Suppose that you have registered it as "my-robot" through this How-To.
This name will be used to refer to the name of your robot; my-robot@appspot.com
2. Replace "????" with "my-robot" in src/main/webapp/WEB-INF/appengine-web.xml .
3. The included pom.xml expects that wave-robot-api-*.jar is stored in the repository.
1.1 Download that jar file from its download site[1],
1.2 Install that file into your repository with following command,
mvn install:install-file \
-Dfile=wave-robot-api-20090916.jar \
-DgroupId=com.google.wave \
-DartifactId=wave-robot-api \
-Dversion=20090916 \
-Dpackaging=jar \
-DgeneratePom=true
4. Build the package
$ mvn package
5. Deploy it!
appcfg.sh update target/googlewave-robot-sample-1.0-SNAPSHOT
6. Add user 'my-robot@appspot.com' to your wave.
This sample robot will just reply to messages from participants like a parrot.
Further References
==================
Please refer to following files,
* src/main/webapp/WEB-INF/appengine-web.xml
* src/main/webapp/WEB-INF/web.xml
* src/main/scala/bootstrap/liftweb/Boot.scala
You will find that the paths /_wave/* have been ignored in Liftweb.
* src/main/webapp/_wave/capabilities.xml
* src/main/scala/com/jcraft/wave_bot/servlet/MyRobotServlet.scala
MyRobotServlet will handle googlewave Robot API events.
* src/main/scala/com/jcraft/wave_bot/snippet/Wavelet.scala
Demonstrating to use Googlewave Robot APIs within Liftweb.
This snippet will be invoked in /index.html
[1] http://code.google.com/p/wave-robot-java-client/downloads/list