Faster Builds with Maven in Netbeans

By , 2 August 2008

Faster Builds with Maven in Netbeans

An often expressed lament of Java developers is the slowness of compile/deploy round-tripping. Here are a few tips to help alleviate the condition in Netbeans.

  1. Change your maven build action to compile war:exploded. The default target for the run action is package, which unnecessarily zips up the war, and copies it to your repository. You can change the build action by right clicking on the project and selecting properties.
  2. Skip tests. Even if you haven't got any actual test cases, it can still take a second or two for the build to figure that out. There is a skip tests checkbox just below where you set the build actions.
  3. Debug instead of run. It takes a little longer initially, but the debugger can compile and deploy changes to a single class with the Apply Code Changes button. It doesn't seem to allow adding, renaming, or removing methods, but still pretty handy nevertheless.
Faster Builds with Maven in Netbeans

About Roger Keays

Faster Builds with Maven in Netbeans

I guess I'd call myself a problem solver. Either that, or I'm some sort of organic machine designed to convert oxygen into carbon dioxide. You could go either way on that. I'm into languages and stuff. I wrote a book. It's okay, I guess. What else? I like reading, swimming, eating, and playing music. Satisfied? Sheesh.

Leave a Comment

Please visit https://rogerkeays.com/blog/faster-builds-with-maven-in-netbeans to add your comments.

Comment posted by: Evgeniy Fitsner, 3 years ago

Thanks a lot, I'm trying to use Netbeans instead of Eclipse and it's looks amazing. Thanks for helpfull post.