Skip to content
This repository

Clojars help topics

Pushing is the process of uploading a jar to the Clojars repository so that others can use it.

Note that you can only push to the Classic repository; files can be promoted to the Releases repository only from the Classic repository.

leiningen 2.0.0

lein deploy clojars

This will prompt you for your username and password. It is also possible to have them read from an encrypted file.

leiningen 1.x

Add a deploy-repository for clojars to ~/.lein/init.clj:

(def settings
  {:deploy-repositories {"clojars-https" {:url ""
                                          :username "username"
                                          :password "password"}}})

Then you can deploy with

lein deploy clojars-https


Add clojars to the pom.xml:

      <name>Clojars repository</name>

Add authentication info to settings.xml:


Then you can deploy with

mvn deploy

It is possible to have encrypted credentials.


Clojars can use the scp protocol for authentication and file transfer. First setup your SSH key. Then generate a Maven-compatible POM file using your favourite build tool or IDE and just scp the POM and your jar to

lein pom
scp pom.xml myjar-1.0.jar

See Groups for how choose a groupId for your project and allow other project members to push jars for your project.

Note: You shouldn’t change the username to your own username, just leave it as clojars. Clojars will also expect the jar file to be called artifactId-version.jar or artifactId.jar.

Something went wrong with that request. Please try again.