Manage an Analytics Application with IntelliJ IDEA

Use an IntelliJ IDEA Integrated Development Environment (IDE) to develop, package, deploy, undeploy, and synchronize your Oracle Internet of Things Cloud Service analytics applications. An IDE is an application that provides developers with the tools they need to write and test software. Most IDEs include a code editor, a compiler or interpreter, and a debugger that are accessed through a single graphical user interface (GUI).

These are the prerequisites for the successful completion of this procedure:
  • An active instance of Oracle Internet of Things Cloud Service with Analytics.

  • An active instance of IntelliJ IDEA Community Edition.

  • Java SE Development Kit 8 or newer.

  • A project file for your Oracle Internet of Things Cloud Service analytics application. Project files exported from Oracle Internet of Things Cloud Service include a Maven installation that lets you build, deploy, and synchronize your applications within IntelliJ IDEA Community Edition.

  1. If you have not created a project file for your Oracle Internet of Things Cloud Service analytics application, log on to your Oracle Internet of Things Cloud Service instance and then complete this procedure:
    1. Click Menu (Menu icon) and then click Applications.
    2. Click your application in the left pane, click Analytics, and then click IDE Support.
    3. Click Export Project for IDE.
    4. Click Save File, click OK, browse to a location to save the file, and then click Save.

      Note:

      Do not change the name of the compressed project file.
  2. Browse to the location of your compressed analytics application project file, extract the project file, and then confirm that the project contains a maven folder. If the folder was not created, repeat step 1.

    Note:

    Do not change the name of the project file.
  3. Open your instance of IntelliJ IDEA Community Edition.
  4. Create a new project:
    1. Click File, click New, click Project from Existing Sources, browse to the location of the project-ide-export folder, select it, and then click OK.
    2. Select Import project from external model, select Maven, and then click Next.
    3. Click Environment settings , in the Maven home directory list click Browse, browse to the location of the Maven folder, select it , and then click OK.
    4. Click OK to close the Maven environment dialog.
    5. Click Next and make sure Oracle is selected in the Select Profiles list, an then click Next.
    6. Accept the default selection in the Select Maven projects to import list and then click Next.
    7. Click Add (Add icon), select JDK, browse to the location of the JDK installation, select it, and then click OK.
    8. Click Next.
    9. Accept the default selections for the Project name and Project file location fields and then click Finish.
  5. Configure IntelliJ IDEA Community Edition to communicate with your Oracle Internet of Things Cloud Service instance:
    1. Click File and then Settings.
    2. Enter Maven in the search field and then press Enter.
    3. Select Runner in the left menu.
    4. Click Add (Add icon) in the Properties area.
    5. Enter iot.client.username in the Name field, enter the user name used to access your Oracle Internet of Things Cloud Service instance in the Value field, and then click OK.
    6. Click Add (Add icon) in the Properties area.
    7. Enter iot.client.password in the Name field, enter the password used to access your Oracle Internet of Things Cloud Service instance in the Value field, and then click OK.
    8. Click OK to close the Settings dialog.
  6. Synchronize IntelliJ IDEA Community Edition project changes with your Oracle Internet of Things Cloud Service instance:
    1. Click View, click Tool Windows, and then click Maven Projects.
    2. Expand the project folder in the Maven Projects pane, expand Plugins, and then expand iotanalytics.
    3. Right-click iotanalytics:sync and then select Run Maven Build.