To include third-party libraries with your plugin:


Copy your additional third-party libraries into the libs/war folder located in the root of your REM SDK.


Edit build/compile.xml in your plugin; add a new zipfileset in the jar packaging step; and add an include for each of the jars you want bundled with your plugin.

For example:

    <target name="package" depends="gwtc,compile">
        <jar destfile="${jars}/prototype-em-server.jar">
            <fileset dir="${classes}">
                <exclude name="com/opencloud/rem/prototype/dev/**"/>
        <jar destfile="${artifacts}/prototype-em.em.jar">
            <fileset dir="${target}/war" includes="prototype/**"/>
            <fileset dir="${basedir}/war" includes="prototype.html"/>
            <zipfileset prefix="WEB-INF/lib" file="${jars}/prototype-em-server.jar"/>
            <!-- Include additional third-party libraries -->
            <zipfileset prefix="WEB-INF/lib" dir="${libs}/war">
                <include name="name-of-third-party-library.jar"/>
                <attribute name="Short-Name" value="prototype"/>
                <attribute name="Version" value="${plugin.version}"/>
                <attribute name="Description" value="${plugin.description}"/>

If your plugin needs a different version of a library already provided by REM, you will need to use the plugin-first class loader in addition to the above.

Previous page Next page