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 "https://clojars.org/repo"
                                          :username "username"
                                          :password "password"}}})

Then you can deploy with

lein deploy clojars-https

Maven

Add clojars to the pom.xml:

<distributionManagement>
    <repository>
      <id>clojars</id>
      <name>Clojars repository</name>
      <url>https://clojars.org/repo</url>
    </repository>
  </distributionManagement>

Add authentication info to settings.xml:

<server>
      <id>clojars</id>
      <username>username</username>
      <password>password</password>
    </server>

Then you can deploy with

mvn deploy

It is possible to have encrypted credentials.

SSH

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 clojars@clojars.org:.

lein pom
scp pom.xml myjar-1.0.jar clojars@clojars.org:

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.