Browse Learn Clojure Foundations as a Java Developer

Clojure Build Tools

Compare Leiningen and tools.deps from a Java engineer's point of view so you can recognize project files, start the right REPL, run tests, package code, and avoid premature tool migrations.

If you come from Java, it is tempting to ask “which one is the official build tool?” In Clojure, the more useful question is: “which toolchain does this project use, and how do I get a REPL and tests running quickly?”

You will see two main workflows:

  • tools.deps / Clojure CLI: configuration in deps.edn, flexible aliases, and strong alignment with the JVM classpath model.
  • Leiningen: configuration in project.clj, a long history in the ecosystem, and a plugin-based workflow many older projects still use.

Practical Guidance

  • Prefer learning to run what exists before migrating anything.
  • For new projects, many teams default to tools.deps, but legacy Lein projects are still common and productive.
  • Treat both like Maven vs Gradle: you do not need a holy war, you need fluency.
Need tools.deps / Clojure CLI Leiningen
Project file deps.edn project.clj
Mental model Construct classpaths with aliases Run named project tasks
REPL startup Often clj, clojure, or an alias Often lein repl
Packaging Usually added through tools/build or aliases Built into common Lein workflows
Legacy codebases Common in newer libraries and services Very common in older applications

This section helps you recognize the files, commands, and mental models so you can join a codebase and be effective.

In this section

  • Understand Leiningen Projects
    Learn how Leiningen uses project.clj, named tasks, profiles, plugins, the project REPL, and uberjar packaging so you can work confidently in existing Clojure repositories.
  • Create a Leiningen Project
    Generate a Leiningen application, read its project.clj and namespace layout, run the app, run tests, and start the project REPL without confusing the scaffold with architecture.
  • Understand deps.edn and the Clojure CLI
    Understand how deps.edn, clj, clojure, aliases, classpath roots, main invocations, exec functions, and tools aliases fit together in modern Clojure CLI projects.
  • Create a deps.edn Project
    Create a small Clojure CLI project by hand, wire source and test paths, add run and test aliases, and verify the project from the shell before adding more tooling.
  • Choose Between Leiningen and deps.edn
    Compare Leiningen and deps.edn by repository signals, team workflow, REPL expectations, testing, packaging, and migration cost so Java engineers choose tools pragmatically.
Revised on Saturday, May 23, 2026