# Errors when building two SDK examples with maven

**URL:** <https://forum.inductiveautomation.com/t/errors-when-building-two-sdk-examples-with-maven/36125>\
**Category:** Module Development\
**Created:** [June 28, 2020, 5:49pm UTC](https://forum.inductiveautomation.com/t/errors-when-building-two-sdk-examples-with-maven/36125 "2020-06-28T17:49:59Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![peter](https://avatars.discourse-cdn.com/v4/letter/p/278dde/32.png) [@peter](https://forum.inductiveautomation.com/u/peter)\
**Post date:** [June 28, 2020, 5:49pm UTC](https://forum.inductiveautomation.com/t/errors-when-building-two-sdk-examples-with-maven/36125/1 "2020-06-28T17:49:59Z")

</div>

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:

> [GitHub - inductiveautomation/ignition-sdk-examples: Ignition SDK Example Projects](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](https://forum.inductiveautomation.com/uploads/short-url/knN3Dv7tZ7MdhELbE6aZ9qqHLzK.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.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [June 29, 2020, 2:58pm UTC](https://forum.inductiveautomation.com/t/errors-when-building-two-sdk-examples-with-maven/36125/2 "2020-06-29T14:58:29Z")

</div>

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)

---

<div class="post-metadata">

**Author:** ![peter](https://avatars.discourse-cdn.com/v4/letter/p/278dde/32.png) [@peter](https://forum.inductiveautomation.com/u/peter)\
**Post date:** [June 29, 2020, 3:56pm UTC](https://forum.inductiveautomation.com/t/errors-when-building-two-sdk-examples-with-maven/36125/3 "2020-06-29T15:56:37Z")

</div>

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)

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [June 29, 2020, 4:05pm UTC](https://forum.inductiveautomation.com/t/errors-when-building-two-sdk-examples-with-maven/36125/4 "2020-06-29T16:05:17Z")

</div>

I think these modules just need some minor updates.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [June 29, 2020, 4:11pm UTC](https://forum.inductiveautomation.com/t/errors-when-building-two-sdk-examples-with-maven/36125/5 "2020-06-29T16:11:28Z")

</div>

I just pushed fixes for both modules.

---

<div class="post-metadata">

**Author:** ![peter](https://avatars.discourse-cdn.com/v4/letter/p/278dde/32.png) [@peter](https://forum.inductiveautomation.com/u/peter)\
**Post date:** [June 29, 2020, 4:21pm UTC](https://forum.inductiveautomation.com/t/errors-when-building-two-sdk-examples-with-maven/36125/6 "2020-06-29T16:21:44Z")

</div>

This time I got a clean build. Thanks!
