This is the Java steps on how to build and run Apache Shindig.
In order to build Apache Shindig, you must have the following:
Create a subdirectory and checkout the Apache Shindig code from its Subversion repository
mkdir ~/src/shindig (or wherever you'd like to put it)cd ~/src/shindigsvn co http://svn.apache.org/repos/asf/incubator/shindig/trunk/
.To build a Web Archive (WAR) file for the Gadget server and run tests, perform the following:
cd ~/src/shindig/mvnTo run the code and start a Jetty server that will run on at localhost:8080:
mvn -PrunTo run the Jetty server on a different port, use:
cd java/servermvn clean install jetty:run
-DrunType=<full|gadgets|social>
-Djetty.port=<port>Once you've either installed the WAR file on your JEE server, or are running locally using the Jetty server, you can test the Gadget server using:

These steps, after completing the previous section, will allow you to build from within Eclipse using the Maven2 plugin. You should first install the Maven plugin, then create the new Java project.
~/.m2/settings.xml consisting solely of<settings> </settings>
http://m2eclipse.sonatype.org/update/~/eclipse/workspaces/shindig
would work fine.../src/shindig/javaMaven : Enable Dependency
ManagementMaven : Update Source
FoldersMaven : Download
Sources and Eclipse will automatically know about these
sources when debugging. You can browse them under Maven
Dependencies in your project.SHINDIG/gadgets/src/test/javaOutput Folder: (Default Output Folder)
and click Edit...Specific Output Foldertarget/test-classes and click OK.SHINDIG/social-api/src/test/javaTo generate code coverage statistics inside of Eclipse, install the EclEmma plugin. Then
org.apache.shindig.gadgets.AllTestsCoverage as -> JUnit
TestTo debug the server in Eclipse, follow the last two steps here (takes a few minutes to set up):
Note: You must have set up Eclipse to build the code or do mvn
package yourself after making changes, but you won't need to restart
Jetty to see your changes.
Caja is an important part of OpenSocial that greatly enhances JavaScript security. Caja is managed in a separate open source project hosted by Google code projects. For more information on Caja, see: http://code.google.com/p/google-caja/wiki/CajaEasyIntro
To see the cajoled code (Firefox only), right-click inside the iframe and do "This Frame -> View Frame Source"
Read java/README for original instructions on how to start up any of the java shindig servers.
Read javascript/README for instructions for using the Apache Shindig Gadget Container JavaScript to enable your page to render Gadgets using gmodules.com or a server started up as described above.