0

I want to use a Maven run/debug configuration in Intellij to build and run my application: a Spring Boot-powered web application packaged as a fat jar. I also want to be able to hot swap classes. But in Intellij, I only know how to get hot swapping if I use Intellij's built-in Make functionality with an Intellij 'Application' run/debug configuration. Is there a way to do this?

Note: I do not want to use WAR packaging.

David Groomes
  • 2,303
  • 1
  • 21
  • 23
  • What's wrong with debugging the application from IntelliJ and using the hotswapping it provides? Is there something that running Maven from the command line will give you extra? – geoand Aug 22 '14 at 14:05
  • Right--it doesn't give me much. The reason I want to use Maven to build locally is because I'm going to use Maven to deploy. Having the same build process reduces the chance of surprises when I go to deploy. – David Groomes Aug 22 '14 at 14:22
  • 1
    I agree with your assessment, but if you want to use hot swap you already differentiating the development environment from the production one. I propose you take advantage of the ides features in development, but then do testing on a maven built package. – geoand Aug 22 '14 at 14:47
  • Try [Maven Helper](http://plugins.jetbrains.com/plugin/7179?pr=idea) and start the goal via right click context menu | Debug Maven. Maven needs a parameter to run in a single process, otherwise the debug will not work, afaik, and the plugin handles it for you. – Meo Aug 22 '14 at 14:53
  • @geoand I think you're right and it is disappointing. Having to bypass Maven to do local development diminishes the value proposition of Maven. On the other hand, maybe delegating all build/run/analysis tasks to the IDE when doing local development is the natural way. – David Groomes Aug 22 '14 at 15:25
  • @dgtc That's what I do and haven't encountered any problems. There might be a way to use maven for debugging and also be able to hot-swapping, but I just don't know how – geoand Aug 22 '14 at 16:35

2 Answers2

0

Isn't JRebel doing exactly what you want?

xeraa
  • 10,456
  • 3
  • 33
  • 66
0

You can use this: http://hotswapagent.org Worked fine for me on Weblogic 12 with JDK 1.8_181