Previous versions of REM supported extensions by generating *-em.war extension archives and installing them directly into the main rem.war file. If you have developed one of these types of extensions, it is still supported, but it is also quite straight forward to convert it into a plugin.

To convert your extension into a plugin:


Open your extension’s and add:

plugin.version=<Version of your plugin>
plugin.description=<Short description of your plugin>

For example:

plugin.description=Example Element Manager Plugin


Open your extension’s build/compile.xml Ant build script in an editor and make the following changes.

-        <zip destfile="${artifacts}/">
+        <jar destfile="${artifacts}/example-em.em.jar">
             <fileset dir="${target}/war" includes="example/**"/>
             <fileset dir="${basedir}/war" includes="example.html"/>
             <zipfileset prefix="WEB-INF/lib" file="${jars}/example-em-server.jar"/>
-        </zip>
+            <manifest>
+                <attribute name="Short-Name" value="example"/>
+                <attribute name="Version" value="${plugin.version}"/>
+                <attribute name="Description" value="${plugin.description}"/>
+            </manifest>
+        </jar>

The Short-Name attribute value should match the name of your extension without the -em suffix.


Open your extension’s main ServletModule (for example, src/com/opencloud/rem/example/server/ and remove these lines:

        // Guice-enabled RemoteServiceServlet


Open your extension’s DevModeGuiceServletConfig (for example, src/com/opencloud/rem/example/dev/server/ and add an inline ServletModule like this:

        return Guice.createInjector(new ServletModule() {
            protected void configureServlets() {
        }, /* other modules as before */);

Your extension is now a REM Plugin.



If your main ServletModule doesn’t have any serve() or filter() calls left in it, then it can be changed into a simple Module.

  • rename it from * to *

  • instead of extending, change it to extend

  • change the configureServlets() method to configure().

  • edit your extension class (for example, src/com/opencloud/rem/example/server/ and move your module from getServletModule() to getOtherModules().

For example:

     public ServletModule getServletModule() {
-        return new ExampleServletModule();
+        return null;

     public Module[] getOtherModules() {
-        return new Module[] { };
+        return new Module[] { new ExampleModule() };
Previous page