# Code Contribution - cannot import into IntelliJ

**URL:** https://discuss.elastic.co/t/code-contribution-cannot-import-into-intellij/274187
**Category:** Elasticsearch
**Created:** [May 27, 2021, 11:10am UTC](https://discuss.elastic.co/t/code-contribution-cannot-import-into-intellij/274187 "2021-05-27T11:10:51Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![VJvaLbhYbfr](https://avatars.discourse-cdn.com/v4/letter/v/7cd45c/32.png) [@VJvaLbhYbfr](https://discuss.elastic.co/u/VJvaLbhYbfr)
#### Post date: [May 27, 2021, 11:10am UTC](https://discuss.elastic.co/t/code-contribution-cannot-import-into-intellij/274187/1 "2021-05-27T11:10:52Z")

</div>

Hello everyone,

I wanted to contribute to Elastic project. I did read `CONTRIBUTING.md` and followed it both on Ubuntu 20.04 (in VirtualBox) and on Windows 10.

Ubuntu 20.04:  
Importing project into IntelliJ (version 2021.1.1 Community Edition) doesn't end with an error, but there are compliation errors almost in every single `build.gradle` files on `import xyz.xyz` lines (example - `Cannot resolve symbol 'ForbiddenApisPlugin'`).

Affected imports are from almost every package but `org.gradle.*`, `java.*`.

Trying to run app from terminal with `./gradlew :run` works perfectly fine. Problem is only in IntelliJ.

What I did to try to solve it:

- I did remove JDK from Project Settings and readded it (it's named 15, and it's OpenJDK's release of Java 15)
- invalidate caches in IntelliJ
- manually clear ~/.gradle/cache folder
- `Reload Gradle Project` in IntelliJ
- `Reload All Gradle Projects` in IntelliJ
- `Refresh Gradle Dependencies` in IntelliJ
- `./gradlew clean :run`
- I tried both Gradle runtimes - `Specified location` (which is version 7.0.2) and `'gradle-wrapper.properties' file` in IntelliJ
- for `Gradle JVM` I tried both version `15` and `16` (yes, it should be `15` only, but I did it, because maybe... 😉 )
- `git clean -xfd` and importing project many times, not only with `File/Open...` pointing to `build.gradle`, but in a few other ways as well

Windows 10:  
Out of curiosity I tried importing it into IntelliJ on Windows. Importing fails with message:

```auto
Build file 'D:\elasticsearch\build.gradle' line: 31

Plugin [id: 'elasticsearch.docker-support'] was not found in any of the following sources:

* 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.

```

I tried to `gradlew.bat :run` it in CLI, but it ended with the same error:

```auto
D:\elasticsearch
elasticsearch>gradle clean :run

FAILURE: Build failed with an exception.

* Where:
Build file 'D:\elasticsearch\build.gradle' line: 31

* What went wrong:
Plugin [id: 'elasticsearch.docker-support'] was not found in any of the following sources:

- Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
- Plugin Repositories (plugin dependency must include a version number for this source)

* 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 9s

```

I mainly work on Ubuntu, so I invested more time into fixing it than the Windows version. But, to be honest, I kinda ran out of ideas.

Does anyone have an idea how to fix it? Or maybe ran into similar problem?

---

<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: [June 24, 2021, 11:11am UTC](https://discuss.elastic.co/t/code-contribution-cannot-import-into-intellij/274187/2 "2021-06-24T11:11:05Z")

</div>

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