# Maven Packages

**URL:** <https://discuss.elastic.co/t/maven-packages/268748>\
**Category:** Elasticsearch\
**Created:** [March 30, 2021, 8:28am UTC](https://discuss.elastic.co/t/maven-packages/268748 "2021-03-30T08:28:53Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![nmalocic](https://avatars.discourse-cdn.com/v4/letter/n/e9a140/32.png) [@nmalocic](https://discuss.elastic.co/u/nmalocic)\
**Post date:** [March 30, 2021, 8:28am UTC](https://discuss.elastic.co/t/maven-packages/268748/1 "2021-03-30T08:28:53Z")

</div>

Hi everyone,  
Is it possible to load maven package to use Json Processor from code?  
I am writing plugin, and I need to use Json Processor to parse data.

Thanks,  
Nemanja

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [March 30, 2021, 8:53am UTC](https://discuss.elastic.co/t/maven-packages/268748/2 "2021-03-30T08:53:38Z")

</div>

> [@nmalocic](#):
>
> I am writing plugin

What kind of plugin is that? Is it a processor for ingest pipeline?

> [@nmalocic](#):
>
> Is it possible to load maven package to use Json Processor from code?

No. This code is not published on Maven.  
But you can copy/paste the existing code (if compatible with the Elastic License 2.0 or SSPL V1) from:

> <https://github.com/elastic/elasticsearch/blob/main/modules/ingest-common/src/main/java/org/elasticsearch/ingest/common/JsonProcessor.java>

---

<div class="post-metadata">

**Author:** ![nmalocic](https://avatars.discourse-cdn.com/v4/letter/n/e9a140/32.png) [@nmalocic](https://discuss.elastic.co/u/nmalocic)\
**Post date:** [March 30, 2021, 9:08am UTC](https://discuss.elastic.co/t/maven-packages/268748/3 "2021-03-30T09:08:48Z")

</div>

Hi @dadoonet, thanks for the answer.  
I am writing Ingest Plugin to create ingest pipeline.  
Inside of the plugin I call 3rd party API (I know this is not optimal but didn't found better solutions), then I want to parse that JSON and save it as nested fields and not just strings.  
I'll try the copy paste method, and see if it works thanks.  
My current workaround is to document that custom pipeline has to have my processor and than json processor after that in order to work.

Thanks,  
Nemanja

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [March 30, 2021, 3:36pm UTC](https://discuss.elastic.co/t/maven-packages/268748/4 "2021-03-30T15:36:18Z")

</div>

> [@nmalocic](#):
>
> My current workaround is to document that custom pipeline has to have my processor and than json processor after that in order to work.

I think that's what I'd do as well. 😉

---

<div class="post-metadata">

**Author:** ![nmalocic](https://avatars.discourse-cdn.com/v4/letter/n/e9a140/32.png) [@nmalocic](https://discuss.elastic.co/u/nmalocic)\
**Post date:** [March 31, 2021, 7:34am UTC](https://discuss.elastic.co/t/maven-packages/268748/5 "2021-03-31T07:34:19Z")

</div>

Thanks a lot for the comments!  
Nemanja

---

<div class="post-metadata">

**Author:** ![nmalocic](https://avatars.discourse-cdn.com/v4/letter/n/e9a140/32.png) [@nmalocic](https://discuss.elastic.co/u/nmalocic)\
**Post date:** [April 5, 2021, 11:50am UTC](https://discuss.elastic.co/t/maven-packages/268748/6 "2021-04-05T11:50:16Z")

</div>

Hi @dadoonet I didn't want to start new tread for this.  
Is there any examples on how to parse optional configuration?  
I need to have option to add config file for my plugin, that configure additional logic.  
I need proper way to check if config.yml is there, and also if settings are not present to use default value.

I was looking at [elasticsearch/ExampleCustomSettingsConfig.java at master · elastic/elasticsearch · GitHub](https://github.com/elastic/elasticsearch/blob/master/plugins/examples/custom-settings/src/main/java/org/elasticsearch/example/customsettings/ExampleCustomSettingsConfig.java) but this wont work if any setting is missing.

Thanks

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [May 3, 2021, 11:51am UTC](https://discuss.elastic.co/t/maven-packages/268748/7 "2021-05-03T11:51:06Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
