DUB supports package suppliers of types
- DUB Registry,
- Maven and
- File System.
By default, DUB will search on the DUB Registry on https://code.dlang.org, possibly trying hard-coded and user-set fallbacks.
Package suppliers can be specified either using argument
--registry or globally using the registryUrls setting. The type of the package supplier can be specified by prefixing the URL with
dub+ for type DUB Registry,
mvn+ for type Maven or using the
file:// scheme for type File System. Without a prefix, the type DUB Registry (
dub+) is assumed.
DUB packages are registered at a DUB registry server like https://code.dlang.org. It isn't needed to prefix the address of a DUB Registry.
DUB can retrieve package zip archives located within a Maven repository like Nexus or Artifactory. The registry address needs to contain the Maven repository and a group id. The dub packages needs to be stored with a common group id, the dub package name as artifact id and dub version as artifact version. The dub package zip file must have the name
Dub package zip archive
calculator-1.0.0.zip is stored on Maven repository http://localhost:8040/maven/libs-release using group id
dubpackages. As registry address
needs to be specified.
dub fetch firstname.lastname@example.org --skip-registry=all --registry=mvn+http://localhost:8040/maven/libs-release/dubpackages
A folder containing dub packages as zip files could be specified as registry. The zip files must have the name
To use a registry only for a single command, you can use
Created: August 7, 2022