# Add file in modl with ignition maven plugin

**URL:** <https://forum.inductiveautomation.com/t/add-file-in-modl-with-ignition-maven-plugin/21253>\
**Category:** Module Development\
**Created:** [December 6, 2018, 10:35am UTC](https://forum.inductiveautomation.com/t/add-file-in-modl-with-ignition-maven-plugin/21253 "2018-12-06T10:35:02Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![mazeyrat](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mazeyrat/32/10955_2.png) [@mazeyrat](https://forum.inductiveautomation.com/u/mazeyrat)\
**Post date:** [December 6, 2018, 10:35am UTC](https://forum.inductiveautomation.com/t/add-file-in-modl-with-ignition-maven-plugin/21253/1 "2018-12-06T10:35:02Z")

</div>

I would like to add a file in a module.modl  
I use a third party lib added with maven dependency and I need to add some file in the module.modl, just near the third party lib jar file.  
How to achieve that with ignition maven plugin ???

---

<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:** [December 6, 2018, 1:22pm UTC](https://forum.inductiveautomation.com/t/add-file-in-modl-with-ignition-maven-plugin/21253/2 "2018-12-06T13:22:46Z")

</div>

It doesn’t look like there’s an easy way to do this, but I’m not sure it matters because there’s no way your third party jar would find this file in the module anyway. What’s the requirement here?

---

<div class="post-metadata">

**Author:** ![mazeyrat](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mazeyrat/32/10955_2.png) [@mazeyrat](https://forum.inductiveautomation.com/u/mazeyrat)\
**Post date:** [December 6, 2018, 1:34pm UTC](https://forum.inductiveautomation.com/t/add-file-in-modl-with-ignition-maven-plugin/21253/3 "2018-12-06T13:34:15Z")

</div>

Hi @Kevin.Herron, my module integrate a JAR library file.

With this lib it’s mentionned that for better voice quality you might also copy the “mediaench” files (some DLLs : .dll, .dylib, .jnilib, .so) to your app folder (near your java or jar files). This contains some platform dependent native binaries to optimize audio processing and the sip client will select the correct one to be used automatically if found.

---

<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:** [December 6, 2018, 1:45pm UTC](https://forum.inductiveautomation.com/t/add-file-in-modl-with-ignition-maven-plugin/21253/4 "2018-12-06T13:45:45Z")

</div>

Sounds like they need to be in `java.library.path`, which is `lib:lib/core/gateway` in gateway scope and I think it’s default/system dependent in client/designer scope.

---

<div class="post-metadata">

**Author:** ![mazeyrat](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mazeyrat/32/10955_2.png) [@mazeyrat](https://forum.inductiveautomation.com/u/mazeyrat)\
**Post date:** [December 6, 2018, 2:03pm UTC](https://forum.inductiveautomation.com/t/add-file-in-modl-with-ignition-maven-plugin/21253/5 "2018-12-06T14:03:21Z")

</div>

I need theses files for the **Client/Designer scope** for Vison Client on windows 10…  
So I can’t deliver them with the module ? I need to manually copy the file in a windows PATH directory ?

---

<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:** [December 6, 2018, 2:06pm UTC](https://forum.inductiveautomation.com/t/add-file-in-modl-with-ignition-maven-plugin/21253/6 "2018-12-06T14:06:06Z")

</div>

Putting them inside the module won’t do anything because those jars won’t be able to find them. JARs aren’t loaded out of the module directly, they’re copied to some temp directory and loaded there.

If you want to deliver them with your module, pack them inside one of your JAR files and extract them yourself on module startup.

---

<div class="post-metadata">

**Author:** ![mazeyrat](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mazeyrat/32/10955_2.png) [@mazeyrat](https://forum.inductiveautomation.com/u/mazeyrat)\
**Post date:** [December 6, 2018, 2:09pm UTC](https://forum.inductiveautomation.com/t/add-file-in-modl-with-ignition-maven-plugin/21253/7 "2018-12-06T14:09:28Z")

</div>

Ok I see thanks a lot

---

<div class="post-metadata">

**Author:** ![mazeyrat](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mazeyrat/32/10955_2.png) [@mazeyrat](https://forum.inductiveautomation.com/u/mazeyrat)\
**Post date:** [December 6, 2018, 3:22pm UTC](https://forum.inductiveautomation.com/t/add-file-in-modl-with-ignition-maven-plugin/21253/8 "2018-12-06T15:22:35Z")

</div>

> [@Kevin.Herron](#):
>
> they're copied to some temp directory

By the way, How you can acces to client temp directory ? from client scope to extract file from the jar with somethink like

> <https://stackoverflow.com/questions/1529611/how-to-write-a-java-program-which-can-extract-a-jar-file-and-store-its-data-in-s/1529707#1529707>

---

<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:** [December 6, 2018, 3:25pm UTC](https://forum.inductiveautomation.com/t/add-file-in-modl-with-ignition-maven-plugin/21253/9 "2018-12-06T15:25:12Z")

</div>

Include the files as resources under `src/main/resources` and use [`getResourceAsStream`](https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html#getResourceAsStream-java.lang.String-) to access them.
