nexus-spring-boot-starter artifact is hosted on the GitLab Maven Package Registry. It is public - no token is required to install.
1. Register the repository
Add the registry to your project. Use the numeric project ID rather than the URL path so your build is resilient to any future repository moves.No token is required - the registry is public.
2. Add the dependency
Requirements
- Java 17 or newer
- Spring Boot 3.2 or newer (works on any 3.x release)
- (Auto-configured) Jackson and SLF4J - both already on the Spring Boot classpath
Verify the installation
After amvn dependency:resolve (or Gradle equivalent) and a fresh build, you should see in the application startup logs:
- Missing
nexus.base-urlandnexus.api-keyinapplication.yml/application.properties- the starter is conditional on both being set - A pre-existing
NexusClientbean elsewhere -@ConditionalOnMissingBeancauses the starter to back off when one is already registered - Spring Boot version below 3.2
Verifying connectivity
Before writing any code, confirm your endpoint and API key work with a plaincurl:
configs, secrets, and flags. An HTTP 401 means the key is wrong; HTTP 404 means the slug is wrong.
To watch the live SSE stream:
event:resync arrive within a second. Press Ctrl+C to stop.
Troubleshooting
Could not transfer artifact dev.westyx.nexus:nexus-spring-boot-starter- your Maven settings haven’t picked up the GitLab registry. Confirm the<repositories>block is in yourpom.xml, not just~/.m2/settings.xml. Repository declarations inpom.xmlare local to the project; insettings.xmlthey need a matching<profile>to be active.401 Unauthorizedfrom the registry - the registry might be configured with an old path that’s no longer valid. Switch to the numeric-ID variant above.- Bean not created at startup - check that
nexus.base-urlandnexus.api-keyare both set; the auto-configuration uses@ConditionalOnPropertyon both.
