HotSwap with Maven Run/Debug configurations


what is the right way to obtain a Maven based Run/Debug configuration that supports HotSwap?
So far I've been trying the following with mixed results:

  • Create a Maven Run/Debug configuration, with typically 'jetty:run-exploded' as goal and with a selected profile.
  • launch the config in Debug mode
  • modify some classes
  • do a Make Project (I don't see any other way to obtain HotSwap, even though this clearly doesn't use the Maven configuration to recompile)
    • at this point, IDEA's behaviour isn't consistent:
      • it either recompiles everything (skipping the Maven resources filtering stage)
      • or compile just what's needed (but anyway overwrite the resources with original non filltered ones)

So far, I've been pretty successful with this pattern, even when it recompiles everything from scratch.
But it seems I was lucky enough not accessing non-filtered resources.

How do you address the Maven resource-filtering as well as maven-war-plugin filtering in the integration with IDEA?


1 comment
Comment actions Permalink

I'm still having the problem.
I'm unable to use HotSwap 50% of the times, and have to restart the application.

Is there anyway to force IDEA to use the maven process it used to startthe application when recompiling for HotSwap?



Please sign in to leave a comment.