Utility to list identity of all assets in a repository within Sonatype Nexus Repository.
This tool produces a JSON file per Proxy Repository that contains basic identity information for every Asset in the Repository.
A JSON files contents might look similar to this:
[
{
"p": "/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz",
"h": {
"md5": "a4d7239289232437622e6342e771a153",
"sha1": "d8feb2b2881e6a4f58c2e08acfd0e2834e26222e",
"sha256": null
}
},
...
]
This tool purposefully skips Proxy Repositories of format docker
.
Obtain the binary for your Operating System and Architecture from the GitHub Releases page.
You can see all options by running:
./nexus-repo-asset-lister -help
usage: nexus-repo-asset-lister [OPTIONS]
-X Enable debug logging
-o string (optional)
Directory to write asset lists to (default "~/nexus-repo-asset-lister")
-password string (mandatory)
Password used to authenticate to Sonatype Nexus Repository (can also be set using the environment variable NXRM_PASSWORD)
-skipped (optional)
Whether to ouptut skipped assets to a separate '-skipped.json' file
-url string (mandatory)
URL including protocol to your Sonatype Nexus Repository Manager (default "http://localhost:8081")
-username string (mandatory)
Username used to authenticate to Sonatype Nexus Repository (can also be set using the environment variable NXRM_USERNAME)
-repository-name string (optional)
Run only for a specific Repository Name
In order to produce the expected JSON files, you should run nexus-repo-asset-lister
with Administrator credentials against your Sonatype Nexus Repository.
The URL of the Sonatype Nexus Repository sever is specified with the -url
argument and should contain the protcol (e.g. https://
) and any context path you may have set for the installation.
Credentials can be supplied as command-line arguments or via Environment Variables.
NXRM_USERNAME=username NXRM_PASSWORD=password ./nexus-repo-asset-lister -url https://my-nexus-repository.tld
You can use User Token instead of actual username and password.
See CONTRIBUTING.md for details.
Remember:
This project is part of the Sonatype Nexus Community organization, which is not officially supported by Sonatype. Please review the latest pull requests, issues, and commits to understand this project's readiness for contribution and use.
- File suggestions and requests on this repo through GitHub Issues, so that the community can pitch in
- Use or contribute to this project according to your organization's policies and your own risk tolerance
- Don't file Sonatype support tickets related to this project— it won't reach the right people that way
Last but not least of all - have fun!