# Elasticsearch Maven plugin on GitHub

**URL:** <https://discuss.elastic.co/t/elasticsearch-maven-plugin-on-github/15284>\
**Category:** Elasticsearch\
**Created:** [January 17, 2014, 12:44am UTC](https://discuss.elastic.co/t/elasticsearch-maven-plugin-on-github/15284 "2014-01-17T00:44:22Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![AlexC](https://avatars.discourse-cdn.com/v4/letter/a/aeb1de/32.png) [@AlexC](https://discuss.elastic.co/u/AlexC)\
**Post date:** [January 17, 2014, 12:44am UTC](https://discuss.elastic.co/t/elasticsearch-maven-plugin-on-github/15284/1 "2014-01-17T00:44:22Z")

</div>

If anyone is interested in using a Maven plugin to run Elasticsearch for  
integration testing, I just published one on GitHub:  
[https://github.com/alexcojocaru/elasticsearch-maven-plugin](https://github.com/alexcojocaru/elasticsearch-maven-plugin).

It is an alternative to starting a node through the code.

The readme should provide enough information, but let me know if something  
is missing or not clear enough.  
It uses ES v0.90.7, but it can be easily updated to the latest ES version  
by changing the dependency version in the pom.xml file.

alex

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/91db7e6a-9bab-4cde-b52f-7f4d660c1248%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/91db7e6a-9bab-4cde-b52f-7f4d660c1248%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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:** [January 17, 2014, 7:54am UTC](https://discuss.elastic.co/t/elasticsearch-maven-plugin-on-github/15284/2 "2014-01-17T07:54:25Z")

</div>

Hey Alex

That's great! I started a project like this some months ago but did not find enough time to finish it.  
Thanks for sharing it!

--  
David Pilato | Technical Advocate | [Elasticsearch.com](http://Elasticsearch.com)  
@dadoonet | @elasticsearchfr

Le 17 janvier 2014 at 01:44:26, AlexC ([acojocaru@pingidentity.com](mailto:acojocaru@pingidentity.com)) a écrit:

If anyone is interested in using a Maven plugin to run Elasticsearch for integration testing, I just published one on GitHub:  
[https://github.com/alexcojocaru/elasticsearch-maven-plugin](https://github.com/alexcojocaru/elasticsearch-maven-plugin).

It is an alternative to starting a node through the code.

The readme should provide enough information, but let me know if something is missing or not clear enough.  
It uses ES v0.90.7, but it can be easily updated to the latest ES version by changing the dependency version in the pom.xml file.

alex

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/91db7e6a-9bab-4cde-b52f-7f4d660c1248%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/91db7e6a-9bab-4cde-b52f-7f4d660c1248%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/etPan.52d8e1b1.6763845e.dc5%40MacBook-Air-de-David.local](https://groups.google.com/d/msgid/elasticsearch/etPan.52d8e1b1.6763845e.dc5%40MacBook-Air-de-David.local).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![AlexC](https://avatars.discourse-cdn.com/v4/letter/a/aeb1de/32.png) [@AlexC](https://discuss.elastic.co/u/AlexC)\
**Post date:** [January 17, 2014, 8:15am UTC](https://discuss.elastic.co/t/elasticsearch-maven-plugin-on-github/15284/3 "2014-01-17T08:15:24Z")

</div>

You are very welcome, David.

I believe the project is pretty much complete, for it also contains tests  
which exercise the mojos.  
As mentioned already, it depends on an ES version which is already old. I  
will try to keep it up to date, but contributions of any sort are more than  
welcome.

alex

On Fri, Jan 17, 2014 at 2:54 AM, David Pilato [david@pilato.fr](mailto:david@pilato.fr) wrote:

> Hey Alex
> 
> That's great! I started a project like this some months ago but did not  
> find enough time to finish it.  
> Thanks for sharing it!
> 
> --  
> _David Pilato_ | _Technical Advocate_ | _[Elasticsearch.com](http://Elasticsearch.com)_  
> @dadoonet [https://twitter.com/dadoonet](https://twitter.com/dadoonet) | @elasticsearchfr[https://twitter.com/elasticsearchfr](https://twitter.com/elasticsearchfr)
> 
> Le 17 janvier 2014 at 01:44:26, AlexC ([acojocaru@pingidentity.com](mailto:acojocaru@pingidentity.com)//acojocaru@pingidentity.com)  
> a écrit:
> 
> If anyone is interested in using a Maven plugin to run Elasticsearch for  
> integration testing, I just published one on GitHub:  
> [GitHub - alexcojocaru/elasticsearch-maven-plugin: A Maven plugin to run a single node Elasticsearch cluster during the integration test phase of a build](https://github.com/alexcojocaru/elasticsearch-maven-plugin).
> 
> It is an alternative to starting a node through the code.
> 
> The readme should provide enough information, but let me know if something  
> is missing or not clear enough.  
> It uses ES v0.90.7, but it can be easily updated to the latest ES version  
> by changing the dependency version in the pom.xml file.
> 
> alex
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).
> 
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/91db7e6a-9bab-4cde-b52f-7f4d660c1248%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/91db7e6a-9bab-4cde-b52f-7f4d660c1248%40googlegroups.com)  
> .  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> 
> --  
> You received this message because you are subscribed to a topic in the  
> Google Groups "elasticsearch" group.  
> To unsubscribe from this topic, visit  
> [https://groups.google.com/d/topic/elasticsearch/0I2TGylTRHc/unsubscribe](https://groups.google.com/d/topic/elasticsearch/0I2TGylTRHc/unsubscribe).  
> To unsubscribe from this group and all its topics, send an email to  
> [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/etPan.52d8e1b1.6763845e.dc5%40MacBook-Air-de-David.local](https://groups.google.com/d/msgid/elasticsearch/etPan.52d8e1b1.6763845e.dc5%40MacBook-Air-de-David.local)  
> .
> 
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAHUBgW-BJbavcMR0Tqn0djA%2BygtXCNsbZ5c8U%3DphGEHiqdt84g%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAHUBgW-BJbavcMR0Tqn0djA%2BygtXCNsbZ5c8U%3DphGEHiqdt84g%40mail.gmail.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Chetan\_Padhye](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/chetan_padhye/32/1069_2.png) [@Chetan\_Padhye](https://discuss.elastic.co/u/Chetan_Padhye)\
**Post date:** [December 4, 2014, 10:13am UTC](https://discuss.elastic.co/t/elasticsearch-maven-plugin-on-github/15284/4 "2014-12-04T10:13:10Z")

</div>

Hi Good plugin . . I tried to run it but it start and then stop once pom  
execution is finished. How can we modify plugin to keep it running once  
started. My intention is to use this plugin for demo installations. so i  
can install Elasticsearch node and start it on any machine for my demo.

On Friday, 17 January 2014 06:14:22 UTC+5:30, AlexC wrote:

> If anyone is interested in using a Maven plugin to run Elasticsearch for  
> integration testing, I just published one on GitHub:  
> [GitHub - alexcojocaru/elasticsearch-maven-plugin: A Maven plugin to run a single node Elasticsearch cluster during the integration test phase of a build](https://github.com/alexcojocaru/elasticsearch-maven-plugin).
> 
> It is an alternative to starting a node through the code.
> 
> The readme should provide enough information, but let me know if something  
> is missing or not clear enough.  
> It uses ES v0.90.7, but it can be easily updated to the latest ES version  
> by changing the dependency version in the pom.xml file.
> 
> alex

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/a9188126-93df-4d43-aaf8-4c324ceb12a3%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/a9188126-93df-4d43-aaf8-4c324ceb12a3%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![AlexC](https://avatars.discourse-cdn.com/v4/letter/a/aeb1de/32.png) [@AlexC](https://discuss.elastic.co/u/AlexC)\
**Post date:** [December 6, 2014, 2:51am UTC](https://discuss.elastic.co/t/elasticsearch-maven-plugin-on-github/15284/5 "2014-12-06T02:51:36Z")

</div>

Here's my suggestion:

modify StartElasticsearchNodeMojo#execute() and, right before the method  
returns (ie. after the ES node is started) read a System property called  
"waitIndefinitely". If the property is set, then wait indefinitely (see  
below for details), else continue the execution.  
You will have to provide that property when running maven, like mvn clean  
verify -DwaitIndefinitely, for the plugin to wait indefinitely.

I hope that helps. Let me now if you need additional help.

To wait indefinitely:  
see the waitIndefinitely() method in  
[http://svn.apache.org/viewvc/tomcat/maven-plugin/tags/tomcat-maven-plugin-2.0/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/AbstractRunMojo.java?view=markup](http://svn.apache.org/viewvc/tomcat/maven-plugin/tags/tomcat-maven-plugin-2.0/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/AbstractRunMojo.java?view=markup)

alex

On Thu, Dec 4, 2014 at 2:13 AM, Chetan Padhye [chetanpadhye@gmail.com](mailto:chetanpadhye@gmail.com)  
wrote:

> Hi Good plugin . . I tried to run it but it start and then stop once pom  
> execution is finished. How can we modify plugin to keep it running once  
> started. My intention is to use this plugin for demo installations. so i  
> can install Elasticsearch node and start it on any machine for my demo.
> 
> On Friday, 17 January 2014 06:14:22 UTC+5:30, AlexC wrote:
> 
> > If anyone is interested in using a Maven plugin to run Elasticsearch for  
> > integration testing, I just published one on GitHub:  
> > [GitHub - alexcojocaru/elasticsearch-maven-plugin: A Maven plugin to run a single node Elasticsearch cluster during the integration test phase of a build](https://github.com/alexcojocaru/elasticsearch-maven-plugin).
> > 
> > It is an alternative to starting a node through the code.
> > 
> > The readme should provide enough information, but let me know if  
> > something is missing or not clear enough.  
> > It uses ES v0.90.7, but it can be easily updated to the latest ES version  
> > by changing the dependency version in the pom.xml file.
> > 
> > alex
> > 
> > --  
> > You received this message because you are subscribed to a topic in the  
> > Google Groups "elasticsearch" group.  
> > To unsubscribe from this topic, visit  
> > [https://groups.google.com/d/topic/elasticsearch/0I2TGylTRHc/unsubscribe](https://groups.google.com/d/topic/elasticsearch/0I2TGylTRHc/unsubscribe).  
> > To unsubscribe from this group and all its topics, send an email to  
> > [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/a9188126-93df-4d43-aaf8-4c324ceb12a3%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/a9188126-93df-4d43-aaf8-4c324ceb12a3%40googlegroups.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/a9188126-93df-4d43-aaf8-4c324ceb12a3%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/a9188126-93df-4d43-aaf8-4c324ceb12a3%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > .  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
[image: Ping Identity logo] [https://www.pingidentity.com/](https://www.pingidentity.com/)  
Alex Cojocaru  
Sr. Development Engineer  
@ [acojocaru@pingidentity.com](mailto:acojocaru@pingidentity.com) [image: phone] +1 604.697.7052 Connect  
with us… [image: twitter logo] [https://twitter.com/pingidentity](https://twitter.com/pingidentity) [image:  
youtube logo] [https://www.youtube.com/user/PingIdentityTV](https://www.youtube.com/user/PingIdentityTV) [image:  
LinkedIn logo] [https://www.linkedin.com/company/21870](https://www.linkedin.com/company/21870) [image: Facebook  
logo] [https://www.facebook.com/pingidentitypage](https://www.facebook.com/pingidentitypage) [image: Google+ logo]  
[https://plus.google.com/u/0/114266977739397708540](https://plus.google.com/u/0/114266977739397708540) [image: slideshare logo]  
[http://www.slideshare.net/PingIdentity](http://www.slideshare.net/PingIdentity) [image: flipboard logo]  
[http://flip.it/vjBF7](http://flip.it/vjBF7) [image: rss feed icon]  
[https://www.pingidentity.com/blogs/](https://www.pingidentity.com/blogs/)

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAHUBgW8an8uQZHmdEZdnryXDMhjiSTpmV%2B%2BAXpxzvoOGsZnNcA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAHUBgW8an8uQZHmdEZdnryXDMhjiSTpmV%2B%2BAXpxzvoOGsZnNcA%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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, 12:45am UTC](https://discuss.elastic.co/t/elasticsearch-maven-plugin-on-github/15284/6 "2017-07-06T00:45:21Z")

</div>


