# Plugins development workflow

**URL:** https://discuss.elastic.co/t/plugins-development-workflow/121872
**Category:** Elasticsearch
**Created:** [February 28, 2018, 2:46pm UTC](https://discuss.elastic.co/t/plugins-development-workflow/121872 "2018-02-28T14:46:03Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![franck.lefebure](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/franck.lefebure/32/24332_2.png) [@franck.lefebure](https://discuss.elastic.co/u/franck.lefebure)
#### Post date: [February 28, 2018, 2:46pm UTC](https://discuss.elastic.co/t/plugins-development-workflow/121872/1 "2018-02-28T14:46:03Z")

</div>

Recently, we started to create custom plugins for ES6 and I wonder what should be a good development method.  
During debugging steps, the iterative packaging/deployment of the plugin to an ES external server instance is quite slow. I would like to stay in Idea all the time.

So I'm actually trying to develop our plugins in a ES6 project checkouted in Idea.  
I use the :distribution:run#start gradle task to start the server and it's fine.

To load my own custom data in the running cluster I've configured the :distribution/build.gradle task like that

```
task run(type: RunTask) {
   distribution = 'zip'
   dataDir = {'/path/to/my/data'}
   clusterName = 'softbridge'
   debug = true
}

```

Now I would like to load a plugin at startup time. For now I test with one of the bundled plugin

```
task run(type: RunTask) {
   distribution = 'zip'
   dataDir = {'/path/to/my/data'}
   clusterName = 'softbridge'
   debug = true
   plugin(':plugins:ingest-attachment')
}

```

But during start, I have have the following error

`"> Task [run#copyPlugins] cannot add plugin [:plugins:ingest-attachment] with version [6.2.0-SNAPSHOT] to project's [:distribution] dependencies: the plugin is not an esplugin or es_meta_plugin"`

Its strange because the plugin gradle project actually has the esplugin gradle plugin

What is the good method ?

---

<div class="post-metadata">

### Author: ![franck.lefebure](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/franck.lefebure/32/24332_2.png) [@franck.lefebure](https://discuss.elastic.co/u/franck.lefebure)
#### Post date: [February 28, 2018, 6:51pm UTC](https://discuss.elastic.co/t/plugins-development-workflow/121872/2 "2018-02-28T18:51:15Z")

</div>

Thanks to this post : [Building a plugin with Gradle and Elasticsearch 5.0](https://discuss.elastic.co/t/building-a-plugin-with-gradle-and-elasticsearch-5-0/65313/2), I'm now able to debug an ES cluster with my plugin deployed in it.

```
buildscript {
    dependencies {
        classpath "org.elasticsearch.gradle:build-tools:6.2.0"
    }
}
apply plugin: 'elasticsearch.esplugin'
esplugin {
    licenseFile rootProject.file('LICENSE.txt')
    noticeFile rootProject.file('NOTICE.txt')
    name 'reverse-children-agg'
    version rootProject.version
    description 'ElasticSearch reverse chidren aggregation plugin'
    classname 'com.softbridge.elasticsearch.join.ReverseChildrenAggPlugin'
    hasClientJar = true
}
run {
    distribution = 'zip'
    dataDir = {'/path/to/my/data'}
    clusterName = 'softbridge'
    debug = true
}

```

I keep curious of how I can deploy one of the shipped :plugins: when I start (with gradle:run) the Cluster from the ES core project

---

<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: [March 28, 2018, 6:51pm UTC](https://discuss.elastic.co/t/plugins-development-workflow/121872/3 "2018-03-28T18:51:33Z")

</div>

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