Building modules with Maven: same functionality as with Ant?

In the latest project packages for example modules, do the Maven pom files provide the same functionality as the Ant build files did in the earlier versions?

Specifically, I’m not seeing:
– Inclusion of non-java files in the module jar.

– The option to explode jars in the projects /lib folder and include them in the project jar. (I can easily live without this, I think, but then again, maybe it served some purpose not obvious to me.)

– The option to deploy a module to the local Ignition gateway.

As a general comment about Maven, I find myself wondering why we don’t write our own Java routines for building our modules in a configurable manner. These routines would not be universally useful, but they would be as flexible as we need them to be. And they would have to be easier to work with than Maven–or so it seems.

Everything under src/main/resources is included in jar files built my Maven. This is just standard Maven convention.

Not necessary at all any more, but achievable with something like Maven's shade plugin if you want it.

The ignition-maven-plugin can be configured to hook into two phases of the Maven build lifecycle - package and install. During package it builds the modl file, and during install it will post it to the Ignition gateway to be installed (if your gateway is in developer mode).

See github.com/inductiveautomation/ ... ld/pom.xml for an example that configures both phases.

Indeed switch over to Maven has made us to re-skill ourselves with new modern ways of managing software development projects. Hopefully new technologies and approaches of software development and management will result in more consistency and simplification.

We were used to Eclipse IDE and the Ignition SDK with all the jar files included in it as per the SDK documentation (prior to version 7.7.8). Now not only Maven has changed the approach but also the new IDE (InteliJ) and new server (Jetty) has been introduced. This has certainly slowed down our pace a little bit momentarily till we are comfortable with the new tools and technologies.

I too faced lot of frustration while using Eclipse with Maven! Instead of concentrating on our development, I had to learn new tools! Finally I tried Netbeans IDE 8.0.2 and was able to build example projects of SDK as well as build modl file for my module in Maven. Netbeans seems to do a good job of handling Maven projects.

Perhaps I would have made more progress had we continued with the the old sdk approach of versions before 7.7.8. There was definitely a slowdown with new approaches. But I hope the new Maven approach will be for good once will get used to them.

regards
Prafull

The documentation for the Ignition Maven Plug-in helps. Saw the link to the doc in Pramanj’s other post. I didn’t realize that the Maven plug-in was covered in the published docs; thought that documentation was coming later. My miss.

Documentation for Maven (on the Maven website) is not the greatest. Seems some pages reflect code status in earlier versions, for example. But I did manage to modify the project POM to define a property for the revision level of Ignition, to be inherited by all module POM files. This will avoid having to change all module POM files when upgrading to next Ignition release. Project POM can also specify dependencies common to all modules. Inheritance goes a long way toward making a maintainable set of POM files.

We’ll go the Maven route for now. Later we can think about Gradle, which looks to be more flexible, but has its own steep learning curve.