{:mvn/repos {"custom-id" {:url "https://custom.example.com"}}}
build.edn
file has a key named :deploy-repository.
Repository URL is determined by repository :id
.
The default pair of :id
and URL is below.
"central"
— https://repo1.maven.org/maven2/
"clojars"
— https://repo.clojars.org/
Other custom URLs could be defined by mvn/repos in deps.edn
file or build.edn
explicitly.
{:mvn/repos {"custom-id" {:url "https://custom.example.com"}}}
{:deploy-repository {:url "https://custom.example.com"}}
:username
and :password
could be managed by several ways.
At first, build.edn will refer ~/.m2/settings.xml
to see if it has a setting which matchs the :id
.
<settings>
<servers>
<server>
<id>clojars</id>
<username>foo</username>
<password>bar</password>
</server>
</servers>
</settings>
In the above example, password is managed as a plain text. If you don’t want to manage password as a plain text, you can encrypt it by Maven.
See the following guide page to encrypt passwords in settings.xml.
When the corresponding server is not found in ~/.m2/settings.xml
,
build.edn will refer environmental variables.
If you don’t specify :username
and :password
in :deploy-repository
map,
build.edn will refer following environmental variables.
:username
— CLOJARS_USERNAME
:password
— CLOJARS_PASSWORD
If you’d like to use other environmental variables, please specify them like below in :deploy-repository
map.
{:deploy-repository {:username #env YOUR_USERNAME
:password #env YOUR_PASSWORD}}
Can you improve this documentation?Edit on GitHub
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close