The Sonatype Insight plug-in for Eclipse helps you gain insight into the Java libraries used by a project. It helps answer three questions:
- Is this the most recent version a library?
- Is this library used consistently across a project?
- Why is this library being used?
The answer to these questions is primarily found in the "Dependency Hub" view that is provided by this plugin. The "Dependency Hub" view shows all the Java libraries used in the workspace, present available new versions, allow to search for references and update a particular library.
- Show the Java libraries used by Java projects including Maven, PDE, JDT.
- Show the versions available for a given library.
- Search for references to a Java library in the workspace.
- Update Maven projects to use a new version of a library.
The picture below shows the "Dependency hub" view. It is divided into two sections, an overview on the left, and a details section on the right. The overview presents a list of all the libraries used by the projects contained in the workspace, whereas the details provides a list of the available versions. Libraries that are brought in transitively are shown in a light grey.
Having shown with a "red X" overlay means that the artifact could not be identified. For Maven projects, the identification process will query the repositories associated with the Maven project, whereas for other projects, it will only query Maven Central.
In the details section:
Show major updates (e.g. from 3.0 to 4.0).
Show minor updates (e.g. from 3.1 to 3.2).
Show micro updates (e.g. from 3.0.1 to 3.0.2).
Show snapshot versions.
Show older versions than current one.
In the overview section:
Indicates that an major update and a micro update is available. Other combinations of this icon exist.
Indicates that a released version of the library is available.
Indicates that the library has not yet been processed.
For Maven projects only, the dependency plug-in allows to easily update a library to a new version. To perform this operation, select the desired version in the details section and hit the "Mark for upgrade" button. Repeat this operation for all the desired libraries, then hit the "commit changes" button. Hitting the "commit changes" button will bring up the Eclipse refactoring wizard which will present the edits made to the files.
The upgrade facility supports usage of properties, introduction of management section, and changes to the version section of the dependency. Note that when the operation is complete, the view will only be updated one the build is complete.
In order to help locate why a library is used, it suffices to right click on a dependency in the overview section of the view and select "locate declarations" or use the button in the view toolbar. This will cause the results to be revealed in the Eclipse Search view (see picture below). For Maven projects, the user will have the possibility to directly jump to the relevant declaration in the pom.xml. For Java projects the Java Build path dialog is shown, and for PDE the Manifest.mf will be opened.
Sonatype Insight plug-in for Eclipse runs on Eclipse 3.6 (aka Helios) and Eclipse 3.7 (aka Indigo).
Feedback and bugs can be reported at: https://issues.sonatype.org/browse/SIPE