Wednesday, May 31, 2017

Module Development Quick Start Guide

Creating a module in Ignition is much simpler than it used to be.  Recently, Ignition module development moved over to Maven, providing easy access to Ignition archetypes and SDK includes.  Here's a quick start guide to get you going on creating your first module.

Prerequisites:

Java JDK (Azul Zulu 11 is recommended for Ignition 8.0.)
IntelliJ IDEA.  The community edition works well.

Steps:

  • In IntelliJ, create new project
    • Select Maven, Add Maven Archetype
Group   : com.inductiveautomation.ignitionsdk
Artifact: client-designer-gateway-archetype
Version : 1.2.0  (Latest version as of 12/2019) 
    •  After choosing the archetype, use the following info for your module
GroupId   : Make this the moduleID  (i.e. org.ignitionmdc.barcodedecoder)
ArtifactId: Make this the last part of the GroupId  (i.e. barcodedecoder)
Version   : Make this Ignition standard with 3 numbers (i.e. 1.0.0)
  • Click to auto-import maven dependencies in the bottom right if prompted.
  • Change your moduleID
    • Open your <modulename>-build directory in IntelliJ IDEA's Project panel
    • Open your pom.xml
    • Find moduleId and change it to match your GroupId
  • If you'd like a nice Module Name and Description, you can update that info here:
    • Open your pom.xml from your main directory in IntelliJ IDEA's Project panel
    • Find and update <name> and <description>
  • Build your module 
    • Open View -> Tool Windows -> Maven Projects
    • Expand "Module Name (root)", "Lifecycle"
    • Right click "package", click "Run Maven Build"
  • Sign your module 

That's it!  Go to your Ignition Gateway, add your module, and you're good to go.

For more documentation on writing Ignition modules, check out these resources:

2 comments:

Unknown said...


I read your post, it really very nice explanation as well as great review like that. Thank you so much for sharing with us.
13 Below

Lorenzo said...

I have problem resolving dependencies:

First following the ignition I correct the main repository url with this: https://nexus.inductiveautomation.com/repository/inductiveautomation-releases/

After that, when maven tries to resolve local dependencies between local targets, it fails because is tryig to resolve it on maven repos and not between local targets. Any suggestion?

Anyway thank you for you guide!

Post a Comment