# Registering native script from plugin

**URL:** <https://discuss.elastic.co/t/registering-native-script-from-plugin/8979>\
**Category:** Elasticsearch\
**Created:** [September 11, 2012, 12:48am UTC](https://discuss.elastic.co/t/registering-native-script-from-plugin/8979 "2012-09-11T00:48:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![William\_King](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/william_king/32/2631_2.png) [@William\_King](https://discuss.elastic.co/u/William_King)\
**Post date:** [September 11, 2012, 12:48am UTC](https://discuss.elastic.co/t/registering-native-script-from-plugin/8979/1 "2012-09-11T00:48:58Z")

</div>

Hi all,

For my application I'm creating a plugin and a native script. In order to  
keep the codebase together I'd like to register my native script from  
within my plugin, instead of the normal configuration file method. Is this  
possible to do?

--

---

<div class="post-metadata">

**Author:** ![William\_King](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/william_king/32/2631_2.png) [@William\_King](https://discuss.elastic.co/u/William_King)\
**Post date:** [September 11, 2012, 1:35am UTC](https://discuss.elastic.co/t/registering-native-script-from-plugin/8979/2 "2012-09-11T01:35:37Z")

</div>

Never mind, figured it out myself. Gisted it for anyone else interested.

Gist contains AbstractPlugin class loading in a RestModule and a  
ScriptModule (native script)

> <https://gist.github.com/UpOutServers/9a4466108d12452738e9>

On Monday, September 10, 2012 5:48:58 PM UTC-7, William King wrote:

> Hi all,
> 
> For my application I'm creating a plugin and a native script. In order to  
> keep the codebase together I'd like to register my native script from  
> within my plugin, instead of the normal configuration file method. Is this  
> possible to do?

--

---

<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:** [July 6, 2017, 3:13am UTC](https://discuss.elastic.co/t/registering-native-script-from-plugin/8979/3 "2017-07-06T03:13:17Z")

</div>


