IntelliJ 2020.1: Gradle Spring Boot project needs manual reimport after IntelliJ starts

Answered

Hi,

I have a Gradle Spring Boot project that I created with JHipster. Since I upgraded to IntelliJ 2020.1, I have the following problem: When I start IntelliJ, a Spring Boot run of my project uses the wrong configuration and the project fails to run. I then need to re-import my Gradle project manually. Afterwards, it works as it should. 

Here's the wrong start-up of my project. 

And here's the good one. I can tell immediately by the different banner:

I use IntelliJ 2020.1.1 on macOS 10.15.4. My Gradle project has "Automatic reload of external changes" enabled. But that feature didn't make a difference when it appeared in 2020.1.1.

Does anybody know how to fix this?


Regards,
Karsten Silz

0
7 comments

Can you share the whole command line in both cases? Do you have a sample project to reproduce that? I tried with https://github.com/jhipster/jhipster-sample-app, but all is working as expected here. 

0

I tried for about an hour to reproduce it, without luck. I used a JHipster sample application I wrote last week. That application does a "Gradle project import" upon start-up. My application does not. Here's a video demonstrating this issue.

0

Try move the ".idea" folder out of the project's root and reimport the project with the issue. Does it help? 

0

Good news: The error went away by itself. Not sure why.

I did clone the project a second time in Git. And the error didn't happen there.

So I chalk this up to "cruft collected in .idea folder". I did start my project with IntelliJ 2019 and then upgraded, migrating my settings along the way.

0

Konstantin Annikov The error is back with 2020.1.1 on every restart. Should I just nuke the ".idea" folder again? Or do you want me to send it to somebody for inspection?

0

As a general recommendation, enable Preferences | Build, Execution, Deployment | Build Tools | Gradle | Runner | Delegate IDE build/run actions to Gradle.

If it does not help, please send us a sample project where the issue could be reproduced by submitting YouTrack item: https://youtrack.jetbrains.com/issues

 

0

Konstantin Annikov I suppose you mean the setting "Build and run using: Gradle" (see screenshot below). It's always been set to "Gradle".

Unfortunately, the bug shows in a corporate project where I can't share the code with you.

 

0

Please sign in to leave a comment.