Google AppEngine application in Scala to parse links out of favorited tweets and send them to a bookmarking service.
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Twitter Favorites

The goal of this application is to periodically parse the favorited tweets of a Twitter user and extract URLs from the messages. Once the URLs are extracted they will be sent to a bookmarking service like Delicious and saved.



BDD Specs are written with the help of the specs library available on Google Code. The specs are executed as JUnit tests during Maven’s test phase. This means the Maven build outputs information about tests run, passed and failed rather than information about what how the specs are defined. To see the specs executed as JUnit tests execute the `mvn clean test` command from the command prompt.

In order to run the specs as specs first execute `mvn package` which will build the war file and a directory with the war contents. Once the package is built run a command similar to:

	scala -cp target/twitter-favorites-{version}/WEB-INF/lib/*:target/classes/:target/test-classes/:$M2_REPOSITORY/org/specs/specs/1.4.3/specs-1.4.3.jar:$M2_REPOSITORY/net/lag/configgy/1.2.1a/configgy-1.2.1a.jar {SpecificationObject}

In the above command {version} is replaced by the current version of the project as defined by the pom.xml and not by the appengine-web.xml, {SpecificationObject} is the full path of any object which extends org.specs.Specification, and $M2_REPOSITORY is an environment variable set to the root of the local Maven repository. On OSX $M2_REPOSITORY will probably be ~/.m2/repository but the tilde must be replaced with /Users/username.

With the above guidelines a full command may look like:

	scala -cp target/twitter-favorites-0.1-SNAPSHOT/WEB-INF/lib/*:target/classes/:target/test-classes/:$M2_REPOSITORY/org/specs/specs/1.4.3/specs-1.4.3.jar:$M2_REPOSITORY/net/lag/configgy/1.2.1a/configgy-1.2.1a.jar com.bryanjswift.twitterFavorites.TwitterUserSpecs


AppEngine jars

In order to build an Java AppEngine project with Maven (2.0.10) first the jars from the SDK need to be installed in the local repository. To do this first navigate to where the Java AppEngine SDK are located and then run the following four commands.

	mvn install:install-file -Dfile=lib/user/orm/ -DgroupId=org.datanucleus -DartifactId=datanucleus-appengine -Dpackaging=jar -DgeneratePom=true
	mvn install:install-file -Dfile=lib/user/appengine-api-1.0-sdk-1.2.0.jar -DartifactId=appengine-api-1.0-sdk -Dversion=1.2.0 -Dpackaging=jar -DgeneratePom=true
	mvn install:install-file -Dfile=lib/shared/appengine-local-runtime-shared.jar -DartifactId=appengine-local-runtime-shared -Dversion=1.2.0 -Dpackaging=jar -DgeneratePom=true
	mvn install:install-file -Dfile=lib/appengine-tools-api.jar -DartifactId=appengine-tools -Dversion=1.2.0 -Dpackaging=jar -DgeneratePom=true

Dispatch jar

There is an additional dependency on Databinder’s Dispatch library. This must be built from source the source at git clone git://

Dispatch uses simple-build-tool to build and package.

Once the dispatch jar is built install it and it’s configgy dependency into your local Maven repository with the following commands assuming you are in the dispatch root directory

	mvn install:install-file -Dfile=lib_managed/default/configgy-1.2.1a.jar -DgroupId=net.lag -DartifactId=configgy -Dversion=1.2.1a -Dpackaging=jar -DgeneratePom=true
	mvn install:install-file -Dfile=target/dispatch-0.1-SNAPSHOT.jar -DgroupId=net.databinder -DartifactId=dispatch -Dversion=0.1-SNAPSHOT -Dpackaging=jar -DgeneratePom=true

Scala jars

The Scala jars, including the specs library, should be located by Maven in the declared repositories in the pom.xml.