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 an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X

How to generate zip file from Eclipse ThingWorx extension?

arosse
4-Participant

How to generate zip file from Eclipse ThingWorx extension?

Hello,

I am trying to set up the Eclipse environment to be able to create ThingWorx extensions. I already installed Eclipse Java EE IDE for Web Developers, version: Oxygen.1a Release (4.7.1a). I use ThingWorx 6.5.20. I followed the video tutorial available at this link: https://www.youtube.com/watch?v=34g9tBotbsY&feature=youtu.be as well as the PDF guide for eclipse extensions available in the attached files.

For my first test, I would like to be able to export a file from Eclipse and import it in ThingWorx Composer as an extension. I chose to take an existing extension project (RadioButton) and to export it without modifying it. Thus, I will be able to have a clean project for my first test. As far as I understood, the export must be in a ZIP format. However, I can't manage to create it.

Following the video tutorial, I created the extension project using the parameters shown in the "Import Project RadioButton MyEclipse.png" file attached, with Gradle build and the latest Eclipse SDK. In the video tutorial, they are then able, by right-clicking on the project folder, to "Run as -> Gradle (STS) Build", as shown in the "Gradle STS Build Tutorial.png" attached file. In my Eclipse project, however, I don't have this option, as shown in the "Gradle STS Build MyEclipse.png" attached file. I tried to install the Gradle Build Eclipse plugin, shown in the "Installed softwares MyEclipse.png" attached file, but it did not help.

Does anybody know how to be able to perform Gradle STS Build ? Or maybe is there another way to generate the ZIP file from the Eclipse extension project?

Thanks,

Antoine

Ce message a été modifié par : Antoine Rosse

4 REPLIES 4
supandey
19-Tanzanite
(To:arosse)

Hi Antonie, depending what build platform you are using i.e. Gradle or Ant you'll need to navigate to the build.gradle file in your eclipse project right click it and run as gradle build (if building with Gradle) else run as ant build

I believe this covered in detail on page 52 of Extension Development Guide under the topic Building Extensions you can download this guide from the ThingWorx Marketplace - search for Eclipse Plugin for ThingWorx Extensions and refer to the Related Content.

Hope this'd help.

arosse
4-Participant
(To:arosse)

Hi Sushant, thanks a lot for your quick answer, the generation works fine.


However, I have a different problem now. When trying to import the ZIP in ThingWorx Composer, it fails because the minimum version required is 8.0.0, though I am using 6.5.20, which is understandable. I therefore downloaded the SDK for version 6.5.0, available on the marketplace on "Extension SDK -> Previous Versions". However, when choosing this SDK on the project creation in Eclipse, the minimum ThingWorx version is 8.0.0 (this field is not editable, it is generated automatically from the chosen SDK, see the image below).

New project minimum version.png

Does somebody know why this happen and how to fix it? Maybe I should download the SDK from another source?


Thanks,

Antoine

supandey
19-Tanzanite
(To:arosse)

Sorry for this inconvenience this is a known issue (see this discussion here ThingWorx Extension SDK old versions) and we are working on it to correct it. In the meantime if you want to download the older version of the SDK please download it from the PTC Software Download page

arosse
4-Participant
(To:arosse)

Thank you, it works that way.

An alternative solution is to modify the minimumThingWorxVersion attribute in the metadata.xml file in the Eclipse Package Explorer. The field is read-only when the project is created, but editable once the project created.

Top Tags