6

I noticed, that mvn -U idea:idea is marked as retired.

What is the replacement for that? Because, and maybe I'm doing something wrong, this is the most important functionality of IDEA IDE. From once per week to several times a day something happens, and 'the universe stop making any sense'.

Constructors are not being called, breakpoints aren't hit, etc. etc. Restarting/clearing caches/refreshing maven project/anything I know about and does not help ...

Only calling mvn -U idea:idea in question cures this IDEA and we're back to normal.

Questions:

  • a) is there a replacement for mvn -U idea:idea we should use instead?
  • b) is there a different way to stop idea harming itself?

Most probably this issues would be related to somewhere outside of clearable cache, holding old versions of dependencies and using them violating pom.xml etc.

This somehow survives externally called mvn clean, cache clearing, restarts... Any ideas on how to treat this issue would be also welcomed.

CrazyCoder
  • 389,263
  • 172
  • 990
  • 904
Martin Mucha
  • 2,385
  • 1
  • 29
  • 49
  • For eclipse, I read that people destroyed their projects by calling legacy mvn eclipse goals. It might be that you project is seriously broken from your idea:idea calls... – J Fabian Meier Mar 13 '19 at 12:54

2 Answers2

1

Import the project from pom.xml, Reimport in the Maven projects tool window when needed or use the auto import option.

If you have any issues, perform the diagnostics and check the logs as described in this answer, submit a bug with the reproducible test case so that it can be fixed once and forever for your specific use case.

CrazyCoder
  • 389,263
  • 172
  • 990
  • 904
  • 1
    about all suggestions: reimport does not solve anything, lots of memory, no crashing, no errors in logs. Cannot submit project for which idea fails repeatedly. Thus having actually nothing in hands to create bug report from. – Martin Mucha Mar 13 '19 at 09:01
  • @MartinMucha No reproducible test case for such problems usually means no fix, sorry. – CrazyCoder Mar 13 '19 at 09:03
  • 1
    I do understand that. That's why I asked what's the correct replacement for idea:idea goal. As this fixes the idea issues. Actually I don't even know what exectly this goal does... – Martin Mucha Mar 13 '19 at 09:13
  • @MartinMucha it does the same as `gradle idea`, generates IntelliJ IDEA project files. [This answer](https://stackoverflow.com/a/42518961/104891) describes why it's not recommended to use it. – CrazyCoder Mar 13 '19 at 09:17
0

Reading from the maven plugin page:

org.apache.maven.plugins:maven-idea-plugin:2.2.1:idea Description: Goal for generating IDEA files from a POM. This plug-in provides the ability to generate project files (.ipr, .iml and .iws files) for IDEA.

Solution: you can replace it with manual steps: delete al .iml .ipr .jws files . Than reimport the project in IDEA

PS: do not know why it is retired(maybe they think it has no bugs anymore :) )