Errors when building two SDK examples with maven

I just tried to build the SDK example modules. Using a fresh install of Debian 10, I installed Open Java JRE/JDK, Git and Maven. I cloned the ignition SDK examples:

https://github.com/inductiveautomation/ignition-sdk-examples.git

and from in the SDK directory I ran:

./buildAll.sh

This all seemed to run smoothly (4000+ lines of messages) except for 2 modules:
(buildmessages.txt (543.6 KB)

report-datasource-common

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project report-datasource-common: Compilation failure: Compilation failure:
[ERROR] Source option 5 is no longer supported. Use 6 or later.
[ERROR] Target option 1.5 is no longer supported. Use 1.6 or later.

slack-notification-gateway

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.2:compile (default-compile) on project slack-notification-gateway: Compilation failure: Compilation failure:
[ERROR] /home/igndev/Documents/ignition/samples/ignition-sdk-examples/slack-alarm-notification/slack-notification-gateway/src/main/java/com/inductiveautomation/ignition/examples/slack/profile/SlackNotificationProfile.java:[20,23] package com.google.gson does not exist
[ERROR] /home/igndev/Documents/ignition/samples/ignition-sdk-examples/slack-alarm-notification/slack-notification-gateway/src/main/java/com/inductiveautomation/ignition/examples/slack/profile/SlackNotificationProfile.java:[123,13] cannot find symbol
[ERROR] symbol: class JsonObject
[ERROR] location: class com.inductiveautomation.ignition.examples.slack.profile.SlackNotificationProfile
[ERROR] /home/igndev/Documents/ignition/samples/ignition-sdk-examples/slack-alarm-notification/slack-notification-gateway/src/main/java/com/inductiveautomation/ignition/examples/slack/profile/SlackNotificationProfile.java:[123,35] cannot find symbol
[ERROR] symbol: class JsonObject
[ERROR] location: class com.inductiveautomation.ignition.examples.slack.profile.SlackNotificationProfile

Based on what I am seeing this is not an error due to using Open Java vs Oracle. But as I have no clue about Java and/or Ignition SDK development, I can’t even begin to theorize why these errors occur.

You’re sure you’re using a Java 11 distribution to run Maven? Can you re-run just the failing examples individually? (maven build in their respective directories)

For unrelated reasons I created a fresh install of Debian this morning, and went through the same process as I originally reported. The buildAll failed with the same errors. I went into both of the the failing builds and ran:

mvn package

This produced the same results as reported above.

FWIW my Java version is:

java -version
openjdk version “11.0.7” 2020-04-14
OpenJDK Runtime Environment (build 11.0.7+10-post-Debian-3deb10u1)
OpenJDK 64-Bit Server VM (build 11.0.7+10-post-Debian-3deb10u1, mixed mode, sharing)

Note that the key error message for the report module is:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project report-datasource-common: Compilation failure: Compilation failure:
[ERROR] Source option 5 is no longer supported. Use 6 or later.
[ERROR] Target option 1.5 is no longer supported. Use 1.6 or later.

And for the slack module it is:

[ERROR] /home/igndev/Documents/Ignition/ignition-sdk-examples/slack-alarm-notification/slack-notification-gateway/src/main/java/com/inductiveautomation/ignition/examples/slack/profile/SlackNotificationProfile.java:[20,23] package com.google.gson does not exist

Neither of these seem related to the actual Java version per se. (and given that everything else was built, IMHO I can’t see how the installed Java version is at fault)

I think these modules just need some minor updates.

I just pushed fixes for both modules.

1 Like

This time I got a clean build. Thanks!