importing maven project automatically on 2020.1 EAP

已回答

I noticed that updating a pom.xml dependency does not trigger or ask for auto-importing anymore.

The related setting has also disappeared from Build Tools > Maven > Importing

 

My setup:

IntelliJ IDEA 2020.1 EAP (Ultimate Edition)
Build #IU-201.3803.71, built on January 24, 2020
IntelliJ IDEA EAP User
Expiration date: February 23, 2020
Runtime version: 11.0.5+9-b674.2 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.14.6
GC: ParNew, ConcurrentMarkSweep
Memory: 1979M
Cores: 16
Registry:
Non-Bundled Plugins: Lombook Plugin, org.toml.lang, org.rust.lang

4

This is by design. IDE now automatically handles all cases with importing Maven/Gradle projects, please see related blog post announcement.

Do you notice any issues with it?

1

Thanks for pointing to the blog post, that answers my question.

I am getting an error when resolving a parent pom version on the IDE editor, while the dependency is resolved correctly during the maven build. This may be unrelated, I need to double check with the stable IDEA version.

0

Try Reimport All Maven Projects action in Maven tool window. If problem remains a sample project to reproduce would be very nice to have. For uploading you can use ftp://ftp.intellij.net/.uploads / https://uploads.services.jetbrains.com or any file sharing service.

0

I can confirm that maven import no longer runs automatically in 2020.1 BETA

2

Ive also noticed that auto-import doesn't seem to work anymore - I have to manually click the new (?) maven icon that pops up on the editor before changes to dependencies get picked up. Latest EAP as of 3/24/2020

1

I removed everything called "idea", "jetbrains" and "intellij" from my SO, did a fresh install of 2020.1, and maven auto import is not working as well, unless I click on that balloon.

From the website there's this statement: "Every aspect of IntelliJ IDEA has been designed to maximize developer productivity.".

I don't think moving the mouse to reach that small balloon every time I change maven dependencies maximizes developer productivity over the old auto import feature.

```

IntelliJ IDEA 2020.1 (Community Edition)
Build #IC-201.6668.121, built on April 8, 2020
Runtime version: 11.0.6+8-b765.25 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Linux 5.4.31-1-manjaro
GC: ParNew, ConcurrentMarkSweep
Memory: 1917M
Cores: 12
Non-Bundled Plugins: CheckStyle-IDEA, com.dubreuia
Current Desktop: GNOME
```

3

Since 2020.1 version IDEA will perform auto-reimport only for consistent state of Maven's pom.xml files (e.g., after VCS change or branch switch).
When a user edits pom.xml files manually, IDEA will not start new import until user all required modifications and presses balloon button. IDEA can not know if all required changes are made unless explicitly notified via button.

0

I hope I am misunderstanding something, but this doesn't work very well.  I never had a problem with auto-import of maven projects as it was previously implemented.  I understand that Intellij does not know when I am through editing the pom.  But when I press the balloon button, it thinks it needs to re-import all the maven projects, not just the one I have edited.  And since I have many projects, this is very time consuming.  Before it was fairly fast, even though maybe it was re-importing every time I made a small edit.

1

>But when I press the balloon button, it thinks it needs to re-import all the maven projects, not just the one I have edited.  

This logic has never changed. Do you notice change in this behaviour after the update to 2020.1? Can you elaborate more about what you observe? If there is indeed a problem it might work creating a separate issue about it for some details. Thanks.

0

I have a project with 90 modules.  When I edit one of the poms, I see the balloon popup.  After I am done editing, I click on this popup to re-import the pom.  But instead of just re-importing the single pom I have edited, it appears to be re-importing the poms for all the modules in my project.  On the status line I definitely see it re-importing other modules because there are multiple messages like "resolving dependencies for xyz", and I have not edited the xyz pom.  The balloon seems to be the equivalent of opening the maven window and clicking on the "re-import all" button at the top.  Because I have 90 modules, this takes a long time.  What I now do as a work-around is to right click on the module in the project list and select maven/reimport.  This only reimports that single module and is much faster.  That's what I expected the balloon to do.

Prior to 2020.1 I always enabled auto-import of maven poms.  This was removed.  I don't recall the balloon popup being there before 2020.1.  So it is not a change in behavior.  It is a new feature that does not work as well for me as the feature it replaced.

I realize there are people complaining about auto-import jumping in before they are done editing.  I did not find that a significant problem.  They always had the option of turning that off and re-importing manually if they didn't like the behavior.  I liked the behavior.  But I no longer have the option of turning it on.

But I don't want to complain too much.  I love the product, and I have a work around.  It's just not automatic, and not as convenient.

3

One more thing to think about.

One more thing you can forget.

One more thing that makes IntelliJ worse.

If you are that afraid of incomplete changes, how about binding the reload to leaving the tab or something?

3

Thank you, for the suggestion, it is interesting. Though I'm not sure that switching to different file from pom.xml would necessarily indicate that user has ended with editing the pom.xml file.

0

Just wanted to add my comments. I too would prefer a "Auto" Import instead of having to click the icon. Since I usually use Gradle I did not know about clicking on the icon as I always used "Auto Import" there. I got put on an existing Maven project and it was not obvious to me at first that you had to click the icon to enable the import. Not really a big deal now that I know about it. But the automatic way is always easier.

That said I dig IDEA! It's certainly worth what I pay for it and saves me a ton of time every day. Also appreciate the activity staying current on these forums.

Keep up the good work!

1

It's very annoying that the auto import setting was removed.

We update our own dependencies quite often and most of the time I forget to import the pom.xml

1

Please bring back auto-importing functionality for maven projects. You've made it worse after removing it!!

6

We are going to provide 3 options for importing Maven/Gradle/SBT projects in scope of https://youtrack.jetbrains.com/issue/IDEA-238567 issue. Please feel free to give your feedback and let us know what you think in this issue. Thank you.

0

Also will confirm that the auto-import behavior no longer works, this has been extremely frustrating. The auto-import behavior that I've used for the last 7 years worked as intended, it is not an improvement to have to manually refresh imports every time. This has caused so much frustration over the last couple months and it's disappointing to find out that this change was made intentionally.

0

Not even the prompt asking importing project upon change to POM appears anymore. I'm already wasting lot of time trying to figure out why my change is not applied! Frustrating.

1

I wasted so much time looking for the reason for the "non-working" reimport.

Intellij, this was not a good decision. Please, add a configuration option that brings back the auto reimport.

I love Intellij, as it makes me more productive, but this new "feature" definitely does not.

0

Bring back auto import! Make it configurable if needed.

1

2020.1.2 version brings auto-import option back:

The RC build is already available here.

6

Hi,

I was dealing with a project that needed to be checking dependencies very constantly and I did not understand why I could not do import if I was already in the pom maven, after many many many hours I discovered that I had to do
>> Invalidate Caches and Restart
But that meant refreshing all my open projects by each new dependency,I would like to go back in time and know that this was happening because I had a really urgent deploy =(, until today I find this blog that indicates that this functionality no longer exists, I really liked it when it was automatic and it was one of the things I loved about intellij, that it was something transparent and automatic, hopefully reconsider return the functionality please
=(

0

This functionality exists in the current releases, please see https://stackoverflow.com/a/43192764/104891 (applies to both Maven and Gradle).

0

Yeiiii !!! thanks a lot !

0

请先登录再写评论。