2 Replies Latest reply on Jul 30, 2014 1:36 PM by adam RSS
    coopers Newbie

    Packaging addtional JARs with extension

    So I'm building an extension that utilizes existing JAR files.  I do not know the proper build syntax to include additional Third Party JAR files in the extension file.  Can anyone point me in the right direction?

      • Packaging addtional JARs with extension
        vladimirros Creator

        Hi Cooper,

        I'm not sure if this is the right way, but in my ant build-extension.xml file, in the "package-extension" task, just below
        <zipfileset dir="${config.dir}" includes="metadata.xml" />
        I add
        <mappedresources>
                        <fileset dir=".\lib" includes="your.jar" />

                        &lt;globmapper from="" to="${package.lib.basedir}/common/"/&gt;
        </mappedresources>

        I repeated this for each jar.

        Then, in the metadata.xml required by the TW server to import the extension, you add in the <JarResources>
        one entry per jar, like this:
          <FileResource type="JAR" file="your.jar" description="" />

        This definitely works in my case, but please tell me if it worked in your case, as I am not very familiar with ant.

        BR,
        Vladimir

         



        • Packaging addtional JARs with extension
          adam Creator

          As usual, Vladimir is correct ; ) This is exactly what is required to reference third-party JAR files in a ThingWorx extension.