Cover by Brian Carper, Christophe Grand, Chas Emerick

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

O'Reilly logo

Build

“Build” is an umbrella term that has come to encompass more and more of the things we do after we’ve written the code but before the code has been delivered (another loaded term, given the complications of software as a service, cloud computing, and so on).

For our purposes here, we’ll consider build to mean:

  • Compilation

  • Dependency management, which allows you to systematically use external libraries

  • Packaging the results of compilation and other project assets into artifacts

  • Distribution of those artifacts within a dependency management context

That overly formal description sounds more complicated than the activities it describes. You’re likely doing these things already:

Table 8-1. Contrasting “build” solutions for different programming languages

 CompilationDependency managementPackagingDistribution

Ruby

rake

gem, rvm

Gemsrubygems.org

Python

distutils, SCons

pip, virtualenv

Eggs

PyPI[a]

Java

javac, Ant, Maven, Gradle, etc.

The Maven model, Ivy

Jar files and variants thereof

Maven artifact repositories

Because Clojure is a JVM language, it naturally reuses large swaths of that ecosystem’s build, packaging, and distribution infrastructure and mechanics:

  • Leiningen reuses much of the Maven infrastructure while providing a far more pleasant “UI” and Clojure-native development experience.

  • There are plug-ins for Maven, Gradle, and Ant that aid in driving Clojure builds from those tools.

  • Clojure libraries are packaged as .jar files, Clojure web applications are (usually) ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required