Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 178 lines (134 sloc) 7.568 kb
88b5360 @technomancy Initial commit.
authored
1 # Leiningen
2
1fee69f @technomancy Update bootstrapping instructions, remove old lein.util.* references.
authored
3 <img src="https://github.com/downloads/technomancy/leiningen/leiningen-banner.png"
4 alt="Leiningen logo" title="The man himself" align="right" />
042ec19 @technomancy Update readme for lein2.
authored
5
410b4e7 @technomancy This is not 1.0-level material... yet.
authored
6 > "Leiningen!" he shouted. "You're insane! They're not creatures you can
2df87f3 @technomancy Reword a few things in READMEs, todo tweaks.
authored
7 > fight&mdash;they're an elemental&mdash;an 'act of God!' Ten miles long, two
8 > miles wide&mdash;ants, nothing but ants! And every single one of them a
045e24d @technomancy Minor readme tweaks.
authored
9 > fiend from hell..."
2df87f3 @technomancy Reword a few things in READMEs, todo tweaks.
authored
10 > - from Leiningen Versus the Ants by Carl Stephenson
88b5360 @technomancy Initial commit.
authored
11
44994c9 @technomancy Re-word docs in favour of the term "project automation".
authored
12 Leiningen is for automating Clojure projects without setting your hair on fire.
88b5360 @technomancy Initial commit.
authored
13
410b4e7 @technomancy This is not 1.0-level material... yet.
authored
14 ## Installation
b62c7c0 @technomancy Added temporary install note.
authored
15
03da3ae @technomancy Update todo.org.
authored
16 If your preferred
17 [package manager](https://github.com/technomancy/leiningen/wiki/Packaging)
18 has a relatively recent version of Leiningen, try that first.
19 Otherwise you can install by hand:
20
a6c35b8 @technomancy Redo windows installation instructions, be consistent with markdown tt.
authored
21 Leiningen bootstraps itself using the `lein` shell script;
22 there is no separate install script. It installs its dependencies
575fd09 @technomancy README updates for Windows
authored
23 upon the first run on unix, so the first run will take longer.
e535fe8 @technomancy Added INTRO.md with concept background thanks to slyphon.
authored
24
6e136f1 @technomancy Point people towards 2.x in the readme.
authored
25 1. [Download the script](https://raw.github.com/technomancy/leiningen/preview/bin/lein).
f3ebb95 @technomancy Rewrite explanation of profiles in readme.
authored
26 2. Place it on your `$PATH`. (I like to use `~/bin`)
a6c35b8 @technomancy Redo windows installation instructions, be consistent with markdown tt.
authored
27 3. Set it to be executable. (`chmod 755 ~/bin/lein`)
575fd09 @technomancy README updates for Windows
authored
28
6e136f1 @technomancy Point people towards 2.x in the readme.
authored
29 The link above will get you the 2.x preview release. There is still a
30 lot of extant material on the Web concerning the older
31 [Leiningen 1.x](https://raw.github.com/technomancy/leiningen/stable/bin/lein)
32 version, which is still available if you need to work on older
33 projects that aren't compatible with 2.x yet. The
caf4d78 @technomancy Clarify stable vs preview in readme.
authored
34 [upgrade guide](https://github.com/technomancy/leiningen/wiki/Upgrading)
6e136f1 @technomancy Point people towards 2.x in the readme.
authored
35 has instructions on migrating to version 2.
caf4d78 @technomancy Clarify stable vs preview in readme.
authored
36
a6c35b8 @technomancy Redo windows installation instructions, be consistent with markdown tt.
authored
37 On Windows most users can get
6e136f1 @technomancy Point people towards 2.x in the readme.
authored
38 [the batch file](https://raw.github.com/technomancy/leiningen/preview/bin/lein.bat).
575fd09 @technomancy README updates for Windows
authored
39 If you have wget.exe or curl.exe already installed and in PATH, you
a6c35b8 @technomancy Redo windows installation instructions, be consistent with markdown tt.
authored
40 can just run `lein self-install`, otherwise get the standalone jar from the
41 [downloads page](https://github.com/technomancy/leiningen/downloads).
42 If you have [Cygwin](http://www.cygwin.com/) you should be able to use
43 the shell script above rather than the batch file.
e535fe8 @technomancy Added INTRO.md with concept background thanks to slyphon.
authored
44
14f566b @technomancy Spin FAQ off into its own page.
authored
45 ## Basic Usage
88b5360 @technomancy Initial commit.
authored
46
d2e016c @technomancy Implemented documentation suggestions from readers.
authored
47 The
f7795ce @technomancy Update readme links to point to preview branch.
authored
48 [tutorial](https://github.com/technomancy/leiningen/blob/preview/doc/TUTORIAL.md)
d2e016c @technomancy Implemented documentation suggestions from readers.
authored
49 has a detailed walk-through of the steps involved in creating a new
50 project, but here are the commonly-used tasks:
51
2f3ede0 @technomancy Readme tweaks.
authored
52 $ lein new [TEMPLATE] NAME # generate a new project skeleton
915e61a @technomancy Add sample.project.clj showing all honored project keys.
authored
53
4d4aa03 @technomancy Allow test task to take namespaces as an argument.
authored
54 $ lein test [TESTS] # run the tests in the TESTS namespaces, or all tests
73115a5 Added test namespace/task.
Phil Hagelberg authored
55
f3ebb95 @technomancy Rewrite explanation of profiles in readme.
authored
56 $ lein repl # launch an interactive REPL session
88b5360 @technomancy Initial commit.
authored
57
dff9a6c @technomancy Spin off separate profile guide from readme/tutorial.
authored
58 $ lein run -m my.namespace # run the -main function of a namespace
c558fe9 @technomancy Add clean command.
authored
59
dff9a6c @technomancy Spin off separate profile guide from readme/tutorial.
authored
60 $ lein uberjar # package the project and dependencies as standalone jar
a00e78d @tavisrudd added notes about search command to README
tavisrudd authored
61
a6c35b8 @technomancy Redo windows installation instructions, be consistent with markdown tt.
authored
62 Use `lein help` to see a complete list. `lein help $TASK` shows the
042ec19 @technomancy Update readme for lein2.
authored
63 usage for a specific task.
bda58ab @technomancy Add new task for generating project skeletons.
authored
64
aeb6a46 @technomancy Document do task.
authored
65 You can also chain tasks together in a single command by using the
66 `do` task with comma-separated tasks:
77d8a5c @technomancy Document 1.3.0 features.
authored
67
aeb6a46 @technomancy Document do task.
authored
68 $ lein do clean, test foo.test-core, jar
a920ab9 @technomancy Added documentation TODOs.
authored
69
77d8a5c @technomancy Document 1.3.0 features.
authored
70 Most tasks need to be run from somewhere inside a project directory to
2f3ede0 @technomancy Readme tweaks.
authored
71 work, but some (`new`, `help`, `search`, `version`, and `repl`) may
72 run from anywhere.
a920ab9 @technomancy Added documentation TODOs.
authored
73
dff9a6c @technomancy Spin off separate profile guide from readme/tutorial.
authored
74 See the [FAQ](https://github.com/technomancy/leiningen/blob/master/doc/FAQ.md)
14f566b @technomancy Spin FAQ off into its own page.
authored
75 for more details.
76
88b5360 @technomancy Initial commit.
authored
77 ## Configuration
78
a6c35b8 @technomancy Redo windows installation instructions, be consistent with markdown tt.
authored
79 The `project.clj` file in the project root should look like this:
21e1dee @technomancy Looks like github in-browser merge messed up that markdown.
authored
80
3ae4b06 @technomancy Document profiles.
authored
81 ```clj
21e1dee @technomancy Looks like github in-browser merge messed up that markdown.
authored
82 (defproject myproject "0.5.0-SNAPSHOT"
83 :description "A project for doing things."
84 :url "http://github.com/technomancy/myproject"
dff9a6c @technomancy Spin off separate profile guide from readme/tutorial.
authored
85 :dependencies [[org.clojure/clojure "1.4.0"]]
042ec19 @technomancy Update readme for lein2.
authored
86 :plugins [[lein-ring "0.4.5"]])
4dcd0cb @mwilliams Add syntax highlighting to Clojure code in the README
mwilliams authored
87 ```
88b5360 @technomancy Initial commit.
authored
88
2df87f3 @technomancy Reword a few things in READMEs, todo tweaks.
authored
89 The `lein new` task generates a project skeleton with an appropriate
90 starting point from which you can work. See the
f7795ce @technomancy Update readme links to point to preview branch.
authored
91 [sample.project.clj](https://github.com/technomancy/leiningen/blob/preview/sample.project.clj)
2df87f3 @technomancy Reword a few things in READMEs, todo tweaks.
authored
92 file (also available via `lein help sample`) for a detailed listing of
93 configuration options.
89f2a77 @technomancy Documentation updates in preparation for 1.4 release.
authored
94
dff9a6c @technomancy Spin off separate profile guide from readme/tutorial.
authored
95 The `project.clj` file can be customized further with the use of
96 [profiles](https://github.com/technomancy/leiningen/blob/master/doc/PROFILES.md).
0f855f9 @technomancy Document prep-tasks, clean up ignores.
authored
97
dff9a6c @technomancy Spin off separate profile guide from readme/tutorial.
authored
98 ## Plugins
3ae4b06 @technomancy Document profiles.
authored
99
1fee69f @technomancy Update bootstrapping instructions, remove old lein.util.* references.
authored
100 Leiningen supports plugins which may contain both new tasks and hooks
101 that modify behaivour of existing tasks. See
3ae4b06 @technomancy Document profiles.
authored
102 [the plugins wiki page](https://github.com/technomancy/leiningen/wiki/Plugins)
103 for a full list. If a plugin is needed for successful test or build
104 runs, (such as `lein-tar`) then it should be added to `:plugins` in
3b6b8b4 @technomancy Clarify :dev-deps vs lein plugin install.
authored
105 project.clj, but if it's for your own convenience (such as
2f3ede0 @technomancy Readme tweaks.
authored
106 `swank-clojure`) then it should be added to the `:plugins` list in the
2d3db75 @technomancy Link to profile guide in readme.
authored
107 `:user` profile from `~/.lein/profiles.clj`. See the
108 [profiles guide](https://github.com/technomancy/leiningen/blob/preview/doc/PROFILES.md)
109 for details on how to add to your user profile. The
f7795ce @technomancy Update readme links to point to preview branch.
authored
110 [plugin guide](https://github.com/technomancy/leiningen/blob/preview/doc/PLUGINS.md)
1fee69f @technomancy Update bootstrapping instructions, remove old lein.util.* references.
authored
111 explains how to write plugins.
4be3d03 @ivey Merge Colin Jones' lein-plugin plugin for managing plugins
ivey authored
112
d900c66 @technomancy Documentation updates. Mention JAVA_CMD, contribution guidelines.
authored
113 ## Contributing
114
205c586 @technomancy Move HACKING.md into leiningen-core README.md.
authored
115 Please report issues on the
2df87f3 @technomancy Reword a few things in READMEs, todo tweaks.
authored
116 [GitHub issue tracker](https://github.com/technomancy/leiningen/issues)
811e974 @technomancy Release 2.0.0-preview7.
authored
117 or the [mailing list](http://librelist.com/browser/leiningen/).
205c586 @technomancy Move HACKING.md into leiningen-core README.md.
authored
118 Personal email addresses are **not** appropriate for bug reports. See
2df87f3 @technomancy Reword a few things in READMEs, todo tweaks.
authored
119 the
120 [readme for the leiningen-core library](https://github.com/technomancy/leiningen/blob/master/leiningen-core/README.md)
121 and `doc/PLUGINS.md` for more details on how Leiningen's codebase is
122 structured. Design discussions also occur in the
a62ff25 @technomancy Update sample, readme, todo.
authored
123 [#leiningen channel on Freenode](irc://chat.freenode.net#leiningen).
045e24d @technomancy Minor readme tweaks.
authored
124
2df87f3 @technomancy Reword a few things in READMEs, todo tweaks.
authored
125 Patches are preferred as GitHub pull requests, though patches from
0a0f8ad @technomancy Expand HACKING.md a bit.
authored
126 `git format-patch` are also welcome on the mailing list. Please use
127 topic branches when sending pull requests rather than committing
6de9784 @technomancy Clarify license of images.
authored
128 directly to master in order to minimize unnecessary merge commit
129 clutter.
130
131 Contributors who have had a single patch accepted may request commit
042ec19 @technomancy Update readme for lein2.
authored
132 rights on the mailing list or in IRC. Please use your judgment
133 regarding potentially-destabilizing work and branches. Other
134 contributors will usually be glad to review topic branches before
135 merging if you ask on IRC or the mailing list.
6de9784 @technomancy Clarify license of images.
authored
136
137 Contributors are also welcome to request a free
138 [Leiningen sticker](http://twitpic.com/2e33r1) by asking on the
2df87f3 @technomancy Reword a few things in READMEs, todo tweaks.
authored
139 mailing list and mailing a self-addressed, stamped envelope.
6de9784 @technomancy Clarify license of images.
authored
140
67e8019 @technomancy Mention the Gitorious mirroring and Travis tests.
authored
141 Leiningen is [mirrored at Gitorious](https://gitorious.org/leiningen/leiningen)
142 and [tested on Travis](http://travis-ci.org/#!/technomancy/leiningen).
143
ae98527 @technomancy Add Building section to README.
authored
144 ## Building
145
a29b20c @technomancy Clarify bootstrap process.
authored
146 You don't need to "build" Leiningen per se, but when you're using a
1fee69f @technomancy Update bootstrapping instructions, remove old lein.util.* references.
authored
147 checkout you will need to get its dependencies in place.
ae98527 @technomancy Add Building section to README.
authored
148
67e8019 @technomancy Mention the Gitorious mirroring and Travis tests.
authored
149 For the master branch, use an existing Leiningen version (currently
150 this means Leiningen 1) to run `lein install` in the `leiningen-core`
151 subproject directory. When the dependencies change you will also have
152 to do `rm .lein-classpath` in the project root. It's not yet possible
153 to bootstrap a development version of Leiningen without having an
154 older version installed.
155
156 Using `bin/lein` alone from the master branch is not supported. The
157 master branch is designed to be used from a full git checkout. If you
158 want to just grab a shell script to work with, use the preview branch.
a50cef3 @technomancy bin/lein placement notes.
authored
159
a3031fb @technomancy Mention symlink for bin/lein in "Building" section of readme.
authored
160 Once you've done that, symlink `bin/lein` to somewhere on your
231daa6 @technomancy news updates.
authored
161 `$PATH`. Usually you'll want to rename your existing installation to
162 keep them from interfering.
b3e3f04 @technomancy Fix example in tutorial. Fixes #449.
authored
163
88b5360 @technomancy Initial commit.
authored
164 ## License
165
042ec19 @technomancy Update readme for lein2.
authored
166 Source Copyright © 2009-2012 Phil Hagelberg, Alex Osborne, Dan Larkin, and
4f06404 @technomancy Output full path of pom.xml.
authored
167 [contributors](https://github.com/technomancy/leiningen/contributors).
6de9784 @technomancy Clarify license of images.
authored
168 Distributed under the Eclipse Public License, the same as Clojure
169 uses. See the file COPYING.
88b5360 @technomancy Initial commit.
authored
170
79b969b @technomancy Move away from build.clj to project.clj.
authored
171 Thanks to Stuart Halloway for Lancet and Tim Dysinger for convincing
172 me that good builds are important.
173
6de9784 @technomancy Clarify license of images.
authored
174 Images Copyright © 2010 Phil Hagelberg. Distributed under the Creative
175 Commons Attribution + ShareAlike
176 License. [Full-size version](https://github.com/downloads/technomancy/leiningen/leiningen-full.jpg)
177 available.
Something went wrong with that request. Please try again.