cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X

Packaging addtional JARs with extension

ptc-6607495
1-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?

2 REPLIES 2

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



adam11
5-Regular Member
(To:ptc-6607495)

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

Top Tags