Commit graph

516 commits

Author SHA1 Message Date
Seth Schroeder
199d03a34d [github-17] exclude Xbootclasspath from eval-in-project forking of JVM 2010-02-15 21:36:55 -08:00
Phil Hagelberg
5dcbda0ef7 Allow task functions to be defined in project.clj. 2010-02-14 14:14:49 -08:00
Phil Hagelberg
e4ae8b2bfd Make no-project-needed set an atom so plugins can add to it. 2010-02-13 09:31:51 -08:00
Phil Hagelberg
59526b5dc8 Only shutdown agents in JVMs 1.6+. 2010-02-13 09:30:10 -08:00
abscondment
8fe72c159a Refining upgrade: check for access, request confirmation. 2010-02-13 09:25:55 -08:00
abscondment
dce5992814 First pass at an upgrade task. 2010-02-13 09:25:47 -08:00
Phil Hagelberg
0aca88dcde Move test's shutdown-agents to inside eval-in-project. 2010-02-12 21:01:56 -08:00
Phil Hagelberg
4a11590edb Shut down agents after test run. 2010-02-12 12:51:58 -08:00
Phil Hagelberg
aaf60f6da0 Compile :main even if not explicitly listed in :namespaces. 2010-02-12 12:44:32 -08:00
Phil Hagelberg
14f9691e0a Fix indentation and remove outdated todos. 2010-02-12 12:44:13 -08:00
Mark McGranaghan
7d57e70e3f Differentiate between no compilable namespaces and no stale namespaces. 2010-02-12 12:38:36 -08:00
Phil Hagelberg
bf2f63c942 Modify test task so it doesn't load clojure.test in Leiningen's classloader. 2010-02-12 12:30:48 -08:00
Phil Hagelberg
94c675afe6 Exclude temp files from jar creation. 2010-02-01 20:57:34 -08:00
Phil Hagelberg
f244a34887 Whitespace fix. I'm crazy like that. 2010-02-01 20:51:35 -08:00
Perry Trolard
4b773b1835 Fix to lein-jar path resolution bug. 2010-02-01 20:46:29 -08:00
Phil Hagelberg
024f167d86 Remove overzealous arity catch.
This was catching an artity problem deeper in the code and reporting
it as "wrong number of arguments to task". Thanks to Mark McGranahan
for noticing it.
2010-01-31 21:11:48 -08:00
Rob Wolfe
d528c492ad constraining implicit dependencies resolving 2010-01-31 14:14:19 -08:00
Phil Hagelberg
a9936d22b7 Factor out form-for-testing-namespaces for other plugins to use. 2010-01-30 22:43:07 -08:00
Phil Hagelberg
24ef40dba1 Add build.clojure.org releases repository. 2010-01-30 22:11:54 -08:00
Phil Hagelberg
bd0e725548 Fix test file for generated projects. 2010-01-30 22:11:17 -08:00
Phil Hagelberg
a960a1c4ef Switch to ant 1.6.5 so we can access the subclassloader's classpath.
It's bound to user/*classpath* when using eval-in-project.
2010-01-30 21:28:02 -08:00
Rob Wolfe
9884b00bc3 cleaning :library-path 2010-01-30 16:01:58 -08:00
Phil Hagelberg
b6a807bd33 Add a note if compiling with no :namespaces specified. 2010-01-27 22:42:03 -08:00
Steve Purcell
797994881d Make "lein jar" trim :source-path from packed files, not simply "src" 2010-01-27 22:18:30 -08:00
Rob Wolfe
a33a777e71 installing pom.xml artifact along with jar 2010-01-27 22:14:29 -08:00
Rob Wolfe
4cce1fafea test path should be pointed by :test-path key 2010-01-27 22:13:41 -08:00
Phil Hagelberg
8789acc130 TODOs and readme clarification. 2010-01-27 21:38:55 -08:00
Phil Hagelberg
f3a097d958 Don't try to System/exit from within eval-in-project. It doesn't work. 2010-01-21 00:26:39 -08:00
Phil Hagelberg
b3232350e2 Update new task. Output project.clj as string. Add skeletal test. 2010-01-20 23:40:17 -08:00
Phil Hagelberg
40d8c2cff5 Merge commit 'neotyk/master' 2010-01-02 15:53:49 -08:00
Rob Wolfe
5e9f694fd3 windows environment 2010-01-02 15:23:30 -08:00
Phil Hagelberg
4fa7a13d2d Don't AOT namespaces by default. 2010-01-01 22:06:36 -08:00
Phil Hagelberg
258f72e755 Add a message in the jar task. 2010-01-01 21:57:56 -08:00
Phil Hagelberg
793285c335 Use 1.1.0 for both Leiningen itself and newly-generated projects. 2010-01-01 21:46:09 -08:00
Hubert Iwaniuk
711b3acfec replaces '.' with '/' in package name when creating dir 2009-12-30 23:40:43 +01:00
Phil Hagelberg
af77ef61ed Merge commit 'mattrepl/master' 2009-12-26 08:46:04 -08:00
Phil Hagelberg
069a96f29c Add überjar alias. 2009-12-26 08:42:37 -08:00
Phil Hagelberg
4fdad15915 Merge setfork branch. 2009-12-22 14:42:07 -08:00
Matt Revelle
bea0cfa50a Added documentation about :exclusions in :dependencies to the README and deps docstring. 2009-12-21 16:28:19 -05:00
wilkes
f963996036 in eval-in-project, added setFailonerror true 2009-12-20 22:02:31 -08:00
Matt Revelle
09911f4aa9 Added exclusions support in project files. Useful for libraries that have extra dependencies unnecessary for runtime. (Looking at you, log4j) 2009-12-20 21:59:55 -08:00
Bagu is my name. Show my code to River Man
7f1f7ba6df may have fixed issues with fork not getting jvm args and setting if on osx 2009-12-20 20:45:23 -08:00
Bagu is my name. Show my code to River Man
7661ebe493 moved setFork so that its only used when needed by native code 2009-12-20 20:45:22 -08:00
Bagu is my name. Show my code to River Man
8d35fe3f91 made changes as suggested by technomancy 2009-12-20 20:45:17 -08:00
Bagu is my name. Show my code to River Man
fa5cc6f326 more and better defaults for native-path 2009-12-20 20:44:55 -08:00
Bagu is my name. Show my code to River Man
768e5d1b18 added native-path key to project 2009-12-20 20:44:29 -08:00
Phil Hagelberg
66b4ed91e2 Rename exit-with-error to abort. 2009-12-15 19:51:09 -08:00
Dan Larkin
e4e01fe1d1 print an error message instead of a stack trace when no project.clj is found 2009-12-12 16:52:37 -05:00
Dan Larkin
54c8de178d use exit-with-error instead of printing an error message and calling System/exit separately every time 2009-12-12 16:51:37 -05:00
Phil Hagelberg
5646badf5e Be more verbose about the JVM in lein version. 2009-12-10 22:42:50 -08:00
Phil Hagelberg
63162f6229 Oops; new is shadowed by a macro; can't call it like that. 2009-12-10 22:24:06 -08:00
Phil Hagelberg
144723bad6 Avoid rest args where possible in order to catch arity mistakes. 2009-12-10 22:09:12 -08:00
Phil Hagelberg
a27704b7f9 Merge commit 'danlarkin/guard-against-arity' 2009-12-10 22:00:28 -08:00
Phil Hagelberg
8774473460 Modify test task to take advantage of fixed clojure bug #193. 2009-12-10 21:56:49 -08:00
Dan Larkin
27aebfe37d report wrong arity, don't crash 2009-12-10 23:42:19 -05:00
Dan Larkin
2ebb2f220a grammar fix 2009-12-10 23:41:34 -05:00
Dan Larkin
41274ba073 fix NPE when doing "lein core" 2009-12-10 23:23:37 -05:00
Phil Hagelberg
acf6c3a1f6 Stray println snuck in. 2009-12-10 20:06:07 -08:00
Phil Hagelberg
a59bc8d5af Call .replace instead of str-replace. Don't create lib or classes, just ignore. 2009-12-07 21:22:02 -08:00
Phil Hagelberg
94f65dadcd Don't pass in a project arg to tasks that don't use it. 2009-12-07 21:17:01 -08:00
B.Smith-Mannschott
2c83f9dd72 teach "leiningen add" not to conflate project's name and directory.
As a consequence it is now also possible to specify a groupId for a
newly created project.

lein new [group-id/]artifact-id [project-dir]

- Group-id is optional. Project-dir defaults to artifact-id if not given.
- Neither group-id nor artifact-id may contain slashes.
- Underscore (_) is normalized to dash (-) in namespace names.
- Dash (-) is normalized to underscore (_) in file and directory names.
2009-12-07 20:59:25 -08:00
Phil Hagelberg
223dffe69c Add aliases for version command. Don't need a project to use it. 2009-12-07 20:54:59 -08:00
Mike T. Miller
c521758a30 added 'version' command 2009-12-07 20:20:44 -08:00
Wayne Rittimann, Jr
2d5a1bece3 Fix for JDK 1.5 compatibility. 2009-12-06 14:07:40 -08:00
Phil Hagelberg
47a50d1695 Only include :resources-path in jar if it exists. 2009-12-03 22:36:47 -08:00
Phil Hagelberg
4dca233c8b Allow callers of eval-in-project to customize the java task. 2009-12-03 22:36:28 -08:00
Phil Hagelberg
19548745ed Add resources/ dir to the classpath and generated jars. 2009-12-02 21:07:14 -08:00
Phil Hagelberg
3a4c7e0408 Fix NPE when using -Xbootclasspath with transitive requires. 2009-12-01 23:02:44 -08:00
Phil Hagelberg
0361b0cfd0 System/exit appropriately depending on pass/fail count.
Also fixes super-summary, which an earlier commit had broken.
2009-12-01 21:11:21 -08:00
Phil Hagelberg
81d05b7ae2 Mention cleaning before uberjar to avoid dev deps. 2009-11-30 22:22:23 -08:00
Phil Hagelberg
1c17c2deca Skip dev dependencies when pulling deps for compiling. 2009-11-30 22:20:15 -08:00
Alex Osborne
fb95c5ef57 Run compile and test tasks in isolated classloader
This means that we can:
- Safely compile against alternative versions of Clojure.
- Move classpath logic from the shell script to lein itself.
- Run lein with: java -jar leiningen-standalone.jar

This patch also makes the source, test and library paths configurable
which is useful for people with special requirements like mixed-language
projects.
2009-11-30 15:34:14 +11:00
Phil Hagelberg
b9a018721e Unify terminology: there are no commands, just tasks. 2009-11-29 14:22:20 -08:00
Phil Hagelberg
4d4aa03983 Allow test task to take namespaces as an argument. 2009-11-29 14:20:09 -08:00
Phil Hagelberg
7acd4cb32d Updated todos. 2009-11-28 21:35:19 -08:00
Phil Hagelberg
eb7f69adbb Merge branch 'no-maven-shell-out' 2009-11-28 21:22:52 -08:00
Andrei Dragomir
7104b52a0c fixed weird jars issue crashing uberjar task; no longer checking input ZipEntry size 2009-11-28 20:40:28 -08:00
Phil Hagelberg
15cbad9daf Disable help summary output until Clojure bug #130 is fixed. =( 2009-11-28 20:38:24 -08:00
Phil Hagelberg
ec2724120a The install task no longer shells out to maven.
Thanks to Alex for several functions taken from clojars.
2009-11-28 20:28:33 -08:00
Phil Hagelberg
173da8ee74 Remove duplicate task output from help task.
Consolidate IO in help.
2009-11-27 20:13:36 -08:00
Phil Hagelberg
777ce00787 Don't mkdir classes if it's a task that doesn't take a project arg. 2009-11-27 20:10:41 -08:00
Dan Larkin
014b2f18f8 we no longer create a pom-generated.xml so we no longer have to clean it 2009-11-25 01:40:10 -05:00
Dan Larkin
e024e15c79 improve "clean" command: Don't delete lib/ and classes/, just empty them. Also delete -standalone jar and pom-generated.xml 2009-11-25 01:39:00 -05:00
Dan Larkin
cb5bf137a8 clean should delete whatever (:compile-path project) is, not hardcode "classes/" 2009-11-25 01:39:00 -05:00
Dan Larkin
47e7b98ddb make :compile-path a key that's always present in the project hash map 2009-11-25 01:35:07 -05:00
Dan Larkin
6fbdfb7a91 move mkdir of classes/ from shell script into core.clj 2009-11-25 01:35:07 -05:00
Phil Hagelberg
cee9dcc0ee Update todos. 2009-11-24 22:24:49 -08:00
Phil Hagelberg
39f6ab8be1 Merge commit 'danlarkin/build-jar-in-memory' 2009-11-24 22:20:18 -08:00
Dan Larkin
258b6b52e2 remove lancet require from pom, it wasn't being used 2009-11-25 00:53:13 -05:00
Dan Larkin
90d5e955fb include a pom.properties file in the jar 2009-11-25 00:50:21 -05:00
Dan Larkin
7647c6cbed refactor pom and jar code to use make-pom 2009-11-25 00:30:04 -05:00
Dan Larkin
d3159a4548 generate pom byte array (instead of on disk) and include that in the jar in appropriate meta-inf/groupid/artifactid directory 2009-11-25 00:18:31 -05:00
Dan Larkin
366c8713b0 refactor writing files to jar into a multimethod 2009-11-25 00:15:36 -05:00
Phil Hagelberg
ca0eb42f47 Neither "new" nor "help" tasks need a project to run. 2009-11-23 21:27:07 -08:00
Phil Hagelberg
a2f17c0d0b Update readme for easier dev installation; add some TODOs. 2009-11-23 21:26:47 -08:00
Dan Larkin
b7ae6e263f use java.util.jar to build jars instead of lancet 2009-11-23 01:08:44 -05:00
Phil Hagelberg
5d018c1026 Leave lib/ and classes/ intact but delete their contents. 2009-11-22 20:26:45 -08:00
Phil Hagelberg
f979048404 Merge commit 'danlarkin/improve-manifest' 2009-11-22 15:55:24 -08:00
Alex Osborne
7b6acbc5af Fix compiling of namespace that include a - character. 2009-11-22 14:55:42 -08:00
Dan Larkin
07f61f6bf6 remove gen-class on leiningen.core and update lein shell script and project file to deal with it 2009-11-22 17:09:11 -05:00
Dan Larkin
7674952db1 put Manifest.txt in classes/ instead of toplevel project directory 2009-11-22 02:58:08 -05:00
Dan Larkin
c907127edd put more info into the manifest of jars we build 2009-11-22 02:24:20 -05:00
Phil Hagelberg
08c6ba47e9 Appropriate error codes and improved message for command-not-found. 2009-11-21 22:50:56 -08:00
Dan Larkin
5df3646f8a handle missing command 2009-11-21 22:46:37 -08:00
Dan Larkin
7ca03af258 lein test should aggregate all test failures/passes etc and display a summary at the end of all the tests 2009-11-21 22:36:26 -08:00
Alex Osborne
c8ce3cd014 When creating a standalone jar don't unpack deps.
This means we don't have to unpack everything into classes/ which was
causing people to accidentally create an uberjar when they did
"lein jar".  We also merge plexus components.xml files, this means
that uberjaring projects that embed Maven (like Leiningen itself)
now works reliably.
2009-11-22 10:15:17 +11:00
Alex Osborne
b4bc2c0052 Call setScm on the model object not the scm. Oops. 2009-11-20 17:40:38 -08:00
Alex Osborne
73ff53d39e Only call setScm if retrieving git data actually works.
It worked fine before (as it just called setScm with nil)
but clearing the scm might lead to confusion down the track.
2009-11-20 17:40:26 -08:00
Phil Hagelberg
f7f8a429cc Fix fat-fingered pom generation from jar task. 2009-11-20 17:35:16 -08:00
Phil Hagelberg
ab37c75fed Make uberjar create a $PROJECT-standalone.jar file. 2009-11-20 17:30:54 -08:00
Alex Osborne
547e4484fa Populate the scm tag in the pom with git data if available. 2009-11-21 10:45:32 +11:00
Phil Hagelberg
601c00859c Only compile classes if the bytecode is older than the .clj source. 2009-11-19 18:35:23 -08:00
Phil Hagelberg
1f53bb8d00 Write to pom-generated.xml instead of pom.xml; don't prompt to overwrite. 2009-11-19 18:31:24 -08:00
Phil Hagelberg
bda58abe04 Add new task for generating project skeletons. 2009-11-19 17:50:33 -08:00
Phil Hagelberg
70a6d19546 Bump version to 1.0.0-SNAPSHOT 2009-11-19 17:22:52 -08:00
Phil Hagelberg
f97228f1a7 Calling it good: releasing 0.5.0! 2009-11-17 23:28:36 -08:00
Phil Hagelberg
a387b2196d Skip dev dependencies when they probably aren't needed. 2009-11-17 23:04:13 -08:00
Phil Hagelberg
2835866624 Added :description output to pom.xml. 2009-11-17 22:51:58 -08:00
Phil Hagelberg
4208183f1e Add somewhat-detailed help output for each task. 2009-11-17 22:49:13 -08:00
Phil Hagelberg
d31b5d673d Add help command and summaries for each command. 2009-11-17 22:29:54 -08:00
Phil Hagelberg
0a6898d8d6 Move deps-if-missing to shell script. Needs to happen before JVM launch. 2009-11-17 22:03:12 -08:00
Phil Hagelberg
879b96b70f Warning on install if mvn is missing. 2009-11-17 20:16:41 -08:00
Phil Hagelberg
87afe4394a Add disclaimer to autogenerated pom files. 2009-11-16 22:18:15 -08:00
Phil Hagelberg
74f3a91318 Enable jars to be created with Main-Class set in manifest. 2009-11-16 21:49:36 -08:00
Phil Hagelberg
98332899aa Add src/ and project.clj to jar. 2009-11-16 20:41:54 -08:00
Phil Hagelberg
4b65172b39 Prompt to overwrite if pom.xml exists already. 2009-11-16 20:24:36 -08:00
Phil Hagelberg
ebd3c2c3d7 Allow setting group in defproject. 2009-11-16 20:05:07 -08:00
Phil Hagelberg
28e6c72b41 Fix central repo URL, and separate out deps vs pom repo/dependency classes. 2009-11-16 16:28:17 -08:00
Phil Hagelberg
74d3709a85 Added first-pass implementation of install command.
Since the API for re-using pom objects is a bit nutty, this
implementation simply shells out to mvn. Future versions will fix this
shortcoming.
2009-11-15 21:08:23 -08:00
Phil Hagelberg
8782408fe6 Remove some overlap from pom.clj and deps.clj.
Still some overlap, but ant's API for relying on pom functionality in
deps.clj is annoying.
2009-11-15 21:07:11 -08:00
Phil Hagelberg
6dfa557c11 Add pom task. 2009-11-15 15:11:01 -08:00
Phil Hagelberg
be8904b6f3 Move the remnants of swank out of lein proper. 2009-11-15 14:41:45 -08:00
Phil Hagelberg
ddf403dedb Spin off swank into a subproject. 2009-11-14 20:47:48 -08:00
Phil Hagelberg
05471a51b8 Only bring in dev dependencies when testing. 2009-11-14 20:47:01 -08:00
Phil Hagelberg
088e52afc7 Support development dependencies. 2009-11-14 20:28:54 -08:00
Phil Hagelberg
41967895b0 Use lancet for jar creation. 2009-11-14 20:14:18 -08:00
Phil Hagelberg
35ebb7f0f0 Download dependencies where appropriate. 2009-11-14 17:17:27 -08:00
Phil Hagelberg
12f0b98abc Allow custom :repositories to be specified in project.clj.
Add build.clojure.org as a default repo.
2009-11-14 15:31:42 -08:00
Phil Hagelberg
e1a2d49278 Don't freak out when cleaning an already-clean project. 2009-11-14 14:37:18 -08:00
Phil Hagelberg
acb11e3a41 Use group.id/artifact notation in project.clj. 2009-11-14 14:33:39 -08:00
Phil Hagelberg
b36f9c1b12 Couple more TODOs 2009-11-14 14:25:27 -08:00
Phil Hagelberg
42cdf1f622 Version is no longer optional in defproject. 2009-11-14 14:24:36 -08:00
Phil Hagelberg
259f753c4a Comment out broken lancet call. 2009-11-11 21:23:58 -08:00
Phil Hagelberg
b3f158d50b Move condition to doseq form in uberjar. 2009-11-11 21:23:45 -08:00
Phil Hagelberg
c27e16e744 Don't need to bind *compile-path* in compile. 2009-11-11 21:23:16 -08:00
Phil Hagelberg
d230820d8d Remove need for fully-qualified defproject.
Not sure I'm 100% happy with this solution as it adds a var in clojure.core.
2009-11-09 22:18:02 -08:00
Phil Hagelberg
dcbc5ff8f2 Update lancet to use latest ant API. 2009-11-09 20:27:56 -08:00
Phil Hagelberg
4d83663882 Add swank command. 2009-11-08 22:23:00 -08:00
Phil Hagelberg
91f5d54891 Add jar and uberjar commands. 2009-11-08 22:11:31 -08:00
Phil Hagelberg
c558fe9e17 Add clean command. 2009-11-08 22:09:39 -08:00
Phil Hagelberg
b381c460a5 Use with-ns so defproject works unqualified. Bind *compile-path* explicitly.
Not sure why explicit *compile-path* is required, but it was getting
reset somehow.
2009-11-08 22:08:20 -08:00
Phil Hagelberg
9781da1dbd Bite the bullet and bundle lancet since it's not in any real repo yet. 2009-11-05 20:38:21 -08:00
Phil Hagelberg
79b969b425 Move away from build.clj to project.clj. 2009-11-05 20:36:27 -08:00
Phil Hagelberg
8aad65943e Allow tests to be filtered on predicates. 2009-11-04 22:10:29 -08:00
Phil Hagelberg
ac719fa61c Fix dependency unpacking to use right directory. 2009-11-04 22:09:45 -08:00
Phil Hagelberg
b3e0233a25 Added FAQ, License. 2009-11-04 20:25:13 -08:00
Phil Hagelberg
3413b16b2a Bind *compile-path*, not sure how it becomes unbound. 2009-11-02 22:27:16 -08:00
Phil Hagelberg
6aebd55634 Fix defproject. Unfortunately build.clj needs to call it fully-qualified. 2009-11-02 22:20:29 -08:00
Phil Hagelberg
f8d6035dd8 Implement compile command. 2009-11-02 21:22:57 -08:00
Phil Hagelberg
d678f25aef Remove stub namespaces for now. 2009-11-02 21:22:33 -08:00
Phil Hagelberg
93bcde9126 Move to leiningen.core. 2009-11-02 21:22:11 -08:00
Phil Hagelberg
73115a5765 Added test namespace/task. 2009-11-01 22:47:27 -08:00
Phil Hagelberg
f53cc17864 Move main.clj to core.clj 2009-11-01 22:22:43 -08:00
Phil Hagelberg
f47a05eaf2 Put jars directly in lib/ instead of nesting. 2009-11-01 14:41:59 -08:00
Phil Hagelberg
c308263048 Split functionality out into several namespaces. 2009-10-31 22:45:53 -07:00
Phil Hagelberg
88b53602f7 Initial commit. 2009-10-31 21:48:57 -07:00