Debugging Maven Mojo Plugin Sources Becomes Very Easy Using NetBeans 8
Sometime it happens that when you configure a Maven mojo plugin, the given configuration doesn't apply or doesn't work as expected. To investigate the problem it would be very useful to debug the mojo plugin sources.
Using NetBeans 8 this becomes easier than ever.
- Go the output panel of the Maven build
- Open the build overview
- Open the context menu of a Maven mojo goal
- Choose "Debug Plugin Mojo Source"
NetBeans now downloads the sources of the mojo from the external maven repo, starts the debugger and waits within the execute-method of the mojo. Now you can debug the plugin and see what is wrong.
NetBeans 8 introduces some more nice features for Maven. Have a look at the "New and Noteworthy" page http://wiki.netbeans.org/NewAndNoteworthyNB80#Maven_2
You can download NetBeans at https://netbeans.org/
(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)