Q:

how to fix maven dependency conflicts of Guava in Elasticsearch

My project needs to use libraries Hbase-Client and ElasticSearch.  But Hbase-Client depends on guava.12 while ElasticSearch depends on guava.18.  If I explicitly indicate to use guava.12 in pom.xml then ElasticSearch throw exception, if I indicate guava.18 in pom.xml then Hbase-Client throw exception.  How should I fix this problem.   

A:

You can use Maven shade plugin to solve the problem.  Maven shade will change the package path of guava in ES to prevent from messing up old guava version.  
Just following the steps as following, you will fix it. 
https://www.elastic.co/blog/to-shade-or-not-to-shade

