Is there a way to force reindexing of Maven snapshots?

Hey, folks --

We have a large multi-module Maven project. The usual working style is to check out a few modules you're interested in, and for the other modules they depend on, use snapshot JARs provided by Maven.

This mostly seems to work; when we need updated snapshots, we just force a reimport from the "Maven Projects" tab. However, the reimported snapshots never seem to get reindexed.

Steps to reproduce:
     1. In one project, check out / configure a module that depends on a Maven snapshot of some other module.
     2. In a separate project, make a change to that other module, e.g. adding a method, and deploy it to the Maven repository.
     3. In the first project, update the snapshot.
     4. In the first project, write some code that calls the new method.

     - No trouble calling the new method.

     - Method call is redlined with "Cannot resolve method" error. However:
          - Code does compile (via the Build or context menu)
          - Code does run, including code that calls the new method

Is there some way aroudn this? It would be nice to get rid of the redline, have autocomplete etc. work, and in general be able to continue to use IDEA the way you're supposed to.

Possibly relevant: We have a mix of Eclipse and IDEA developers, and in order to work around some Eclipse/Maven integration bugs, we've set the snapshot updatePolicy to "never" in our pom.xml files. However, I would expect the IDEA setting (Snapshot update policy: Always update) to override this, unless I misunderstand what the setting does.

1 comment
Comment actions Permalink

I got this from support.

File | Invalidate Caches or delete USERPROFILE\.IntelliJIdeaXX\system.


Please sign in to leave a comment.