# Java API requires GPL code

**URL:** https://discuss.elastic.co/t/java-api-requires-gpl-code/292936
**Category:** Elasticsearch
**Tags:** language-clients
**Created:** [December 26, 2021, 1:02pm UTC](https://discuss.elastic.co/t/java-api-requires-gpl-code/292936 "2021-12-26T13:02:26Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Alain\_Desilets](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alain_desilets/32/29314_2.png) [@Alain\_Desilets](https://discuss.elastic.co/u/Alain_Desilets)
#### Post date: [December 26, 2021, 1:02pm UTC](https://discuss.elastic.co/t/java-api-requires-gpl-code/292936/1 "2021-12-26T13:02:26Z")

</div>

I would like to use the new Java API described here:

> **[Installation | Elasticsearch Java API Client \[7.16\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/client/java-api-client/current/installation.html)**

But when I include it in my pom and try to generate a JAR with all dependencies included, licensescan-maven-plugin tells me that there are two GPL dependencies:

[WARNING] - jakarta.json:jakarta.json-api:2.0.1:compile  
[WARNING] - org.eclipse.parsson:parsson:1.0.0:compile

Those dependencies were not there before, so I am assuming that they are introduced by the Elasticsearch-java jar.

My project is not allowed to use GPL code, so this is an issue. Is there a way to use the new Java API without including those two components?

Thx.

---

<div class="post-metadata">

### Author: ![Arun\_Nath](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/arun_nath/32/97607_2.png) [@Arun\_Nath](https://discuss.elastic.co/u/Arun_Nath)
#### Post date: [December 27, 2021, 6:42pm UTC](https://discuss.elastic.co/t/java-api-requires-gpl-code/292936/2 "2021-12-27T18:42:54Z")

</div>

Hi,  
Please check maven dependency tree and exclude the two transitive dependency from parent dependency .  
mvn dependency:tree : this command can be used .

---

<div class="post-metadata">

### Author: ![swallez](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/swallez/32/11972_2.png) [@swallez](https://discuss.elastic.co/u/swallez)
#### Post date: [December 29, 2021, 7:57pm UTC](https://discuss.elastic.co/t/java-api-requires-gpl-code/292936/3 "2021-12-29T19:57:06Z")

</div>

@Alain_Desilets these libraries are licensed under EPL-2.0 **OR** GPL-2.0 with Classpath-exception-2.0.

This is the new licensing scheme for all JakartaEE specifications and reference implementations (JakartaEE is the successor to JEE). See the projects at [Eclipse EE4J · GitHub](https://github.com/eclipse-ee4j)

So it's up to you to choose which of these two licences you want to use for your application. For commercial applications, EPL-2.0 (the Eclipse Public License) is the one you want.

You should tune the configuration of licensescan-maven-plugin so that it accepts this dual licensing.

---

<div class="post-metadata">

### Author: ![Alain\_Desilets](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alain_desilets/32/29314_2.png) [@Alain\_Desilets](https://discuss.elastic.co/u/Alain_Desilets)
#### Post date: [January 3, 2022, 2:11pm UTC](https://discuss.elastic.co/t/java-api-requires-gpl-code/292936/4 "2022-01-03T14:11:28Z")

</div>

Thx. That addresses my concern.

---

<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: [January 31, 2022, 2:11pm UTC](https://discuss.elastic.co/t/java-api-requires-gpl-code/292936/5 "2022-01-31T14:11:51Z")

</div>

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