Maven integration and Hotswap

As many here, at least it sounds, I've successfully migrated my IDEA projects as Maven ones.
It works great.

I'm now trying to get a step further and get IDEA's Hotswap feature to work on a Maven deployed project.
As far as I'm able to tell, IDEA operate the hotswap through the Make function.
It'd be ideal to be able to have hotswap trigger a Maven goal.

Has anyone been able to use Hotswap with a Maven deployed project yet?

cheers
-nodje

4 comments
Comment actions Permalink

For now, you can invoke Maven's make manually and then "Run | Reload changed classes".

--
Best regards,
Eugene Zhuravlev
Software Developer
JetBrains Inc.
http://www.jetbrains.com
"Develop with pleasure!"

"nodje" <no_reply@jetbrains.com> wrote in message news:28252188.1205322922827.JavaMail.itn@is.intellij.net...

As many here, at least it sounds, I've successfully migrated my IDEA projects as Maven ones.
It works great.

>

I'm now trying to get a step further and get IDEA's Hotswap feature to work on a Maven deployed project.
As far as I'm able to tell, IDEA operate the hotswap through the Make function.
It'd be ideal to be able to have hotswap trigger a Maven goal.

>

Has anyone been able to use Hotswap with a Maven deployed project yet?

>

cheers
-nodje



0
Comment actions Permalink

2 months later... sorry I didn't realize there was an answer to this question.

This still a very big issue as developer absolutly want the great hotswap option, but get errors with, for instance, web.xml and hibernateContext.xml that have variables set by maven package goal.

So when I try to run a Maven config in debug mode (typically here, 'mvn jetty:run-exploded', so that the variables get filtered), then change a class, then go for Run | Reload changed class, IDEA does recompile everything since previous compilation was made by Maven.
Then I get the following error:
Error:JSR/RET are not supported with computeFrames option

As for compile path, I use the 'Use module compile output path' option and specify Maven one **/target/class'. I don't know if this can matter here.

If I run the Maven config in debug mode, change a class, invoke Maven's make manually (mvn package), then Run | Reload changed class, I get the same problem. IDEA cannot know the class are up to date since it didn't compile them originally. It does recompile everything...

I feel it's a pretty difficult issue to solve. Is there any plan to support Hotswap on a Maven configured project in Diana?

best
-nodje

0
Comment actions Permalink

Hi there,

I think I've got a reasonable solution in Intellij 8. (Along the lines of a previous poster.)

I set up my project along the lines of these two posts:

http://mattfleming.com/node/281 - Running Maven Built Web Applications Directly From Intellij IDEA
http://sujitpal.blogspot.com/2006/10/maven2-multi-environment-filter-setup.html

I cannot click Build > Compile in Intellij to hotswap a class. That removes the Maven goal based substitutions in my hibernate setup as well.
However, clicking the Maven package command in Intellij forces the single class to be compiled and deployed to the exploded directory. It runs through the Maven filters, somy  hibernate cfg file gets the correct settings. Optionally, you can click the Maven toggle to prevent tests from being run to speed the hot swap process up.

Hope this helps,

Ed

0
Comment actions Permalink

Nice Ed, it seems to work pretty well!

I do only a Maven 'compile' and not a 'package' since I run my app using jetty:run-exploded.
It goes through the resource filtering phase as well.

cheers

0

Please sign in to leave a comment.