Skip to end of metadata
Go to start of metadata

Creating a basic module from scratch is not difficult, but we've tried to minimize startup friction by offering you tools to help get started.  Previous to Ignition 7.7.3, the SDK came with a simple GUI tool to create skeleton modules, including generic Ant build scripts.  The tool helped devs get started with some simple project layouts and generic Ant build scripts.  With our 7.7.3 release, we modernized quite a bit. Rather than including jars in your downloads, we provide required resources and dependencies (called artifacts in Maven terms) through hosted Maven repositories.  In addition, you can now conveniently browse the module examples at our Github Page.

Creating a New Module With Maven

 

We don't force any specific tooling on module developers. It's possible to build a module completely from a text editor if you want! That said, we do highly recommend utilizing some sort of version control at a minimum. In addition, most Java developers find their work can be eased quite a bit with the use of a modern Integrated Development Environment. The three most popular IDE's (IntelliJ,Eclipse and Netbeans) all have support for Maven and can make it easier to resolve dependency and import issues 'on the fly'. They also all provide some way to create a new empty Maven projects, or create projects from archetypes which provide a useful starting structure. If you prefer to stick with simpler editors but want a quick start, you can clone our example repo and use any of the projects there to begin.  

Quick Starts with Archetypes

The fastest way to get started with a new Ignition module is to use a Maven Archetype. An archetype is a pre-made structural framework for a Maven project. By creating your new module from an archetype, you let us handle a lot of the laborious setup process for you. Your new module will have directories in place, be configured to use the ignition-maven-plugin described below, and will be ready for you to start adding your own source. To get started with an archetype, you just need to make sure you have Maven installed. With Maven installed, creating a new module project is as easy as entering this at your command-line:  

mvn archetype:generate -DarchetypeGroupId=com.inductiveautomation.ignitionsdk -DarchetypeArtifactId=client-designer-gateway-archetype -DarchetypeVersion=1.0.3

This archetype will create a new project structure for you with seperate directories for each of the Gateway, Designer and Client scopes, as well as a Common and Build directory! For a full list of the Ignition archetypes, you can browse for com.inductiveautomation at Maven Central

 

Next we'll take a look at how we can utilize the ignition-maven-plugin to build and deploy modules as we develop them.


Related Topics ... Next...
In This Section ...



  • No labels

1 Comment

  1. Anonymous

    There must be more required than creating a directory and running that maven command.


    [ERROR] The goal you specified requires a project to execute but there is no POM in this directory (C:\Users\username\Documents\Code\Java\PinstamperModule). Please verify you invoked Maven from the correct directory. -> [Help 1]