4 Replies Latest reply on Oct 25, 2017 8:51 AM by arosse RSS
    arosse Newbie

    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

      • Re: How to generate zip file from Eclipse ThingWorx extension?
        supandey Collaborator

        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.

        • Re: How to generate zip file from Eclipse ThingWorx extension?
          arosse Newbie

          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

          • Re: How to generate zip file from Eclipse ThingWorx extension?
            arosse Newbie

            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.