External Libraries do not update when changing Spring Boot Gradle plugin version

Answered

Hi everyone,

In my Gradle project, I recently updated the version of the Spring Boot Gradle plugin from 2.1.3-RELEASE to 2.5.0 Unfortunately, despite many refresh of the dependencies via the Gradle tab, the dependencies listed in the External Libraries section of the module do not update...


Then when I execute some tests, I got weird errors which seem to be linked to the presence of two different versions of AssertJ library.

gradlew -q dependencies --configuration testRuntimeClasspath

gives the right information about the AssertJ version (3.19.0) but Intellij is still stuck at 3.11.0

Could someone here help me to fix this?

Environment:

  • Microsoft Windows [version 10.0.19041.1052]
  • WSL 2 / Ubuntu
    • Linux 5.4.72-microsoft-standard-wsl2
  • IntelliJ IDEA 2021.1.3 (Ultimate Edition)
    • Build #IU-211.7628.21, built on June 30, 2021
    • Runtime version: 11.0.11+9-b1341.60 amd64
    • VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.

Thanks for taking time reading me and for your answers

Eric

0
10 comments

Please share a sample project, either via GitHub link or via https://uploads.jetbrains.com. Also provide the logs: Help | Collect Logs and Diagnostic Data.

0

Hi Serge Baranov
I guess it's because we're Friday night:

  • Collecting Logs and Diagnostics Data don't do anything visible
  • Creating a Java sample projet of Gradle type does not create typical directories tree

Even after invalidating the cache and restart, there is no improvement.

On WSL2 console, one can see:

2021-07-09 19:43:27,156 [  57925]   WARN - j.ide.actions.RevealFileAction - Failed to show URI:file:/home/erict/.cache/JetBrains/IntelliJIdea2021.1/log/
java.io.IOException: Failed to show URI:file:/home/erict/.cache/JetBrains/IntelliJIdea2021.1/log/
at java.desktop/sun.awt.X11.XDesktopPeer.launch(XDesktopPeer.java:124)
at java.desktop/sun.awt.X11.XDesktopPeer.open(XDesktopPeer.java:87)
at java.desktop/java.awt.Desktop.open(Desktop.java:429)

I will go back on this on Monday
Eric

0

See https://intellij-support.jetbrains.com/hc/en-us/articles/207241085 if automatic logs collection doesn't work.

Your IDE installation is likely corrupted, the following steps should help: https://intellij-support.jetbrains.com/hc/en-us/articles/360007568559.

0

OK, it looks like I will have to reinstall IntelliJ before moving forward on this issue.
Thanks, I'll keep you posted

0

If the issue persists, idea.log would contain more details about the problem. Please share it via https://uploads.jetbrains.com.

0

I reinstalled the last version of IntelliJ (idea-IU-211.7628.21) on my WSL distribution yesterday, in a brand new directory. The old one has been removed, I didn't know if I should do something else a have a fresh install.
Unfortunately, the problems are still there:

  1. External dependencies shown by IntelliJ on my Gradle project are stucked to the version before the update of the build script;
  2. With a new Gradle projet, no src folder with main and test subdirectories is created
  3. I cannot collect logs via the IDE, I guess it's a display/X11 issue related to the use of WSL2

I uploaded the logs - Upload id: 2021_07_13_TdUYW1ji8RdmfgeG (file: idea.log) - I hope this will help
Éric

0

Project creation seems to be fine with a Maven project

0

I see exceptions similar to ones in https://youtrack.jetbrains.com/issue/IDEA-248273 issue. Also some exceptions from Scala plugin.

Can you please try with Scala plugin disabled and/or re-import project and recreate its configuration (delete existing .idea directory and open it via File | New | Project from Existing Sources action).

Do I understand correctly that the project can be built by Gradle from command line successfully?

If problem remains could you attach fresh idea.log file after reproducing this scenario:

>With a new Gradle projet, no src folder with main and test subdirectories is created

Thanks.

1

Hello Andrey Dernov
That was an excellent suggestion! I disabled the Scala plugin, then deleted both .idea directory and .iml file and after I recreated all the project from the existing sources. It worked. I have now the right Spring Boot dependencies in the « External Libraries » section of the project. Great!
The scenario regarding the new Gradle project creation was independant from the first (I discovered it when trying to create a sample for Serge). It seemed to be related because src folder is created now.
I uploaded a fresh idea.log (Upload ID: 2021_07_13_PsM8MSxMd4S3JSbX) so you can look at it and show what is different.

Many thanks to you guys at JetBrains for taking time with my question

Éric

0

Thanks for the information. No exceptions from Gradle import now. I guess that was the main cause of the problems with import.

0

Please sign in to leave a comment.