0

IntelliJ 2017.3

Basically what happens is the following:

  1. Create a new snapshot for a dependent library for your project.
  2. Open project structure and add new SNAPSHOT jar.

At this point everything works fine. IntelliJ recognizes the JAR, and able to load sources and classes.

Now, rebuild dependent SNAPSHOT (i.e you find a bug and correct it) SNAPSHOT created with the same name.

  1. Open project structure, remove 1st SNAPSHOT with bug.
  2. Add new SNAPSHOT with same name

NOw intelliJ doesnt' recognize it as a JAR file anymore and gives you the dialog "IDEA cannot determine what kind of files the item contains"

Choosing the classes option seems to work, however sources aren't loading and I can't debug into the new SNAPSHOT jar. If I choose jar directory option, it doesn't seem to recognize the new SNAPSHOT at all.

Is this a bug, or am I doing something wrong?

many thanks

brercia
  • 441

1 Answers1

0

Seems I found a temporary solution. If I choose option from File menu: Invalidate caches/restart

Then it works...

However feels like a very clunky solution to what I'd expect is a fairly common workflow. Is there a better way?

brercia
  • 441