Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Getting Sources in NetBeans IDE from Maven Repositories

DZone's Guide to

Getting Sources in NetBeans IDE from Maven Repositories

· Java Zone
Free Resource

Learn how to troubleshoot and diagnose some of the most common performance issues in Java today. Brought to you in partnership with AppDynamics.

Adding a new Maven dependency to our project in NetBeans IDE is very easy. But this will only get us the compiled classes. But what if we want to see the source code or look at the Javadoc?

Well that is easy too! Suppose we have a project with a dependency on the Jakarta commons-lang library.

To get the sources for our library we right-click on Libraries and select Download All Library Sources.

NetBeans starts a download process to get the sources. Of course we must keep in mind the sources must be available otherwise NetBeans cannot download anything. Notice the changed icon for the library if the sources are download. This indicates sources are available. We can now open a libary and open a .class. NetBeans opens the source code in read-only mode in the Java editor.

Understand the needs and benefits around implementing the right monitoring solution for a growing containerized market. Brought to you in partnership with AppDynamics.

Topics:

Published at DZone with permission of Hubert Klein Ikkink, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

THE DZONE NEWSLETTER

Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

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

X

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

{{ parent.tldr }}

{{ parent.urlSource.name }}