Skip to main content
The 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 a mvn dependency:resolve (or Gradle equivalent) and a fresh build, you should see in the application startup logs:
If you don’t see this line, the auto-configuration didn’t fire. Common causes:
  • Missing nexus.base-url and nexus.api-key in application.yml / application.properties - the starter is conditional on both being set
  • A pre-existing NexusClient bean elsewhere - @ConditionalOnMissingBean causes 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 plain curl:
A valid response returns a JSON snapshot with your 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:
You should see 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 your pom.xml, not just ~/.m2/settings.xml. Repository declarations in pom.xml are local to the project; in settings.xml they need a matching <profile> to be active.
  • 401 Unauthorized from 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-url and nexus.api-key are both set; the auto-configuration uses @ConditionalOnProperty on both.