Over a million developers have joined DZone.

Debugging Maven Mojo Plugin Sources Becomes Very Easy Using NetBeans 8

· DevOps Zone

The DevOps zone is brought to you in partnership with Sonatype Nexus. The Nexus suite helps scale your DevOps delivery with continuous component intelligence integrated into development tools, including Eclipse, IntelliJ, Jenkins, Bamboo, SonarQube and more. Schedule a demo today

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.

  1. Go the output panel of the Maven build
  2. Open the build overview
  3. Open the context menu of a Maven mojo goal
  4. 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/

For reference: https://netbeans.org/bugzilla/show_bug.cgi?id=219402https://netbeans.org/bugzilla/show_bug.cgi?id=201754

The DevOps zone is brought to you in partnership with Sonatype Nexus. Use the Nexus Suite to automate your software supply chain and ensure you're using the highest quality open source components at every step of the development lifecycle. Get Nexus today

Topics:

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

SEE AN EXAMPLE
Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.
Subscribe

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}