An application with additional management functionalities for Sonatype Nexus RM. | Read-only mirror of https://github.com/republique-et-canton-de-geneve/nexus-rm-management — République et canton de Genève. Issues & pull requests at the source.
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-08-07 16:39:02 +02:00
.github Enable manual triggering of GitHub Actions workflow 2026-08-07 16:39:02 +02:00
doc/openapi OpenAPI Nexus file 3.62 -> 3.81 2025-11-17 14:05:33 +01:00
src Sort the users (implemented by Mathias Sauvageot, the global hero of OCSIN) 2026-06-26 10:48:41 +02:00
.gitignore sorti etriée vers excel 2024-06-18 11:01:19 +02:00
CODE_OF_CONDUCT.md Create CODE_OF_CONDUCT.md 2024-09-09 12:21:41 +02:00
LICENSE Fixed licence text 2025-06-13 15:04:15 +02:00
pom.xml Prepare the upgrade from Spring Boot 3.5.0 to 4.0.1. Change @Resource with @Autowire otherwise Spring injection will not work in version 4.0 2025-12-19 15:04:29 +01:00
README.md New functionality for unused content selectors 2025-11-18 09:44:00 +01:00

Build GitHub:

Build with GitHub

SonarCloud analysis:

Bugs Code Smells Security Rating Duplicated Lines (%) Coverage Quality Gate Status

Licence:

License

nexus-rm-management : an additional administration tool for Nexus RM

The Nexus RM administration is insufficient. This application implements features that the Nexus RM administration console does not include.

The application requires Java 21+.

1) Features

Name Description Arguments Example
Expired certificates Checks all certificates expiry date and return all the certificates that are already expired and those who will be in the next month. The output is dumped in a CSV file and sorted by most recent to oldest. 1 1
Heavy components Checks all components assets size and selects the assets that have a size larger than 5 MB. At État de Genève we noticed that, after migrating Nexus RM from an embedded OrientDB database to a PostgreSQL database, processing time for this functionality was reduced by a factor of 300. The output is dumped in a CSV file. 2 2
Permissions of some user Retrieves the permissions for a specified user: roles, privileges and content selectors. The output is dumped in a CSV file. 3 and userID 3 MARTIN
Deletion of a component Identifies the components that are ready for deletion. By default, it runs in dryRun mode, simulating the deletion and generating a CSV file with the components that would be deleted. To execute in dryRun mode, set the argument list to "4" or to "deleteComponents". To perform actual deletion, set the argument list to "4 realRun". The output is dumped in a CSV file. 4 and (optionally) realRun In dryRun mode: 4
In real run mode: 4 realRun
Roles and embedded roles Dumps the list of all roles. For every role, its sub-roles and its external roles are displayed. The output is dumped in the log file and on the standard output. 5 5
Users having some role Dumps the list of the users who have some role. The search is deep, that is, it accounts for the fact that a role can contain roles, recursively. Partial role names are accepted, e.g., you can use "ADMI" to search for the users having either role ADMIN-RESTRICTED or role ADMIN-GLOBAL. BEWARE: the search is partial, because the Nexus RM API (as well as the Nexus RM GUI) returns only a fraction of the users of type "LDAP". The output is dumped in the log file and on the standard output. 6 and role name 6 nx
Roles having some privilege Dumps the list of the roles which have some privilege. The search is shallow, that is, it returns only the roles having the specified privilege - not the roles which embed a role that has the specified privilege. Partial privilege names are accepted, e.g., you can use "REA" to search for the roles having either privilege READ or privilege READ-ONLY. The output is dumped in the log file and on the standard output. 7 and privilege name 7 nx
Unused roles Dumps the list of the roles that belong to no user. BEWARE: the search is partial, because the Nexus RM API (as well as the Nexus RM GUI) returns only a fraction of the users of type "LDAP". The output is dumped in the log file and on the standard output. 8 8
Unused privileges Dumps the list of the privileges of type "Repository Content Selector" that belong to no role. The output is dumped in the log file and on the standard output. 9 9
Unused content selectors Dumps the list of the content selectors which belong to no privilege. The output is dumped in the log file and on the standard output. 10 10

2) Building the application

mvn clean package

3) Running the application locally

Pre-step : configuring the application: property file

Do the following:

  • Go to directory src/main/resources
  • Copy file application-base.yml (this file is under Git control) to a new file application.yml (this file is under Git ignore), in the same directory
  • Edit file application.yml, provide the missing values; their value is TO_BE_PROVIDED. For the particular case of trustStorePassword, don't do anything yet

Pre-step : configuring the application: trust store

At État de Genève we unfortunately use self-signed certificates, so a trust store must be provided for the HTTPS interaction between the application and the Nexus RM server.

Do the following:

  • Get a trust store file. At État de Genève it is usually a gina.jks file
  • Rename the file into truststore.jks
  • Copy file truststore.jks to directory src/main/resources/security
  • Edit file application.yml again and set the password of the trust store file

Running locally

There are several ways to do so.

Maven

First, run

mvn spring-boot:run

to get the required parameters printed.

Then run

mvn spring-boot:run -Dspring-boot.run.arguments=<ARGS>

where <ARGS> is, for instance, 1 (for listing the expired certificates).

JAR

First, run

$JAVA_HOME/bin/java -jar target/nexus-rm-management-<VERSION>.jar

to get the required parameters printed.

Then run

$JAVA_HOME/bin/java -jar target/nexus-rm-management-<VERSION>.jar <ARGS>

where <ARGS> is, for instance, 1.

IntelliJ

If you use the IntelliJ, running the application from there is the most convenient way.

Just run class Application.