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. 17 is the baseline because Spring Boot 4.1 itself requires only 17; CI also runs the suite on JDK 21.
- Spring Boot 4.0 or newer - and Spring Boot 3.5 works too. The starter is built against 4.0, the oldest line still receiving open-source security patches (all of 3.x left support on 2026-06-30), and every pipeline run tests 3.5.16, 4.0.7 and 4.1.0. One artifact covers all three: there is no
-boot3/-boot4variant and no framework version in the coordinates. - Jackson - whichever major your framework brings (Jackson 2 on Spring Boot 3, Jackson 3 on Spring Boot 4). Both are declared
<optional>, so the starter never adds a second JSON library to your classpath. See JSON values. - (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.
