No maven full sync button in new UI

Answered

I got my intellij updated to 2024.2 with the new UI.

It seems that the only way to do a full sync is find the build window and click on the full sync button? 

It's pretty cumbersome i do it pretty often. 

Also it seems there is no way to add the maven stuff to the top bar anymore, is this deliberate?

1
12 comments

Hello, Mathias!

Thank you for reporting this!

Full Maven Sync can be started from the Build Tool Window, as you correctly pointed out, and with a hotkey assigned via the Keymap. We are, however, looking to fine-tune the UI in regards to Full  / Incremental Sync availability, so that may change in future versions of IDEA.

There is a known issue with adding the Maven Actions to the Main Toolbar, which we are looking to address.

I would also appreciate if you could share more details about the workflows that require the Full Sync.

0

Hi Roman Vatagin 

We've experienced something similar in our organisation (~ 500 people) and its been a bit frustrating. We have a fairly large monorepo of ~15m LoC, with >200 maven modules and have an enterprise license. 

We define our dependency versions for the whole application in a <dependencyManagement> block within a maven module containing several of our ‘application-wide’ aggregator pom files in a nested structure. It wouldn't be typical for a developer to need to import this module into their workspace unless they're making dependency changes. 

We frequently run into the incremental resolve failing to trigger any activity at all after being clicked, even when there has been a genuine change. Our speculation is that because version number changes are happening ‘outside’ the workspace, in a pom that is resolved via a .jar file held in the .m2 cache, IntelliJ is unable to detect that a sync is required. 

Aligning the button in the maven panel and the build menu would certainly get a thumbs up from us, or alternatively, a button for the full sync alongside it. It's a little inconvenient to have to direct developers towards a manual keybinding.

Thanks!

0

Colin Hulme Thank you for sharing!

We've made a number of improvements to Maven Sync in recently released IDEA 2024.3 - I would encourage you to give it a try and if any of the issues persist, please let me know which exact scenarios that cause them (i. e. what changes are being made to the pom.xml, that are not being picked up by the Sync), so I can reproduce them and address the issue.

0

You could argue that this is similar to force quitting apps on IOS. Apple claims that noone should ever force quit an app, that the system handles all situations.

In practice, it is well known that sometimes you have to anyway, apps get stuck, are coded in such a way that you have to reinit them to make them work.

If nothing else it “feels” good to know that you can do things as a last resort. Call it superstition if you really think that your new intelligent sync function will always work 100% forever :)

0

Mathias,

I understand and agree with that logic and we are not planning to remove the original Sync from IDEA in the foreseeable future.

The action originally called “Sync” will now be called “Reload” as this name better represents what it actually does and will remain available in the Maven Tool Window.

The new Sync is intended to be faster, more efficient and more intelligent, that should allow it to cover all of the common changes in pom.xml, while Reload can be used for more complex cases or if you are looking to “reset” IDEA's Project Model.

0

Sounds great, and i'm sure i won't have to press it often, if ever.

0

Roman Vatagin i just logged https://youtrack.jetbrains.com/issue/IDEA-377535/Branch-switch-should-not-trigger-Maven-repository-update and I'm wondering what exactly will the new “reload” entail? Does a reload attempt to resolve snapshots from the configured repositories?

0

Hi Delany,

Reload all projects’ button triggers the project import process. 

You can refer to this help article for more information on what actually happens during project import.

0

Thanks Arina. From the current documentation is looks like sync is simply a subset of reload. Reload ensures that all pom files are parsed and the project model updated. Sync does the same thing, but incrementally, based on whether files have changed. Sync MAY do everything reload does.

The comment above that sync will now be called reload makes no sense since we already have both

The page https://www.jetbrains.com/help/idea/delegate-build-and-run-actions-to-maven.html#reload_all_projects

conflates the terms “When you initially open your project, IntelliJ IDEA performs the full sync (reload).”

At this point I only really care about preventing the IDE from triggering network operations caused by re-resolving dependencies (without turning on the “work offline” setting, since that will block Maven from network operations).

Maybe once Maven 4 is released that will be a better time to nail down terms and meanings.

0

Delany Allow me to clarify:

Reload All Maven Projects option forces IDEA to read and parse all of the POMs with the Projects. As the result full Project's configuration will be collected and imported into IDEA.

Sync All Maven Projects is intended to be more precise and efficient. It detect which sections of POM(s) the changes have been made to and only updates the relevant parts of Project configuration. In some cases this can provide a significant performance increase.

In this specific case:

preventing the IDE from triggering network operations caused by re-resolving dependencies

Sync All Maven Projects might be helpful: if the changes made are not affecting the dependencies, Sync (unlike Reload) should not trigger the dependencies resolution process. 

 

1

Thanks that does clarify things. I guess the challenge is knowing when to press sync. I cant imagine when I'd want to do that. The plugin configuration almost never changes - certainly less than the dependency tree.

0

Delany The way it is designed, you should always use Sync. Sync can process all changes to Project configuration, including the dependencies changes. The idea behind it is that it can be a lot more efficient in certrain scenarios.

Reload should only be used if Sync does not provide the results you are looking for. 

0

Please sign in to leave a comment.