# Too many Jar dependencies while using ES Transport client

**URL:** <https://discuss.elastic.co/t/too-many-jar-dependencies-while-using-es-transport-client/94761>\
**Category:** Elasticsearch\
**Created:** [July 27, 2017, 9:18am UTC](https://discuss.elastic.co/t/too-many-jar-dependencies-while-using-es-transport-client/94761 "2017-07-27T09:18:04Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![kedarsdixit](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kedarsdixit/32/20502_2.png) [@kedarsdixit](https://discuss.elastic.co/u/kedarsdixit)\
**Post date:** [July 27, 2017, 9:18am UTC](https://discuss.elastic.co/t/too-many-jar-dependencies-while-using-es-transport-client/94761/1 "2017-07-27T09:18:04Z")

</div>

Hi,

I have been using ES Transport client in our product to fetch data from ES Server.

When I use below maven dependency and build the project:

```auto
<dependency>
	<groupId>org.elasticsearch.client</groupId>
	<artifactId>transport</artifactId>
	<version>5.4.3</version>
</dependency>

```

There are more than 30 jars that are getting shipped along with this jar.

Same is the case if I use ES-Spark connector where I see more than 100 jars being shipped.

What can be done for this one ? because shipping these many jars every time for new deployment is not a good practice.

---

<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:** [July 27, 2017, 9:43am UTC](https://discuss.elastic.co/t/too-many-jar-dependencies-while-using-es-transport-client/94761/2 "2017-07-27T09:43:57Z")

</div>

May be this can help: [https://www.elastic.co/blog/to-shade-or-not-to-shade](https://www.elastic.co/blog/to-shade-or-not-to-shade)

---

<div class="post-metadata">

**Author:** ![kedarsdixit](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kedarsdixit/32/20502_2.png) [@kedarsdixit](https://discuss.elastic.co/u/kedarsdixit)\
**Post date:** [July 28, 2017, 11:14am UTC](https://discuss.elastic.co/t/too-many-jar-dependencies-while-using-es-transport-client/94761/3 "2017-07-28T11:14:21Z")

</div>

Thanks but I need to solve issue of shipping too many jars along with my maven build. What can be done to ship only client jar ?

---

<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:** [July 28, 2017, 12:19pm UTC](https://discuss.elastic.co/t/too-many-jar-dependencies-while-using-es-transport-client/94761/4 "2017-07-28T12:19:14Z")

</div>

Shade your project. It will produce one single jar containing all classes.  
You don't need to do any relocation. Just shade.

My 2 cents

---

<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:** [August 25, 2017, 12:19pm UTC](https://discuss.elastic.co/t/too-many-jar-dependencies-while-using-es-transport-client/94761/5 "2017-08-25T12:19:20Z")

</div>

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