Repository Management with Nexus
Nexus Professional provides you with the ability to browse an artifact’s dependencies. Using the artifact metadata found in an artifact’s POM, Nexus will scan a repository or a repository group and attempt to resolve and display an artifact’s dependencies. To view an artifact’s dependencies, browse the repository storage or the repository index, select an artifact (or an artifact’s POM), and then click on the Maven Dependency tab.
On the Maven Dependency tab, you will see the following form elements:
- When resolving an artifact’s dependencies, Nexus will query an existing repository or repository group. In many cases it will make sense to select the same repository group you are referencing in your Maven settings. If you encounter any problems during the dependency resolution, you need to make sure that you are referencing a repository or a group that contains these dependencies.
- An artifact’s dependencies can be listed as either a tree or a list. When dependencies are displayed in a tree, you can inspect direct dependencies and transitive dependencies. This can come in handy if you are assessing an artifact, based on the dependencies it is going to pull into your project’s build. When you list dependencies as a list, Nexus is going to perform the same process used by Maven to collapse a tree of dependencies into a list of dependencies using rules to merge and override dependency versions if there are any overlaps or conflicts.
Once you have selected a repository to resolve against and a mode to display an artifact’s dependencies, click on Resolve as shown in Figure 5.11, “View an Artifact’s Dependencies”. Clicking on this button will start the process of resolving dependencies, depending on the number of artifacts already cached by Nexus, this process can take anywhere from a few seconds to a minute. Once the resolution process is finished, you should see the artifact’s dependencies, as shown in Figure 5.11, “View an Artifact’s Dependencies”.
Once you have resolved an artifact’s dependencies, you can use the Filter text input to search for particular artifact dependencies. If you double-click on a row in the tree or list of dependencies, you can navigate to other artifacts within the Nexus interface.