Maven: Not Building But Running
By Geertjan-Oracle on Apr 19, 2012
I asked Jesse Glick, who works on the NetBeans Maven support, the above question and he responded as follows:
Assuming a jar-packaging project is being referred to, you can remove <goal>process-classes</goal> from the 'run' action in nbactions.xml. In my tests, this can shave around 500msec off the time to run a small project. Of course, then you are obliged to build before running, which is much slower than just clicking Run immediately after making your modifications and having it perform an incremental build during the same Maven process.
Having the IDE detect that you have done a build "recently enough" and omit certain goals from a subsequent Maven run would be complicated and probably never work reliably.
Much faster than any of these options is enabling Compile on Save mode for application run, which is the default in NetBeans 7.2; this bypasses Maven altogether for the basic edit/compile/run/debug workflow.
The question is also answered on the related mailing list: