Where is the Maven synchronize button??

Hi there,

I'm using the new 7860 EAP version, and I'm checking out the new maven background synchronization, and I really like it! It doesn't block my IDE anymore, and I can continue to work and don't drink coffee so much!

I do have on question however: where is the synchronize button? I now have a button which is called 'Re-import maven projects', but I have more than 50 "projects" (it's actually one project, split into modules, split into modules...) open, and Re-importing takes quites some time (and this is especially annoying, since, well, it isn't done it the background...:)) . So, I'm sure I'm missing something here, but I have a hard time finding the previous (7.0.3) synchronize button!

Thanks for your hard work! I really appreciate it! IntelliJ just got (another) 10 times better!

10 comments
Comment actions Permalink

Hi, Erik,

The "Synchronize" button was simply renamed to "Re-import" to reflect its real meaning. Probably it must be something else. As for "synchronize", I had been pointed that it usually means two-way process; and we have only one-way process here, thus it is a bad idea to name it "synchronize".

As for speed, I'm looking for ways to improve it. The problem is that it is necessary to read all the projects in order to resolve all properties and dependencies correctly.

What do you use synchronization, in general, for? It is probably possible to improve it some other way, depending on the use case.

Thanks,
Anton Makeev

0
Comment actions Permalink

Hi Anton,

Thanks for the quick reply. The most common thing I use it for is synchronzing (that's what I call it) my dependencies between Maven and IntelliJ. I can imagine I need an initial import of all the files, but to reparse all the files on each synchronize seems like a bit of an overkill. I thought that maybe it would be possible to keep track of the kind of changes in the poms. For example, if a dependency was added or removed, don't reparse all the files which aren't changed, but just download that dependency (which, in Maven terms, probably means: try to download all the dependencies in the changed pom. Fine by me).

About the naming: to me, importing seems like something you do once. When I first started up the new EAP of IntelliJ, IntelliJ claimed that it didn't know if this was a maven project. So the import is done, and all the poms where found. Great! But now, when I synchronize IntelliJ's classpath with the Maven dependencies, I have to Re-Import my poms to synchronize, right? At least, that's what the button says, and I haven't found a different way. Maybe the button should be called: "Update IntelliJ's classpath with Maven dependencies" or something, if that's what it does. Synchronize also does it for me, at least it's clear, but I hadn't noticed the reparsing of the Poms in the previous version, which is something which takes a long time.

Btw: it would be nice if you could make it a two way process. Sometimes I have multiple modules in IntelliJ, say module A and module B. Module A should depend on module B, eg when using a class which is in module B. IntelliJ does allow to add a dependency on the project, but it would be great if it could add a Maven dependency to the pom (now, I have to add it manually, "synchronize" Maven, and add it this way.)

0
Comment actions Permalink

Could you take a CPU snapshot of the re-import process and send it to me?

0
Comment actions Permalink

How about calling synchronize /re-import . . . Mirror or Mirroring
The term is used in the same way as website mirroring content.

I would suggest that dependencies can only be set in Maven or IntelliJ NOT both.
That the ability to Edits IntelliJ dependencies/libraries be disabled as long as mirroring is in effect.

-Rob

0
Comment actions Permalink

I agree. By far (like 95% of the time) the most common change I make to my pom files is to add or modify a dependency. It would be nice if there was a way to sync the maven dependencies with Idea's without doing a full import.

0
Comment actions Permalink

I use "re-import" whenever:
- dependencies have changed
- modules have been added/removed

Is there another action (apart from "re-import") that I could use in these cases?

My problem is that "re-import" is incredibly slow. It takes about half an hour for my 70+ modules project. All I really want is something similar to "mvn eclipse:eclipse", which takes less than a minute. Unfortunately, mvn idea:idea doesn't seem to be compatible with IDEA 7. Or is it? Couldn't get it to generate correct project files.
When I run "re-import", it loops through all modules and checks for new versions of some Maven-internal dependencies (maven-settings, maven-project, etc.), again and again and again. On the other hand, it doesn't check for new versions of the dependencies listed in the module POMs. Isn't this strange? Also, why is the dialog shown during re-import titled "Generate sources"?

By the way, I'm using IDEA 7.0.4 final.

0
Comment actions Permalink

Peter, please take a look at http://www.intellij.net/forums/thread.jspa?messageID=5221411&#5221411.
I've explained some concepts there.

0
Comment actions Permalink

Thanks for the link. Is it possible to get something as fast and simple as "mvn eclipse:eclipse" for IDEA 7? I can't afford to wait half an hour re-importing the project every time a module is added or removed. (Because IDEA's Maven integration is so slow and troublesome, most of my colleagues currently use "mvn eclipse:eclipse" and then import the generated Eclipse project(s) into IDEA. But I refuse to accept that this is the best way to create an IDEA project from a POM.)

Cheers,
Peter

0
Comment actions Permalink

Peter,

Is your project open-source? If not, can I have your pom files for testing and improving the performance? If you have performance problems, I can take a look what can be done to improve the situation.

However, for many reasons, IDEA takes many additional steps to provide correct project configuration. This includes conflict and missing artifacts resolution, facets detection and configuration, additional source folders discovering and so on.

Thanks,
Anton Makeev

0
Comment actions Permalink

Unfortunately our project is closed-source and I'm not allowed to give away our POMs.
Have you ever tested IDEA's Maven integration with a BIG maven project (say 100 modules with 10-20 explicit dependencies each)? It seems to me that IDEA simply can't cope with projects of this size.
One thing that might help a lot is if I could just update a single module instead of the whole project. Or is this already possible now?

Cheers,
Peter

0

Please sign in to leave a comment.