# Error in Gradle Build

**URL:** <https://forum.katalon.com/t/error-in-gradle-build/53299>\
**Category:** Web Testing\
**Tags:** katalon-studio\
**Created:** [March 24, 2021, 6:45pm UTC](https://forum.katalon.com/t/error-in-gradle-build/53299 "2021-03-24T18:45:03Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![andrew.block](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/andrew.block/32/16104_2.png) [@andrew.block](https://forum.katalon.com/u/andrew.block)\
**Post date:** [March 24, 2021, 6:45pm UTC](https://forum.katalon.com/t/error-in-gradle-build/53299/1 "2021-03-24T18:45:03Z")

</div>

I’ve been building a plugin using Gradle, and in the past it has worked successfully. This is the instructions I’ve followed below:

[katalon-studio-platform/create-plugin-using-gradle.md at master · katalon-studio/katalon-studio-platform (github.com)](https://github.com/katalon-studio/katalon-studio-platform/blob/master/docs/turorials/create-plugin-using-gradle/create-plugin-using-gradle.md)

In the past this has been able to successfully build, but lately I’ve been getting an error:

**Could not find any version that matches javax.annotation:javax.annotation-api:[1.3.5,2.0.0).**  
**Versions that do not match:**  
\*\* - 1.3.2\*\*  
\*\* - 1.3.1\*\*  
\*\* - 1.3\*\*  
\*\* - 1.2\*\*  
\*\* - 1.2-b04\*\*  
\*\* - + 3 more\*\*  
**Required by:**  
\*\* project : \> com.katalon:com.katalon.platform:1.0.6 \> org.eclipse.platform:org.eclipse.e4.core.contexts:1.5.1 \> org.eclipse.platform:org.eclipse.e4.core.di:1.7.700\*\*

**Possible solution:**  
\*\* - Declare repository providing the artifact, see the documentation at [https://docs.gradle.org/current/userguide/declaring\_repositories.html\*\*](https://docs.gradle.org/current/userguide/declaring_repositories.html**)

It seems that some version of something has been updated, but I’m not sure what it was. Any way to get this to successfully compile would be helpful.

---

<div class="post-metadata">

**Author:** ![kazurayam](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/kazurayam/32/333_2.png) [@kazurayam](https://forum.katalon.com/u/kazurayam)\
**Post date:** [March 25, 2021, 2:10am UTC](https://forum.katalon.com/t/error-in-gradle-build/53299/2 "2021-03-25T02:10:01Z")

</div>

I confirmed that [katalon-studio-platform/create-plugin-using-gradle.md at master · katalon-studio/katalon-studio-platform (github.com)](https://github.com/katalon-studio/katalon-studio-platform/blob/master/docs/turorials/create-plugin-using-gradle/create-plugin-using-gradle.md) does not build at all. I saw the following message in console.

```auto
$ gradle build

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileJava'.
> Could not resolve all files for configuration ':compileClasspath'.
   > Could not find any version that matches javax.annotation:javax.annotation-api:[1.3.5,2.0.0).
     Versions that do not match:
       - 1.3.2
       - 1.3.1
       - 1.3
       - 1.2
       - 1.2-b04
       - + 3 more
     Searched in the following locations:
       - https://repo.maven.apache.org/maven2/javax/annotation/javax.annotation-api/maven-metadata.xml
       - https://jcenter.bintray.com/javax/annotation/javax.annotation-api/maven-metadata.xml
     Required by:
         project : > com.katalon:com.katalon.platform:1.0.6 > org.eclipse.platform:org.eclipse.e4.core.contexts:1.5.1 > org.eclipse.platform:org.eclipse.e4.core.di:1.7.700

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 1s

```

* * *

> [@andrew.block](#):
>
> **Required by:**  
> \*\* project : \> com.katalon:com.katalon.platform:1.0.6 \> org.eclipse.platform:org.eclipse.e4.core.contexts:1.5.1 \> org.eclipse.platform:org.eclipse.e4.core.di:1.7.700\*\*

I checked the dependency of `org.eclipse.platform:org.eclipse.e4.core.di:1.7.700` at [https://repo1.maven.org/maven2/org/eclipse/platform/org.eclipse.e4.core.di/1.7.700/org.eclipse.e4.core.di-1.7.700.pom](https://repo1.maven.org/maven2/org/eclipse/platform/org.eclipse.e4.core.di/1.7.700/org.eclipse.e4.core.di-1.7.700.pom) where I found the following fragment:

```auto
<dependency>
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
<version>[1.3.5,2.0.0)</version>
</dependency>

```

Yes, `org.eclipse.platform:org.eclipse.e4.core.di:1.7.700` declares its dependency on `javax.annotation:javax.annotation-api` version [1.3.5, 2.0.0). This means `com.katalon:com.katalon.platform:1.0.6` transitively depends on `javax.annotation:javax.annotation-api` version [1.3.5, 2.0.0).

But I could not find the `javax.annotation:javax.annotation-api` version [1.3.5, 2.0.0) anywhere on the Internet. I suppose that **`javax.annotation:javax.annotation-api` version [1.3.5, 2.0.0) does not exists in the world at all now**.

According to the [Maven Central page](https://mvnrepository.com/artifact/org.eclipse.platform/org.eclipse.e4.core.di/1.7.700), the org.eclipse.e4.core.di/1.7.700 was released in March 2021 just recently.

I checked the pom of the previous version “org.eclipse.platform:org.eclipse.e4.core.di:1.7.600” [here](https://repo1.maven.org/maven2/org/eclipse/platform/org.eclipse.e4.core.di/1.7.600/org.eclipse.e4.core.di-1.7.600.pom) which as release Junn 2020. I found, 1.7.600 does NOT depend on the javax.annotaiton API!

So I believe that the org.eclipse.platform:org.eclipse.e4.core.di:1.7.700 is problematic. Careless mistake?

I wanted to download the source code of org.eclipse.platform:org.eclipse.e4.core.di project and try building it on my machine. But I could not find it. I can do no more.

---

<div class="post-metadata">

**Author:** ![kazurayam](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/kazurayam/32/333_2.png) [@kazurayam](https://forum.katalon.com/u/kazurayam)\
**Post date:** [March 25, 2021, 2:14am UTC](https://forum.katalon.com/t/error-in-gradle-build/53299/3 "2021-03-25T02:14:16Z")

</div>

I checked the dependency of com.katalon.platform:1.0.6 at [https://github.com/katalon-studio/katalon-studio-platform/blob/master/pom.xml](https://github.com/katalon-studio/katalon-studio-platform/blob/master/pom.xml). There found a line:

```auto
 <org.eclipse.e4.ui.di.version>1.1.100</org.eclipse.e4.ui.di.version>

```

It seems that Katalon programmers intended to fix the version of org.eclipse.e4.ui.di.version to 1.1.100. This intension is in Maven way (= nearest first strategy).

But, despite their intension, acutually org.eclipse.e4.ui.di.version:1.7.700 was refered to, and it caused [katalon-studio-platform/create-plugin-using-gradle.md at master · katalon-studio/katalon-studio-platform (github.com)](https://github.com/katalon-studio/katalon-studio-platform/blob/master/docs/turorials/create-plugin-using-gradle/create-plugin-using-gradle.md) unable to build at all.

Here is a version conflict caused by transitive dependency.

---

<div class="post-metadata">

**Author:** ![kazurayam](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/kazurayam/32/333_2.png) [@kazurayam](https://forum.katalon.com/u/kazurayam)\
**Post date:** [March 25, 2021, 3:09am UTC](https://forum.katalon.com/t/error-in-gradle-build/53299/4 "2021-03-25T03:09:21Z")

</div>

@ThanhTo  
@duyluong

I hope Katalon team to resolve this dependency version conflict in Gradle.

As documented [here](https://docs.gradle.org/current/userguide/dependency_resolution.html), Gradle takes a strategy for resolving dependency conflict different from Maven:

> Gradle will consider _all_ requested versions, wherever they appear in the dependency graph. Out of these versions, it will select the _highest_ one.

Then how to solve? — well I do not know yet.

I wonder if the [Eclipse e4 incubating project](https://www.eclipse.org/e4/) is stable enough or not. If not, being dependent on it is risky isn’t it?

Or someone in Katalon Team to raise a bug report for the org.eclipse.e4.ui.di.version:1.7.700 and to ask Eclipse team to fix it.

edit:  
javax.annotation-api was succeeded by jakarta.annotation-api which has released version [1.3.5,2.0.0)  
See [this post](https://stackoverflow.com/questions/22589302/where-is-javax-annotation)

Possiblly the developer of org.eclipse.e4.core.di:1.7.700 made a mistake; he intended to select the jakarta.annotation-api [1.3.5, 2.0.0) but mistakenly wrote javax.jannotation-api [1.3.5, 2.0.0) which does not exist.

---

<div class="post-metadata">

**Author:** ![duyluong](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/duyluong/32/1116_2.png) [@duyluong](https://forum.katalon.com/u/duyluong)\
**Post date:** [March 26, 2021, 4:26am UTC](https://forum.katalon.com/t/error-in-gradle-build/53299/5 "2021-03-26T04:26:18Z")

</div>

@kazurayam

We will take a look into this issue. There was a similar report but for the maven build: [Can't package my-first-katalon-plugin](http://forum.katalon.com/t/cant-package-my-first-katalon-plugin/53085/3)

---

<div class="post-metadata">

**Author:** ![cmatthews](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/cmatthews/32/16104_2.png) [@cmatthews](https://forum.katalon.com/u/cmatthews)\
**Post date:** [April 14, 2021, 8:33pm UTC](https://forum.katalon.com/t/error-in-gradle-build/53299/6 "2021-04-14T20:33:54Z")

</div>

@duyluong has there been any progress on this issue? What is its status?

Edit: I saw your reply on the other thread… Looks like this has been remedied. 🎊

> Please use **com.katalon.platform.parent** and **com.katalon.platform** version 1.0.17
