Running this action requires a token — a base64(admin:password) string used for HTTP Basic authentication in requests to Nexus.

CreateNexusRepository — creates a new repository of any supported type (maven, docker, npm, etc.) in Nexus Repository Manager 3 using the REST API.
The format, type, and other key settings are fully configurable and correspond to the Nexus API.

Request example (Maven hosted)

description: |
  Maven hosted repo for internal Java build artifacts.
name: my-maven-repo
format: maven
type: hosted
online: true
storage:
  blobStoreName: default
  strictContentTypeValidation: true
  writePolicy: ALLOW
cleanup:
  policyNames:
    - maven-cleanup
maven:
  versionPolicy: RELEASE
  layoutPolicy: PERMISSIVE

Request example (Docker group)

description: |
  Docker group repo aggregating hosted+proxy.
name: my-docker-group
format: docker
type: group
online: true
storage:
  blobStoreName: default
  strictContentTypeValidation: true
group:
  memberNames:
    - docker-hosted
    - docker-proxy
docker:
  v1Enabled: false
  forceBasicAuth: true
  httpPort: 5001

Request specification

FieldRequiredDescriptionExample
descriptionNoDescription of the action or repository’s purpose. Used only in the UI, not by Nexus itself-
nameYesName of the repository to create. Must be unique within Nexusmy-maven-repo
formatYesFormat (maven, docker, npm, raw, etc.)maven
typeYesType: hosted, proxy, or grouphosted
onlineYesWhether the repository is available (true/false)true
storageYesStorage object: blobStoreName, strictContentTypeValidation, writePolicyExample
cleanupNoLinked cleanup policies (policyNames)policyNames: [maven-cleanup]
mavenFor mavenMaven-only: versionPolicy, layoutPolicyExample
proxyFor proxyProxy repository: remoteUrl, contentMaxAge, metadataMaxAge-
groupFor groupList of memberNames valuesExample
dockerFor dockerDocker-specific parameters: httpPort, v1Enabled, forceBasicAuthExample
componentVery rareOnly for certain non-standard scenarios-
attributesNoAny custom fields-

Requirements

  • Use only the blocks (maven, group, proxy, docker, etc.) supported by the selected type and format.
  • For Maven hosted repositories, maven: {versionPolicy, layoutPolicy} is required.
  • For group repositories, group.memberNames is required.
  • For proxy repositories, proxy.remoteUrl is required.
  • For Docker repositories, specify the Docker-specific fields in docker.