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

Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X

Packaging addtional JARs with extension

ptc-6607495
1-Visitor

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



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

Announcements


Top Tags