# Disabling jarHell for plugins

**URL:** <https://discuss.elastic.co/t/disabling-jarhell-for-plugins/104946>\
**Category:** Elasticsearch\
**Created:** [October 23, 2017, 6:04pm UTC](https://discuss.elastic.co/t/disabling-jarhell-for-plugins/104946 "2017-10-23T18:04:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ivan](https://avatars.discourse-cdn.com/v4/letter/i/df788c/32.png) [@Ivan](https://discuss.elastic.co/u/Ivan)\
**Post date:** [October 23, 2017, 6:04pm UTC](https://discuss.elastic.co/t/disabling-jarhell-for-plugins/104946/1 "2017-10-23T18:04:20Z")

</div>

I have a plugin which provides database access to initialize token filter  
terms and I am finally adding better testing.

Due to the fact that each database system provides different java client  
drivers, the build process is a bit more complicated since the driver  
dependency can change. For testing, I am using Apache Derby, which runs in  
a fixture which is run before the test integration cluster is started, as  
part of the current elastic build process. Unfortunately, Derby does not  
have a clean separation of its Java classes between the various libraries,  
causing jar hell.

I only need to disable jar hell while doing integration testing. I tried  
various combinations of:

jarHell.enabled = false  
tests.jarhell.check=false

integTestCluster {  
dependsOn fixtureTask  
setting 'jdbc.url', 'jdbc:derby://localhost:1527/derbyDB;create=true'

```
setting 'jarHell.enabled', 'false'
setting 'tests.jarhell.check', 'false'

```

}

but it seems like jar hell can no longer be bypassed. I only need to bypass  
for testing. I could shade, but it seems like an overkill for testing,  
especially since the jars will not be present in the final plugin zip file.

I also need to have the final plugin build task bypass integration testing  
since I need to not have the derby jars present. Better to run two commands  
instead of hacking together something that builds two different plugins  
during a single build process.

Cheers,

Ivan

---

<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:** [November 20, 2017, 6:05pm UTC](https://discuss.elastic.co/t/disabling-jarhell-for-plugins/104946/2 "2017-11-20T18:05:00Z")

</div>

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