Simple Maven Clarification Question

ignition80
#1

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
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

0 Likes

#2

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

0 Likes

#3

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?

0 Likes

#4

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.

0 Likes

#5

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

0 Likes

#6

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

0 Likes

#7

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. :man_facepalming:

Thank you Kevin!

0 Likes