# Simple Maven Clarification Question

**URL:** <https://forum.inductiveautomation.com/t/simple-maven-clarification-question/27397>\
**Category:** Module Development\
**Tags:** ignition80\
**Created:** [August 13, 2019, 1:04pm UTC](https://forum.inductiveautomation.com/t/simple-maven-clarification-question/27397 "2019-08-13T13:04:07Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![brandon1](https://avatars.discourse-cdn.com/v4/letter/b/ea666f/32.png) [@brandon1](https://forum.inductiveautomation.com/u/brandon1)\
**Post date:** [August 13, 2019, 1:04pm UTC](https://forum.inductiveautomation.com/t/simple-maven-clarification-question/27397/1 "2019-08-13T13:04:07Z")

</div>

Hello Everyone,

I am a complete novice when it comes to using Maven to build Ignition modules. I did manage to stumble through making an Abstract Tag Driver in version 7.9 and now have come to the point of migrating it to version 8.0

I would like clarification on the package goal when building the project.  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/2X/f/f1e039254b1ed977ab505270221dfb4abfd23ba4.png)  
As you can see in the picture. There is a top folder file that contains the build and driver folders within them. Why is it that I have to run the package goal on the top-most folder and not the other two folders? In fact running it on the snmpModule-build folder resulted in a compile error.

FYI. I’m running Eclipse 4.12.0 and the OpenJava 11 JDK implementation. .

Thank you,  
Brandon

---

<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:** [August 13, 2019, 1:10pm UTC](https://forum.inductiveautomation.com/t/simple-maven-clarification-question/27397/2 "2019-08-13T13:10:22Z")

</div>

> [@brandon1](#):
>
> Why is it that I have to run the package goal on the top-most folder and not the other two folders?

Because that's the way the plugin (ignition-maven-plugin) was written to work, I guess.

---

<div class="post-metadata">

**Author:** ![brandon1](https://avatars.discourse-cdn.com/v4/letter/b/ea666f/32.png) [@brandon1](https://forum.inductiveautomation.com/u/brandon1)\
**Post date:** [August 13, 2019, 1:27pm UTC](https://forum.inductiveautomation.com/t/simple-maven-clarification-question/27397/3 "2019-08-13T13:27:14Z")

</div>

Thank you Kevin. I will keep that in mind. Side note: In testing this module, it seems that driverContext.getHomeFolder() no longer returns the correct file path since the version 8.0 installation adds another folder called opcua in the filepath. Can you confirm this?

---

<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:** [August 13, 2019, 1:32pm UTC](https://forum.inductiveautomation.com/t/simple-maven-clarification-question/27397/4 "2019-08-13T13:32:15Z")

</div>

The “home” folder from DriverContext should be pointing at `$IGNITION/data/opcua/devices/$deviceName` on 8.0.

Now that you’ve mentioned it, it occurs to me this is not backwards compatible with 7.9 in that there is no migration of the data from the old location to the new location. Oops.

---

<div class="post-metadata">

**Author:** ![brandon1](https://avatars.discourse-cdn.com/v4/letter/b/ea666f/32.png) [@brandon1](https://forum.inductiveautomation.com/u/brandon1)\
**Post date:** [August 13, 2019, 3:14pm UTC](https://forum.inductiveautomation.com/t/simple-maven-clarification-question/27397/5 "2019-08-13T15:14:51Z")

</div>

How do I access the “home” folder? There is no home variable that I can find in the DriverContext class.

---

<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:** [August 13, 2019, 3:19pm UTC](https://forum.inductiveautomation.com/t/simple-maven-clarification-question/27397/6 "2019-08-13T15:19:13Z")

</div>

Not sure what you’re asking. You already mentioned using `driverContext.getHomeFolder()`. That’s what’s available to you.

---

<div class="post-metadata">

**Author:** ![brandon1](https://avatars.discourse-cdn.com/v4/letter/b/ea666f/32.png) [@brandon1](https://forum.inductiveautomation.com/u/brandon1)\
**Post date:** [August 13, 2019, 3:24pm UTC](https://forum.inductiveautomation.com/t/simple-maven-clarification-question/27397/7 "2019-08-13T15:24:19Z")

</div>

Oh. I’m sorry. I had not applied our license to the machine which prevented it from writing out the csv file and I didn’t realize it until just now. 🤦‍♂️

Thank you Kevin!

---

<div class="post-metadata">

**Author:** ![brandon1](https://avatars.discourse-cdn.com/v4/letter/b/ea666f/32.png) [@brandon1](https://forum.inductiveautomation.com/u/brandon1)\
**Post date:** [November 23, 2020, 6:32pm UTC](https://forum.inductiveautomation.com/t/simple-maven-clarification-question/27397/8 "2020-11-23T18:32:33Z")

</div>

Hey Kevin,

I’m in the process of porting my code over to the new ManagedDevice abstract class and it does not seem that the new DeviceContext has a way to get the home folder. Can you tell me what the new method is to get to this folderpath?

Thanks.

---

<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:** [November 30, 2020, 3:17pm UTC](https://forum.inductiveautomation.com/t/simple-maven-clarification-question/27397/9 "2020-11-30T15:17:16Z")

</div>

Looks like this wasn’t included on DeviceContext by accident.

You can derive it yourself with a GatewayContext. Call `context.getSystemManager().getDataDir()` to get the general Ignition data dir, then store it wherever you’d like in there or derive the same path to a device folder the OPC UA module would give you by going to `$DATA/opcua/devices/$DEVICE_NAME`.

In 8.1.2 DeviceContext should have a `DeviceContext::getDeviceFolderPath` method on it.

---

<div class="post-metadata">

**Author:** ![brandon1](https://avatars.discourse-cdn.com/v4/letter/b/ea666f/32.png) [@brandon1](https://forum.inductiveautomation.com/u/brandon1)\
**Post date:** [November 30, 2020, 6:01pm UTC](https://forum.inductiveautomation.com/t/simple-maven-clarification-question/27397/10 "2020-11-30T18:01:41Z")

</div>

Thanks Kevin for the heads up.
