# Why gradle and guice?

**URL:** <https://discuss.elastic.co/t/why-gradle-and-guice/2812>\
**Category:** Elasticsearch\
**Created:** [February 15, 2010, 11:39am UTC](https://discuss.elastic.co/t/why-gradle-and-guice/2812 "2010-02-15T11:39:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lukas\_Vlcek1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lukas_vlcek1/32/819_2.png) [@Lukas\_Vlcek1](https://discuss.elastic.co/u/Lukas_Vlcek1)\
**Post date:** [February 15, 2010, 11:39am UTC](https://discuss.elastic.co/t/why-gradle-and-guice/2812/1 "2010-02-15T11:39:22Z")

</div>

Just out of curiosity, why using gradle and guice? Did you make bad  
experience with mvn and spring in Compass?

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [February 15, 2010, 11:50am UTC](https://discuss.elastic.co/t/why-gradle-and-guice/2812/2 "2010-02-15T11:50:48Z")

</div>

Gradle:

I hate maven (maybe 3.0 would be nicer, can't wait for it). Git makes  
storing jar files in the repository a pain, since you always download all  
the history when you clone, which means it was either Ant+Ivy or something  
similar. I like Gradle because I can write (in code) the build script,  
though only after looking at Gradle to see how they use Gradle to build  
Gradle, I managed to really understand how to use it 🙂

Guice:

Spring is too big for what I do, just needed a DI and thats it. Did not  
want the configuration files to be spring files, I like what I did in  
Compass with Settings and did the same now (so you can easily write sensible  
configuration files in yaml, json, or even properties files). Also, DI  
really comes nicely into play because a Node can have many Indices, and each  
Index can have one or more Shards, and each are different Guice module  
(making shard level isolated DI work nicely). In spring lingo, think  
ApplicationContext for each index created, and each shard created per index  
(and Spring does come with its overhead compared to Guice).

To be honest, Guice can be a pain. For example, it lacks support for some  
basic things like _DI aware_ lifecycle (which are part of the javax  
annotations, like PostCreate and PreDestroy.

-shay.banon

On Mon, Feb 15, 2010 at 1:39 PM, Lukas Vlcek [lukas.vlcek@gmail.com](mailto:lukas.vlcek@gmail.com) wrote:

> Just out of curiosity, why using gradle and guice? Did you make bad  
> experience with mvn and spring in Compass?

---

<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, 4:25am UTC](https://discuss.elastic.co/t/why-gradle-and-guice/2812/3 "2017-07-06T04:25:44Z")

</div>

Closed on July 6, 2017, 4:25am UTC


