Commit graph

1040 commits

Author SHA1 Message Date
Gary Fredericks
5a089b8e18 Issue #1276: cleanup wrong-arg-num err msg on 0-arg tasks
0 arg task arglist was printing as `""` since passing `[project]` to
`next` resulted in `nil` which prints as `""`. Used `(comp vec next)`
instead to force it into `[]` which prints as `"[]"`.
2013-08-05 15:07:41 -05:00
Yoshinori Kohyama
c3a60886f3 Issue #1272: Add :clean-targets option
Add :clean-targets option to let `lein clean` remove files under
directories other than one specified by :target-path
2013-08-04 18:46:16 +09:00
Phil Hagelberg
9f9ab003cd Oops; typo. 2013-07-30 21:00:52 -07:00
Phil Hagelberg
0f8d67d2e3 Remove dependency on "useful" library for packaging purposes.
This dependency pulls in a number of other dependencies which we don't
use but which are difficult for downstream packagers to deal with.

Include our own version of map-vals (because seriously, why is this
not already part of Clojure) and update-first (because re-forming
those problems without it crazy convoluted). But our implementation is
a fair bit shorter because it doesn't have to handle all the edge
cases.
2013-07-30 20:57:56 -07:00
Jean Niklas L'orange
2324cd21fc com.hypirion.io 0.3.1 (1.6-compiled) 2013-07-30 16:01:35 +02:00
Jean Niklas L'orange
3c2cd2f5a1 Bump com.hypirion.io to 0.3.0. 2013-07-30 11:19:44 +02:00
Phil Hagelberg
53fdf1c685 Scope :compile-path and :native-path under :target-path. 2013-07-24 20:55:28 -07:00
Phil Hagelberg
962ce20ae9 Scope :compile-path and :native-path under :target-path. 2013-07-24 20:55:23 -07:00
Phil Hagelberg
5b26b89d9c Support :pedantic? :abort/:warn.
Move range/overlap detection into l.c.classpath.

Fixes #1197.
2013-07-22 18:45:16 -07:00
Jean Niklas L'orange
b540e8ae95 Merge branch 'expand-composite-profiles' 2013-07-20 18:50:34 +02:00
Jean Niklas L'orange
7a935545c4 Don't attach subprofiles to metadata map.
Whenever composite profiles were added to project maps, their children
were also attached as active profiles. This confuses `with-profile` and
profile merging task where excluded profiles only remove the name of the
composite profile, not the subprofiles. This allows uberjar to exclude
the default profile without excluding subprofiles, without excluding
active subprofiles themselves.

So these task actions now produce sensible results:
`lein with-profile +dev uberjar` -> uberjar with dev-dependencies, but
without the other default profiles
`lein -U uberjar` -> uberjar with snapshot updates, but not with any
default dependencies added.

Fixes #1233.
2013-07-20 18:45:07 +02:00
Jean Niklas L'orange
cd8ed45638 Expand composite profiles before removing them.
This seem to handle #1233 correctly, but breaks a pom test. I assume
there's some part of the merge logic I've forgotten, so feel free to
peek around and comment on what I've currently done.
2013-07-18 01:45:25 +02:00
Phil Hagelberg
39fa6afb52 Default to recursive checkout deps.
Fixes #1190.
2013-07-16 20:22:09 -07:00
Phil Hagelberg
214fd7c6a2 Empty :*-paths when running outside a project dir.
Fixes #1253.
2013-07-15 13:33:43 -07:00
Phil Hagelberg
57c0b1e0e2 Remove :target-path from :base profile.
Fixes #1222; might introduce even more problems.
2013-07-12 07:45:07 -07:00
Phil Hagelberg
1225f0bf4f Error message when aws creds are missing. 2013-07-12 07:44:51 -07:00
Phil Hagelberg
c701c57440 Move download-calculating script. 2013-07-12 07:40:06 -07:00
Gabriel Horner
f0bf04007e fix typo in docstring 2013-07-01 07:29:18 -04:00
Juergen Hoetzel
28fad91bfb Keep init-file when using LEIN_FAST_TRAMPOLINE 2013-06-20 22:20:42 +02:00
Stuart Sierra
fb133fdb67 Set default :jvm-opts in :base profile to :displace
When the default behavior for `:jvm-opts` is additive, it can lead to
unexpected results if a project tries to add its own options which
conflict with the defaults. For example, the following setting:

    :jvm-opts ["-XX:-TieredCompilation"]

Results in a JVM command line like this, in which the project's JVM
options are overridden by the defaults:

    -XX:-TieredCompilation -XX:+TieredCompilation -XX:TieredStopAtLevel=1

By setting :displace metadata on the default :jvm-opts, any project
configuration of :jvm-opts will replace the defaults.
2013-06-18 14:55:08 -04:00
Juergen Hoetzel
43fe245b4f Delete the initfile when the subprocess exits, not when the Leiningen process exits
Fixes issues when a task is applied via trampoline:

Exception in thread "main" java.io.FileNotFoundException: /tmp/form-init2098686718977910298.clj (No such file or directory)
2013-06-16 16:05:22 +02:00
Juergen Hoetzel
0bac7b7ea0 Use (pr-str form) to write form to init-file
Ensures that the form can be read by read-string. Fixes issues when
the form is lazy, which result in invalid init files like:

clojure.lang.LazySeq@451d3cd3
2013-06-16 15:51:13 +02:00
Jean Niklas L'orange
1c43a36125 Add in todos for 3.0.0. 2013-06-15 22:14:22 +02:00
Juergen Hoetzel
90a74131c9 use init-file (-i) instead of form (-e) when evaluating forms in subprocess.
The form is still not passed correctly on Windows, when it has nested quotes is passed via "-e".
See: http://bugs.sun.com/view_bug.do?bug_id=6468220

Refs #1203
Refs #863
Refs #1224
2013-06-15 14:01:01 +02:00
Juergen Hoetzel
89c4bf7520 Use nested strings in test-eval-in-project, refs #1203
Test double quote issues on Windows platform: http://bugs.sun.com/view_bug.do?bug_id=6468220
2013-06-15 13:43:51 +02:00
Phil Hagelberg
8307aa58fc Fix long line.
[ci skip]
2013-06-06 09:37:33 -07:00
Roberto Mannai
f4a0fcfa34 Suggestion on when you have to set the 'http_proxy' variable
For example, on Windows:
set http_proxy=http://user:pwd@proxyserver:port
2013-06-05 16:14:08 +03:00
Phil Hagelberg
e4b66b2b9e Bump back to snapshot.
[ci skip]
2013-05-28 21:43:13 -07:00
Phil Hagelberg
5eaad5c48d Release 2.2.0 2013-05-28 17:04:23 -07:00
Phil Hagelberg
c5767cdaca Support :bootclasspath in :java-agents. 2013-05-16 13:45:40 -07:00
Phil Hagelberg
3d9d5b54b6 Don't use two-clause cond. 2013-05-16 10:34:07 -07:00
AtKaaZ
533f4725db fix repo name should not contain path delims under windows so test won't
fail
all tests pass under windows
2013-05-16 05:32:38 +03:00
AtKaaZ
0277ec3e41 Merge remote-tracking branch 'upstream/master' into testsUnderWindows1 2013-05-16 05:04:16 +03:00
Phil Hagelberg
a99d923cb2 Preliminary support for :java-agents. 2013-05-15 17:32:43 -07:00
Phil Hagelberg
d432377964 Hold back on :aot :all in the uberjar profile till 3.0. 2013-05-15 15:36:38 -07:00
Phil Hagelberg
94beeeffc4 Some todos. 2013-05-15 13:53:07 -07:00
Phil Hagelberg
cbff7f06fb Fix -o and -U aliases to be additive. 2013-05-15 13:53:01 -07:00
Phil Hagelberg
bba38c436a Don't block :user profile from ~/.lein/profiles.d. 2013-05-15 13:31:29 -07:00
Phil Hagelberg
c5e5ed61af Fix classpath test to match new checkout-deps behaviour. 2013-05-14 20:44:18 -07:00
AtKaaZ
9f984cbf46 Merge remote-tracking branch 'upstream/master' into testsUnderWindows1
Conflicts:
	leiningen-core/test/leiningen/core/test/classpath.clj
2013-05-15 06:16:13 +03:00
AtKaaZ
3521a21a9d moving 2 functions from utils to helper
merged all commits to date which required adding "dev-resources" so a
test wouldn't fail
`bin\lein test` tested under windows (currently 2 failures and 1 error)
2013-05-15 02:39:23 +03:00
AtKaaZ
6c34ce7e6f Merge branch 'master' into testsUnderWindows1 2013-05-15 01:53:44 +03:00
Phil Hagelberg
7b32caf8f6 Merge default profiles in checkout-deps project reading.
Fixes #1180, but in a way that's probably too clever.

Makes it possible to recursively descend into checkout dependencies
with the following addition to the `:user` profile:

`:checkout-deps-shares [#=(resolve leiningen.core.classpath/checkout-deps-paths)]`
2013-05-14 15:15:40 -07:00
Phil Hagelberg
f21a2c4a64 Merge :uberjar profile when uberjarring.
Fixes #1170.
2013-05-14 14:31:01 -07:00
Phil Hagelberg
f40da67ece Make profile-scope-target-path work with anonymous profiles.
Also make it work in scenarios where the project map lacks :target-path.
2013-05-14 13:42:41 -07:00
Phil Hagelberg
a1d7b6f3ea Scope :target-path by profile unless it's the default (:base).
Anyone using a %s pattern in their custom :target-path will get this
behaviour, but strings that don't have it will continue to behave as
normal.

Fixes #468.
2013-05-14 11:40:56 -07:00
AtKaaZ
9588d307d5 Merge branch 'master' into testsUnderWindows1 2013-05-13 21:00:58 +03:00
Phil Hagelberg
cf679d4f1c Normalize :mirrors like :repositories. Fixes #1171. 2013-05-13 09:40:34 -07:00
AtKaaZ
a8e20e96ce fix some path errors in windows tests
lein test still has 2 failures and 1 error after this.
normalize-path should now handle absolute *nix paths correctly under
windows
addresses #1176
2013-05-13 08:15:55 +03:00
Colin Jones
b4660d52db Bump nrepl & clojure-complete dependencies 2013-05-12 15:19:07 -05:00
Phil Hagelberg
92615f15ce Don't create target/classes unless we're in an actual project.
Fixes #589.
2013-05-09 16:35:20 -07:00
Phil Hagelberg
1f65fa4468 Remove stray println. 2013-05-09 16:34:58 -07:00
Ryan Fowler
1ab531fcc8 Better at knowing what get-dependencies calls have been memoized
It turns out that #1162 wasn't that helpful because the project
argument keeps changing. This new version makes the real worker get a
filtered version of project, so that memoization hits are much more
likely.
2013-05-02 19:04:42 -05:00
Phil Hagelberg
01dd252b8a Fix a bunch of tests from reorg-repl. 2013-05-02 14:12:58 -07:00
Phil Hagelberg
5adef11d33 Some more don't-warn-when-missing profiles. 2013-05-02 13:59:10 -07:00
Phil Hagelberg
086ab45ad3 Merge remote-tracking branch 'ryfow/memoize-get-dependencies'
# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
2013-05-02 13:51:33 -07:00
Phil Hagelberg
c508badfd9 Add :repl to list of don't-warn-when-missing profiles. 2013-05-02 13:48:55 -07:00
Phil Hagelberg
02f1d5dc82 Merge branch 'reorg-repl'
Conflicts:
	leiningen-core/src/leiningen/core/main.clj
	leiningen-core/src/leiningen/core/project.clj
	src/leiningen/repl.clj
2013-05-02 13:13:55 -07:00
Ryan Fowler
f613c40668 memoize get-dependencies
get-dependencies is expensive and sometimes gets called multiple times
with the same arguments. This pretty consistently knocks a couple
tenths of a second off of the extremely common
 `lein repl < /dev/null`.
2013-05-01 17:26:35 -05:00
Christoffer Sawicki
f20230c490 Make error messages in project/read refer to correct file 2013-04-27 23:53:19 +02:00
Colin Jones
f0582e2314 Escape quotes for Java versions below 7
See http://gluck-md.blogspot.com/2012/12/jdk7-surprise.html

fixes #1121
2013-04-14 21:03:57 -05:00
Phil Hagelberg
7ef8170aea Back to 2.2.0-SNAPSHOT. 2013-04-12 10:16:37 -07:00
Phil Hagelberg
eccd23d062 Release 2.1.3 2013-04-12 10:02:18 -07:00
Marko Topolnik
26cb21935b Revert "project.clj setting overrides profile setting" 2013-04-10 14:25:59 +02:00
Marko Topolnik
f19eeeb746 Populate project-map meta when outside project
// cherry-picked from master
2013-04-10 13:48:02 +02:00
Marko Topolnik
7a7e7fb623 project.clj setting overrides profile setting
// fixes #1128
2013-04-10 12:19:52 +02:00
Marko Topolnik
ea29210d23 Populate project-map meta when outside project
// fixes #1129
2013-04-10 12:08:26 +02:00
bdollard
3debae78c0 fixes #1123: mirrors can get credentials using gpg 2013-04-03 14:06:19 -04:00
Marko Topolnik
0908397422 Add resolve-and-apply to main and use it
Fixes #1120
2013-04-03 16:20:32 +02:00
Jean Niklas L'orange
95185a9b0a Improve error messages when reading user profiles.
Also associates :origin to the file the user profile were defined in,
and tags it within its metadata.
2013-03-30 16:36:21 +01:00
Phil Hagelberg
da76893c23 Back to 2.2.0-SNAPSHOT. 2013-03-28 15:38:43 -07:00
Phil Hagelberg
10d7d1faa3 Release 2.1.2 2013-03-28 14:46:32 -07:00
Phil Hagelberg
078ff98f3d Merge pull request #1114 from joelittlejohn/system-no-proxy
Add support for no_proxy environment variable
2013-03-28 12:15:57 -07:00
Phil Hagelberg
f5c2d04b57 Move default :test-selectors to :leiningen/test profile.
Fixes #1099.
2013-03-28 11:38:04 -07:00
Phil Hagelberg
a42c5521f4 Move Tiered Compilation to LEIN_JVM_OPTS and document.
Fixes #1111.
2013-03-28 11:04:13 -07:00
Joe Littlejohn
802e666f14 Add support for no_proxy environment variable
Closes #816.
2013-03-28 17:47:46 +00:00
Jean Niklas L'orange
51a2e1e625 Add tests for IObj vs. non IObjs merging. 2013-03-27 20:20:53 +01:00
Jean Niklas L'orange
664da4a3df Allow IObjs to be cmp. to non IObjs when merging.
Fixes #1110.
2013-03-27 20:20:15 +01:00
Jean Niklas L'orange
c42bb2a2c0 Only try to open file when needed in lein-version.
(This should fix the breaking tests.)
2013-03-27 19:38:15 +01:00
Pierre-Yves Ritschard
dc3cade47c Fetch version from pom.properties
After clarifying things with @technomancy, it makes more sense
to pull the version from the already provisionned pom.properties
file.
2013-03-27 00:37:24 +01:00
Pierre-Yves Ritschard
ea0b00a199 Provide a default version for leiningen
For odd cases where leiningen is called without the wrapper shell script, any occurence of `:min-lein-version` will throw an exception since `leiningen-version` will return nil.

This fixes jenkinsci/leiningen-plugin#1 for instance.
I see two other ways to fix this:

- have the version be propagated from project.clj directly, through substitution
- let leiningen-version return a string that always passes or always fails (not sure which is best) the `:min-lein-version` requirement
2013-03-26 23:54:21 +01:00
Gary Verhaegen
57f2228fbb Add way to set global vars (*assert*, *warn-on-reflection*, etc.) through config key :global-vars. 2013-03-26 21:54:27 +01:00
Jean Niklas L'orange
4e77b0d3d5 Change line endings for lein new on Windows.
Fixes #1061.

This also incorporates the new environment variable
LEIN_NEW_UNIX_NEWLINES, for people who prefer to have '\n' as their
newline on non-unix operating systems.
2013-03-26 02:45:44 +01:00
Phil Hagelberg
76dcd9c01d Move repl dependencies to dev profile. Fixes #1076. 2013-03-24 15:36:33 -07:00
Phil Hagelberg
160666ca3d Merge pull request #1094 from mtopolnik/remove-warn-chaining
Consider removing warn-chaining
2013-03-23 20:18:51 -07:00
Marko Topolnik
64dec29c14 Remove warn-chaining 2013-03-23 22:46:37 +01:00
Marko Topolnik
41f5641dfc Delete duplicate code 2013-03-23 17:15:02 +01:00
David Powell
b097e3fc2c Fix for incorrect escaping of parameters on Windows
fixes #863 - exception when running lein check
2013-03-23 13:33:20 +00:00
Phil Hagelberg
3edc5c3d44 Bump version back to 2.2.0-SNAPSHOT 2013-03-21 15:41:14 -07:00
Phil Hagelberg
bc84d8d166 Release 2.1.1 2013-03-21 15:32:09 -07:00
Phil Hagelberg
56a0bb1187 Add :test-paths to :checkout-deps-shares.
Fixes #950.
2013-03-21 12:40:24 -07:00
Phil Hagelberg
5c294e66e7 Allow run task to operate outside project directory.
Fixes #1086.
2013-03-21 12:39:29 -07:00
Phil Hagelberg
50a15b9d2a Merge remote-tracking branch 'origin/with-profile-symmetry'
# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
2013-03-20 15:15:04 -07:00
Phil Hagelberg
305bfc1410 Bump version numbers to 2.2.0-SNAPSHOT.
[ci skip]
2013-03-20 12:49:31 -07:00
Colin Jones
fe6a0d1db2 Unify & expand the profile list for show-profiles 2013-03-19 23:12:12 -05:00
Phil Hagelberg
904f2c91a4 Release 2.1.0 2013-03-19 19:45:21 -07:00
Phil Hagelberg
fa602e807b Look for bare maps in ~/.lein/profiles.d/*; disallow :user there.
Fixes #1068.
2013-03-19 19:39:36 -07:00
Phil Hagelberg
ededa95c2d Merge remote-tracking branch 'marcliberatore/natives-update-java-library-path' 2013-03-19 14:25:48 -07:00
Marc Liberatore
d9e943e519 fix error in test introduced in 43581e2 2013-03-19 16:07:06 -04:00
Marc Liberatore
43581e240f update java.library.path based on :native-prefix, addressing #898 2013-03-19 15:25:51 -04:00
Phil Hagelberg
3816f67861 Bump cheshire, slingshot, and pomegranate deps. 2013-03-19 10:24:56 -07:00
Michael Klishin
8a06fbdb22 Merge pull request #1077 from djpowell/windows-system-profile
use an appropriate location for system profiles on windows
2013-03-18 12:59:15 -07:00
Phil Hagelberg
568065d4d9 Formatting for leiningen-core files. 2013-03-18 09:34:40 -07:00
Phil Hagelberg
8f953e21cf Bootstrap leiningen-core with the base profile only. 2013-03-18 09:21:00 -07:00
Phil Hagelberg
2b6e29c272 Prefer ^:private to closing over an atom.
For consistency more than anything else.
2013-03-18 09:11:43 -07:00
Phil Hagelberg
d4ea69d93b Warn when system profiles contain :repositories. 2013-03-18 09:10:35 -07:00
Phil Hagelberg
a23f4be441 Add :system to list of profiles applied by default. 2013-03-18 09:03:37 -07:00
david.powell
05bf3de42c use an appropriate location for system profiles on windows
move os detection into leiningen.core.utils
2013-03-18 15:20:54 +00:00
Jean Niklas L'orange
d27ec33cd7 credentials-fn != credentials 2013-03-18 02:44:16 +01:00
Tim McCormack
90f8cad903 Bugfix: Restrict repo credential lookup to known keys.
The last test in that set is a regression test discovered while working
on #949.
2013-03-17 20:55:28 -04:00
Toby Crawley
e836a57e1b Add notice about 'help gpg' to error output.
This covers artifact signing, credential decryption, and dependency
verification.
2013-03-17 17:08:51 -07:00
Phil Hagelberg
0e132292b7 Merge remote-tracking branch 'hyPiRion/read-nonblocking'
Conflicts:
	src/leiningen/deploy.clj
2013-03-17 08:05:11 -07:00
Phil Hagelberg
43a9994171 Disable :prep-tasks in out-of-project runs. 2013-03-16 16:23:14 -07:00
Phil Hagelberg
b42d5eab73 Use :user profile when running outside project root.
Make repl outside project dir go through eval-in-project anyway.

Fixes #966.
2013-03-16 16:18:49 -07:00
Jean Niklas L'orange
8890cc0c64 Drag out piping logic to com.hypirion.io 2013-03-16 23:24:52 +01:00
Jean Niklas L'orange
d4993be57a Bump dependency on com.hypirion.io 2013-03-16 23:24:48 +01:00
Phil Hagelberg
81413b3143 The :base profile makes no sense outside a project. 2013-03-16 14:01:09 -07:00
Toby Crawley
da1856a5c4 Handle the case where gpg isn't installed; consolidate gpg usage. 2013-03-15 16:13:06 -04:00
Toby Crawley
b2b0251382 Update to bultitude 0.2.2 across the board.
This eliminates the need to exclude dynapath, since pomegranate and
bultitude now use the same version. This also updates core's pom.xml
with other recent version updates.
2013-03-15 12:05:29 -04:00
Phil Hagelberg
d990ec5d94 Fix typo in key-manager-factory; memoize entire make-sslcontext. 2013-03-14 21:47:38 -07:00
Phil Hagelberg
2579b2989d Load key-manager-properties from user profile as well. 2013-03-14 21:37:40 -07:00
Stephen Nelson
18eab507e9 added default-key-manager that emulates the default JSSE behaviour.
Reads keyStore system properties and creates a KeyManagerFactory and
using it to create an SSLContext.
2013-03-14 21:21:20 -07:00
Jean Niklas L'orange
85f236310c Manually memoize to be able to warn when needed.
For instance would password reading not work as intended when this input
is rebound.
2013-03-14 23:32:55 +01:00
Jean Niklas L'orange
04b3835463 Rebind only when needed. 2013-03-14 23:32:55 +01:00
Jean Niklas L'orange
5742386022 Use RevivableInputStream to avoid blocking reads. 2013-03-14 23:32:54 +01:00
Jean Niklas L'orange
108980adfc Send bytes as received for correctness. 2013-03-14 23:30:08 +01:00
Phil Hagelberg
e57b9f1810 Move checking of LEIN_OFFLINE into defaults map to lower priority.
Fixes #961.
2013-03-14 11:58:02 -07:00
Phil Hagelberg
ea604f61c4 Suppress stack traces when dependencies can't resolve. 2013-03-14 11:56:25 -07:00
Laurent Petit
4c1d14bf81 When l.c.classpath/get-dependencies fails, it now propagates the root exc 2013-03-14 10:45:49 -07:00
Colin Jones
7663a004ed Tidy up a few tests
Mostly gets project maps in a format suitable for eval-in-project
(including the repositories), but also number-ifies port for aether (the
way the real URL.getPort method behaves).
2013-03-14 12:23:19 -05:00
Colin Jones
984f189606 Fix docstring typo 2013-03-14 12:12:11 -05:00
Colin Jones
0599cd59ca Send https proxy property down to subprocesses
fixes #1060
2013-03-14 10:47:28 -05:00
Nelson Morris
e2f19e5b77 Warn on version ranges for deps :tree
Use the new :repository-session-fn keyword for pomegranate
to add a DependencyChainFilter that checks for version ranges.

We store them in an atom because this might happen on another thread,
and we need to allow all of the ranges to be found.

Fixes #734
2013-03-13 00:04:12 -05:00
Hugo Duncan
6ade0b7822 Add alias for bootstrap in leningen-core 2013-03-12 22:58:50 -04:00
Michael Klishin
c85fc14030 Bump Clojure to 1.5.1 2013-03-12 20:37:10 +04:00
Phil Hagelberg
81f51b6adf Bump http-wagon version. Fixes #1051. 2013-03-07 09:10:05 -08:00
Chas Emerick
749998bda9 fix :checkout-deps-shares to work with non-project-key fns, fixes gh-1049 2013-03-06 13:58:10 -05:00
AtKaaZ
fdaa492151 upgrade bultitude from 0.1.7 to 0.2.1 else compilation fail on windows
(at least)
2013-03-02 03:23:55 +01:00
Chas Emerick
9f16f233a6 Only register wagons from each file once 2013-03-01 00:42:17 -05:00
Marc Liberatore
d3a7047c72 add a per-dependency :native-prefix, addressing #898 2013-02-28 17:43:37 -08:00
Phil Hagelberg
f7f588b739 Implement system-level profiles. Fixes #981. 2013-02-28 12:04:12 -08:00
Phil Hagelberg
fd11857be3 Merge pull request #1032 from juggler/accept-credentials-in-url
Deploy task should accept repo URL with credentials in it
2013-02-27 07:24:01 -08:00
Max Prokopiev
a61d6a66a6 [#975] Deploy task should accept repo URL with credentials in it 2013-02-27 15:43:34 +04:00
Phil Hagelberg
ff0f5a6d04 Workaround for :test-selectors and #878.
Gotta love how quote silently discards metadata wooooo.
2013-02-26 11:57:50 -08:00
Phil Hagelberg
4315a64465 Move default test selectors to base profile.
Fixes #1031.
2013-02-26 10:29:58 -08:00
aroemers
5a1056859f Fix reporting resolving issues other than for missing artifacts. 2013-02-23 19:29:29 +01:00
Phil Hagelberg
57ea876ddd Moving Tiered Compilation to the dev profile.
Ensures the fix to #1025 doesn't affect production usage of Leiningen.
2013-02-21 21:01:01 -08:00
Phil Hagelberg
ecf6ca40c8 Stop tiered compilation at 1 in project JVM.
Fixes #1025.

We're doing this for Leiningen itself already, but I was hesitant to
do it for the project JVM as well until the stack trace bug came up.
2013-02-21 20:58:53 -08:00
Phil Hagelberg
52ae933cfa Fix tests to no longer look for shouty output prefix. 2013-02-21 13:35:21 -08:00
Phil Hagelberg
3b3573b47b Revert "Logging warnings to stderr and editing for consistency"
This reverts commit 4f05a44a0e.

Conflicts:
	leiningen-core/src/leiningen/core/project.clj
	src/leiningen/deploy.clj
	src/leiningen/test.clj
	src/leiningen/with_profile.clj
2013-02-21 13:29:48 -08:00
Hugo Duncan
8472e347fd Output task not found messages to *err*
Throws an ex-info rather than calling abort to avoid the "Leiningen has
encountered a critical error and will now exit." message.

Adds a check for a :suppress-msg key before printing the exception message in
leiningen.core.main/main.
2013-02-21 16:01:25 -05:00
Phil Hagelberg
1e49148267 Merge pull request #1022 from tobias/dynapath-update
Force usage of newer dynapath until pomegranate updates.
2013-02-21 12:07:04 -08:00
Toby Crawley
5fd5592711 Force usage of newer dynapath until pomegranate updates.
This fixes the issue causing the build failures. The root of it is
that dynapath was allowing pomegranate to modify the boot classloader,
which caused multiple copies of the same class to be loaded.
2013-02-21 15:04:26 -05:00
Phil Hagelberg
cc4045b932 Merge remote-tracking branch 'hugoduncan/feature/fix-recursive-alias-993'
Conflicts:
	leiningen-core/test/leiningen/core/test/project.clj
2013-02-21 12:04:19 -08:00
Hugo Duncan
1a7b9d11e7 Log classpath files at debug in get-classpath
Logging the classpath facilitates diagnosis of classpath issues.
2013-02-18 17:21:15 -05:00
Jean Niklas L'orange
2ab0f9df5f Add in old fns to avoid breakage in plugins.
Also tag them as deprecated. (Since I was a bit too eager on this one,
feel free to revert to before the merge if the changes aren't worth it.)
2013-02-18 00:44:40 +01:00
Jean Niklas L'orange
6aed6d377f Resolve failing test introduced by *warn*.
Also move abort-msg up to leiningen core and call it from the leiningen
test helpers package instead.
2013-02-18 00:07:53 +01:00
Jean Niklas L'orange
dff5865b2e Merge branch 'master' of https://github.com/benjaminsavoy/leiningen
Conflicts:
	leiningen-core/src/leiningen/core/project.clj
2013-02-17 23:17:57 +01:00
Benjamin Savoy
4f05a44a0e Logging warnings to stderr and editing for consistency 2013-02-17 11:10:41 +01:00
Hugo Duncan
fb1e73cd3b Add test cases for warn-user-repos and fix
Refactored warn-user-repos to take an argument to enable testing.

The tests are different depending on whether
LEIN_SUPPRESS_USER_LEVEL_REPO_WARNINGS is set or not.  This is not ideal, but
there doesn't seem to be a good way of altering the environment variables in
clojure.
2013-02-16 22:29:12 -05:00
Hugo Duncan
7807740f8b Add LEIN_SUPPRESS_USER_LEVEL_REPO_WARNINGS
Can be used to suppress warnings about repositories in user level profiles.  Also
adds the list of profiles containing :repositories when not suppressed.
2013-02-16 22:29:12 -05:00
Anthony Grimes
f11d7d2234 Make sure metadata is propagated. 2013-02-15 15:23:59 -08:00
Anthony Grimes
4080c1e62f Add a simple alias mechanism for :repositories and :deploy-repositories. 2013-02-15 14:29:32 -08:00
Phil Hagelberg
26fee30387 Add Sonatype OSS snapshots repo for pomegratate. 2013-02-11 14:39:22 -08:00
Phil Hagelberg
cb71b5a071 Merge pull request #991 from hugoduncan/feature/simplify-deploy
Simplify deploy by moving coordinate merging into aether
2013-02-10 22:13:54 -08:00
Hugo Duncan
551479fc5a Fix stack overflow on with-profile self-aliases
An alias such as {"doc" ["with-profile" "+doc" "doc"]} was leading to a stack
overflow when executed.

This was due to the project being reload when with-profile calls set-profiles,
thus re-instating the aliases that have been removed by remove-alias.
2013-02-08 22:56:42 -05:00
Jean Niklas L'orange
147dfbc3da Add tests for prioritized repos. 2013-02-08 21:04:58 +01:00
Jean Niklas L'orange
120c54ab3c Pick prioritized value in add-repo if there is one 2013-02-08 21:04:23 +01:00
Jean Niklas L'orange
cd52531897 Move prioritized picks out of meta-merge. 2013-02-08 21:03:29 +01:00
Hugo Duncan
cc335da313 Simplify deploy
This takes advantage of the coordinate merging in pomegranate.aether/deploy.
2013-02-08 11:10:01 -05:00
Phil Hagelberg
f822cedeac Add experimental support for :eval-in :nrepl. 2013-02-07 15:15:24 -08:00
Jean Niklas L'orange
0864e69455 Implement symlink?. 2013-02-07 20:49:00 +01:00
Tim McCormack
f7fbda14c8 Use -- to treat filenames as non-option args to gpg.
Ordinarily I'd also check that the filename was not "-", or perhaps
get the absolute path, but in this case I know the filename. (Otherwise
this could result in a hung process as gpg waited for stdin.)
2013-02-05 20:25:26 -05:00
Bruce Adams
9f20aa3bfd Remove superfluous exclusion of slf4j
The dependencies for pomegranate were cleaned up as of pomegranate-0.0.8. We no longer need to exclude slf4j. (Hard to claim this is important; I just happened to notice that it was not needed.)
2013-02-03 16:20:43 -05:00
Jean Niklas L'orange
c9c5cca4dc Make profile aliases available outside projects.
Fixes #978.

By adding an atom (to pop off used aliases to avoid recursive calls)
which contains :user :aliases from profiles, we can use those aliases
outside of project maps. Whenever looking up aliases, will check the
atom if we're not in a project.
2013-02-03 13:20:03 +01:00
Jean Niklas L'orange
3a0a1911f7 Fix typo in min-version-warning. 2013-02-03 11:48:16 +01:00
Jean Niklas L'orange
3045ed7111 Add support for ~/.lein/profiles.d. Closes #871.
Add support for profiles.d within the user's Leiningen home directory. All .clj
files within LEIN_HOME/profiles.d will be treated as maps merged into the
original profiles.clj (if existing).

Erroneous .clj file inside profiles.d emits an error message and will be treated
as nil.

A profile defined multiple times will error and "crash" the loading of profiles,
such that profiles return nil.

The errors will only be emitted once for user-friendliness.
2013-01-23 19:53:28 +01:00
Jean Niklas L'orange
730141f972 Memoize user/profiles. 2013-01-23 19:53:28 +01:00
Phil Hagelberg
be4ec8c81e Bump to 2.1.0-SNAPSHOT. 2013-01-19 20:39:17 -08:00
Phil Hagelberg
0cd13d8cdb Release 2.0.0. 2013-01-19 20:07:46 -08:00
Jean Niklas L'orange
4f2bc328d7 Gracefully stop reading input in sub-process. Fixes #934.
This commit handles three major bugs with the current way of redirecting input
from Leiningen to a sub-process:

- The redirection is never stopped. This means that typing on the keyboard after
  a sub-process has finished will crash the thread redirecting data from *in* to
  the sub-process' input stream, as it is closed.

- The redirection is buffered. This means that data intended to a subsequent
  sub-process may be sent to this sub-process instead.

- The redirection blocks instead of busy waits. For the output streams, this is
  perfectly fine and the recommended approach to avoid wasting cycles. However,
  this has some issues when done to an input stream: If the sub-process finishes
  while the thread block waiting for a character, we will be unable to stop the
  thread before a character has been read. The consequence is that a character
  originally intended to the subsequent sub-process will be given to the
  previous process.

These issues are solved by reading one byte at a time, busy wait on data and
gracefully exit when the sub-process has ended (through a mutable
variable/atom).
2013-01-18 01:02:15 +01:00
Phil Hagelberg
221d62a279 Merge pull request #932 from mgrubb/warn-on-user-in-project
Emit warning when user profile is in project files
2013-01-14 10:42:43 -08:00
Jean Niklas L'orange
1ea3c4c677 Treat :user in profile.clj as project map when outside of project. Fixes #931.
By treating the `:user` profile in `profile.clj` as the project map when one's
outside of a project, the default repositories among with any mentioned
repositories within the `:user` profile will be fetched without any issues. Also
works fine when `profile.clj` doesn't contain any `:user` profile or no
`profile.clj` exists.
2013-01-14 11:03:11 +01:00
Michael Grubb
ec435b48a6 Emit warning when user profile is in project files
This implements issue #890.
It warns if a :user profile is found in either project.clj or
a profiles.clj in the project directory.
2013-01-13 21:26:20 -06:00
Jean Niklas L'orange
fbc1804f86 Add tests to check ^:replace/^:displace behaviour. 2013-01-13 11:10:01 +01:00
Jean Niklas L'orange
2b40a3c8ec Prioritize metadata from :replace-vals and suppress from :displace. 2013-01-13 10:54:04 +01:00
Jean Niklas L'orange
e5511fe516 Back to 2.0.0-SNAPSHOT. 2013-01-13 10:38:54 +01:00
Phil Hagelberg
99f0ed7069 Release 2.0.0-RC2 2013-01-12 17:03:18 -08:00
Phil Hagelberg
b75658cff9 Be less specific in hooke-injection. 2013-01-12 14:44:50 -08:00
Phil Hagelberg
ccab537e56 Use default repos when non-nil project contains none. 2013-01-12 14:06:31 -08:00
Phil Hagelberg
e7b52a076d Oops, got the nesting wrong on that last one. 2013-01-12 13:20:54 -08:00
Phil Hagelberg
06fecc812a Use default repositories for plugins when outside project.
Fixes #928.
2013-01-12 12:56:39 -08:00
Phil Hagelberg
33bab94f7f Merge pull request #926 from redinger/normalize-profiles
Normalize profiles before merging them
2013-01-11 19:33:34 -08:00
Christopher Redinger
e053fe1930 Normalize profiles before merging them 2013-01-11 21:49:03 -05:00
Phil Hagelberg
c300908789 newnew's not newnew anymore; it's just new. 2013-01-11 10:55:55 -08:00
Phil Hagelberg
eb15a82e12 Back to 2.0.0-SNAPSHOT. 2013-01-10 16:59:36 -08:00
Phil Hagelberg
1e309c1a52 Release 2.0.0-RC1 2013-01-10 16:45:09 -08:00
Nelson Morris
b7c54adc4e Print checksum exceptions 2013-01-10 17:03:20 -06:00
Phil Hagelberg
5f6fd4f306 Move resolution failure messages to catch block in get-dependencies. 2013-01-10 13:31:46 -08:00
Phil Hagelberg
96adcdccc5 Fix tests re: central snapshots. 2013-01-10 11:40:15 -08:00
Phil Hagelberg
567a4f87bc Bump to latest lein-newnew. 2013-01-10 11:40:02 -08:00
Phil Hagelberg
15c5eb9287 Don't need to explicitly include clojars classic in project.clj. 2013-01-10 11:35:35 -08:00
Phil Hagelberg
adab79df77 Todos and news. 2013-01-10 11:35:18 -08:00
Phil Hagelberg
824c3dc511 Don't refer folks to the Releases repository docs yet. 2013-01-10 11:08:56 -08:00
Phil Hagelberg
c70fca859f Merge pull request #909 from hyPiRion/normalize-data-in-project-map
Normalize data in project map
2013-01-10 11:02:53 -08:00
Hugo Duncan
eb58efca7d Disable snapshots from maven central 2013-01-09 17:04:40 -05:00
Jean Niklas L'orange
ef3641c172 Add a repo test case which actually merges repositories. 2013-01-07 21:48:03 +01:00
Jean Niklas L'orange
88dfec8daf Add tests to ensure that repository merging works as intended. 2013-01-07 20:42:19 +01:00
Jean Niklas L'orange
4c1320255e Normalize repositories in project map before merging. Fixes #858. 2013-01-07 02:54:46 +01:00
Phil Hagelberg
3d3fb9cdb2 Clarify the exit docstring. 2013-01-02 22:32:30 -08:00
Phil Hagelberg
712ac9a017 Exclusion to pacify lein-pedantic. 2012-12-28 12:00:19 -08:00
Jean Niklas L'orange
27fe39d618 Fix ^:displace and ^:replace handling in meta-merge
An object with the metadata flag `:displace` set signals that, if a merge
conflict appears, this object is to be discarded. Likewise, `^:replace` signals
that this object should be kept in a merge conflict.

However, previous functionality only tested if the right element had the
`:replace` flag, or if the left element had the `:displace` flag. This commit
resolves this by checking whether the left element has a `:replace` flag and the
right element has a `:displace` flag, and handles accordingly to the semantics
explained in the previous paragraph.

Whenever two elements where both has the `:displace` flag is merged, the
leftmost is picked, and their metadata is merged. Likewise for the `:replace`
flag. The elements will not lose their `:displace` and `:replace` flags, as they
have not really been preferred over another element.

The `nil?` tests have been placed at the top to reflect that nil is the lack of
a value, not a value itself. As such, elements will not be "preferred" or
"discarded" over nil/nothing.
2012-12-28 04:28:34 +01:00
Phil Hagelberg
799bf696d3 Fix classpath test. 2012-12-26 10:07:57 -08:00
Nelson Morris
723671b607 Use aether data to figure out repository id for listener output
For "important" events, aether gives us enough info to figure
out which repo it is happening from.  Lets use it instead
of trying to match from project data.

Previously matching from the project data would be incorrect
and output failures or not output anything for transative repos.
2012-12-15 13:16:07 -06:00
Nelson Morris
c07259f875 Print checksum mismatch message
Previously the output for downloading files would just say "failed to find".
Instead output the fact checksums were invalid, and from which repository.
2012-12-15 11:13:00 -06:00
Phil Hagelberg
b15a1188db Upgrade to lein-newnew 0.3.6. Fixes #865. 2012-12-14 14:42:24 -08:00
Jean Niklas L'orange
d6ba16b9da Removes run task aliases within metadata. fix #882
Removes the task to be run residing within a project's metadata (inside
:without-profiles) in addition to the original map, in order to prevent
"with-profile" from reviving already used aliases.
2012-12-11 02:27:45 +01:00
Jean Niklas L'orange
493adefe34 Add :java-opts as an alias for :jvm-opts 2012-12-09 19:50:34 +01:00
Anthony Grimes
ba9e56f259 Add capability for selectors to be two functions (one checks the ns, one the vars)
This makes it so that a selector such as :only can prevent unnecessary loading
of namespaces that they aren't going to work on. It is a way for a selector
that knows which namespaces it will touch by the selector's arguments and the
namespace names themselves to not have to load all namespaces.

This commit also fixes a bug introduced by a recent pull request where
'namespaces' could not be resolved. Per discussion with technomancy, provided a
default test selector *always*.
2012-12-07 17:44:31 -06:00
Balint Erdi
d0dd2dcdcf Fix a leiningen-core project test case 2012-12-04 16:44:19 +01:00
David Greenberg
80cf398b50 Allow project's git repository to be different than project root
This allows for other directories to be used for the automatic
repository tagging. This is useful for repositories that contain
multiple projects, such as leiningen-core and leiningen, so that both
will have the correct repository tag information in their pom.xml.
2012-11-28 14:48:28 -05:00
Justin Balthrop
77327993ee don't propagate DRIP_INIT or DRIP_INIT_CLASS to subprocess 2012-11-19 13:07:53 -08:00
Bruce Adams
7495e10103 Bug fix for leading spaces in JVM_OPTS #856 2012-11-19 11:45:54 -05:00
Phil Hagelberg
24fd117104 Back to classic Clojars for a while.
Took longer than expected to get Releases working.
2012-11-18 05:43:27 -08:00
Phil Hagelberg
6d4ffe9a98 Add classic repo to Leiningen's own project.clj. 2012-11-15 07:07:52 -08:00
Phil Hagelberg
1fa23122ce Fix error message when there's an arity mismatch in apply-task. 2012-11-14 15:06:38 -08:00
Phil Hagelberg
8470f34c3f Fix global exclusions test broken by meta-merge changes. 2012-11-14 12:54:25 -08:00
Phil Hagelberg
d4a3708f44 Fix usages of when for return values. 2012-11-14 12:48:36 -08:00
Phil Hagelberg
2973d99652 Check Clojars releases repository instead of classic. Fixes #241. 2012-11-14 12:45:34 -08:00
Phil Hagelberg
4d9b8537cd Better docstrings in leiningen-core. 2012-11-12 15:15:12 -08:00
Phil Hagelberg
168d5e29b1 Accept optional not-found arg in lookup-alias. 2012-11-12 14:40:30 -08:00
Phil Hagelberg
359eed9627 Accept ^:replace metadata on *env*; don't always want to merge. 2012-11-12 14:40:30 -08:00
Phil Hagelberg
43110b873d Remove deprecated conj-dependencies function. 2012-11-12 14:40:30 -08:00
Justin Balthrop
c7cedb7db8 don't need a meta-merge to combine exclusion 2012-11-08 18:07:07 -08:00
Jacek Laskowski
bac476ce6d a typo 2012-11-09 01:31:15 +01:00
Justin Balthrop
8407b5906a fix bug when adding exclusions to dependencies with :displace metadata 2012-11-08 15:09:23 -08:00
Phil Hagelberg
e804b26716 Remove compatibility shims and warnings in preparation for 2.0.0. 2012-11-01 16:39:34 -07:00
Phil Hagelberg
3a0ab9b672 Tidy up user.clj and help.clj. 2012-10-31 11:51:23 -07:00
Phil Hagelberg
377153b1bc OK, I knew that was too clever. 2012-10-27 07:46:18 -07:00
Phil Hagelberg
9202b099ea Hooks that come from profiles can be rolled back. Fixes #802. 2012-10-26 19:25:35 -07:00
AtKaaZ
cf35d81c04 fix #836 trampoline EOF error, on windows 2012-10-27 00:05:08 +02:00
Phil Hagelberg
a5b833a0f4 Fix src/resource paths when with-profile is trampolined. Fixes #822. 2012-10-26 11:29:05 -07:00
Phil Hagelberg
55651a086d Add leiningen-core's pom.xml to fix #745.
[ci skip]
2012-10-25 21:29:24 -07:00
Phil Hagelberg
753d40723d clojure.walk strips metadata. Fixes #804. 2012-10-25 17:03:53 -07:00
Phil Hagelberg
dedb237dde Don't use colon in filename in when-stale. 2012-10-25 11:41:59 -07:00
Phil Hagelberg
ecdc783f2d repl task needs to disable pumping *in*. 2012-10-23 10:44:43 -07:00
Phil Hagelberg
abb9e44f56 Pump *in* to subprocesses as well.
There was a good reason we couldn't support this in earlier versions
of Leiningen, but it escapes me now. Perhaps it doesn't work on old
JDKs or there are platform-specific issues or something?
2012-10-23 09:53:30 -07:00
Phil Hagelberg
720a61ae65 Fix some typos in eval.clj tests.
[ci skip]
2012-10-20 15:02:34 -07:00
Phil Hagelberg
329b4b7fa6 Un-deprecate :auth profile since full-disk encryption is a good use case for it. 2012-10-10 10:04:30 -07:00
Justin Balthrop
0e02ad7164 switch with-profile to last-wins
This patch switches with-profile so that the last profile specified
wins. This is more in line with the way clojure.core/merge works.

For more info, see:
http://librelist.com/browser/leiningen/2012/9/12/changing-with-profile-from-first-wins-to-last-wins/#ff32b118546fa95d0960f2247e190c18
2012-10-08 18:27:40 -07:00
Justin Balthrop
9f37f53c5e move dependency and repository merging into meta-merge
This is accomplished with the :reduce metadata, which specifies the
reduce function to use when merging. This allows us to merge
dependencies and repositories deeply like other structures. Note that
dependencies are transformed into a map before they are merged and then
transformed back into a vector.

Also change the way that collections are merged. They used to be merged
by taking the right collection and prepending it to the left collection.
This behavior was needed for :*-paths in defproject, but it is not an
obvious default. Now, the default is to append the right collection, but
the :prepend metadata can be used to tell meta-merge to prepend instead.
By default, :source-paths, :resource-paths and :test-paths have :prepend
set to true.
2012-10-08 18:27:40 -07:00
Justin Balthrop
5893c1406a keep track of :active-profiles when merging
This is a list of all named profiles that have been merged in, after
following composite profile. This is different from :included-profiles
which is the list of profiles before composite profiles have been
expanded.
2012-10-08 18:27:40 -07:00
Justin Balthrop
5b76a2eb6a add leiningen.core.project/make
Move some defproject logic out of the macro into project/make.
2012-10-08 16:45:35 -07:00
Justin Balthrop
11037d7ddb rename profile-key-merge to meta-merge 2012-10-08 16:10:38 -07:00
Justin Balthrop
d24e36a63b move hooke-injection closer to where it is used 2012-10-08 15:46:51 -07:00
Chas Emerick
b06a04593a re-add support for :creds :gpg, add warning for anyone using e.g. :username :gpg to get all creds for a repo (gh-768) 2012-10-05 06:14:13 -04:00
Chas Emerick
268d723796 Add support for:
* namespaced keywords to control lookup of credentials in env vars
* using a vector to define a number of credential sources to be checked in series

(gh-768)
2012-10-05 06:09:54 -04:00
Phil Hagelberg
856207caf0 Load plugins in set-profiles. Fixes #772. 2012-10-04 16:24:36 -07:00
Phil Hagelberg
ff0e95baf0 Debug output in apply-task. 2012-10-04 09:36:21 -07:00
Justin Balthrop
123b929ec7 Fix environment passing to project JVM.
Runtime#exec takes an array of strings of the form "key=val", but we
were previously passing an array of interspersed keys and vals.
2012-09-27 13:46:35 -07:00
Justin Balthrop
c369447c8b support :os and :arch options in project map
Use :arch option to provide -d32 or -d64 option to project JVM.
2012-09-27 13:44:11 -07:00
Justin Balthrop
b7b61e9655 always extract native deps from snapshot jars
- fixes #796
- also add token param to when-stale, because otherwise multiple callers
  of with-stale can contaminate each other's results
2012-09-27 13:23:34 -07:00
Justin Balthrop
48bea66ea0 use -classpath instead of -cp so that jdb can be used for :java-cmd 2012-09-27 11:22:03 -07:00
Michael S. Klishin
dc9fd48376 Make LEIN_OFFLINE take precedence over what's in project.clj
Per discussion with @technomancy
2012-09-19 03:16:18 +04:00
Michael S. Klishin
387e624838 If LEIN_OFFLINE env var is set, assume offline mode by default. References #678. 2012-09-18 13:00:29 +04:00
Justin Balthrop
d702a234f5 fix truncated doc string for set-profiles 2012-09-10 12:15:47 -07:00
Phil Hagelberg
edfa52753e Wait no, that Postel's law invocation doesn't make sense. 2012-09-10 08:20:22 -07:00
Phil Hagelberg
5d37b41fbe Postel's law, I guess? 2012-09-06 10:26:04 -07:00
Nelson Morris
d254dae544 Reduce output for dependency resolution
Showing every failed repo lookup is bad for users.
They see the failure and get confused.

Hook up a custom listener that has the following behavior:

1. success -> print out artifact name, size, and repository name
2. failure -> ignore unless it is the last repo, then print out failure
   message with artifact name.

Fixes #610.
2012-09-05 14:59:53 -05:00
deduktion
e9386b7362 Update leiningen-core/src/leiningen/core/project.clj
use concat instead of merge to merge values, :plugin-repositories and :repositories are lists again 

with merge you will end up with a value for :repositories like [[repo {:url url}] ([pluginrepo {:url url}])]
instead of [[repo {:url url}] [pluginrepo {:url url}]]
2012-09-04 19:58:03 +03:00
Phil Hagelberg
10edee1d6f Fix bug where normalize-repos wasn't honoring mapization of entries. 2012-08-30 09:59:03 -07:00
Phil Hagelberg
8c68621ce8 Only apply workaround to Windows bug when not trampolining.
Fixes #674.
2012-08-30 09:14:38 -07:00
Hugo Duncan
0457aabdb2 Allow override of gpg executable using LEIN_GPG
On some platforms, eg. Mac, it may be more desirable to use an executable other
than 'gpg' for signing and encryption, and it may not be possible to symlink to
'gpg'. This allows the gpg executable used in lein to be specified via LEIN_GPG.

You can use ~/.lein/leinrc or ~/.leinrc to set LEIN_GPG by adding
'export LEIN_GPG=your-gpg' to either of those files.
2012-08-30 09:36:09 -04:00
Phil Hagelberg
a2d2b92d01 Don't insert :deploy-repositories/:plugin-repositories keys without vals.
This implementation is awful awful awful; must revisit.
2012-08-29 19:50:53 -07:00
Ryan Fowler
c3bd307da4 Propogates the file.encoding system property to subprocesses
On a coworker's Mac, the default file encoding was apparently
MacRoman. The -Dfile.encoding=UTF-8 that's in the lein shell script
wasn't being propogated to subprocesses which caused rage and the
replacement character.
2012-08-29 17:40:40 -05:00
Phil Hagelberg
e9e11309aa Don't suppress stack traces unless it was an explicit exit thrown. 2012-08-29 09:42:14 -07:00
Phil Hagelberg
b5ea5a0f09 Normalize format of :deploy-repositories and :plugin-repositories too.
Fixes #752.
2012-08-28 09:15:21 -07:00
Phil Hagelberg
f633c90164 Back to 2.0.0-SNAPSHOT. Next release will be RC1, for reals. 2012-08-25 18:41:32 -07:00
Phil Hagelberg
3b1924e538 Release 2.0.0-preview10. 2012-08-25 16:49:21 -07:00
Phil Hagelberg
3de5208a8e Load plugins based on default project so :repositories are available.
Fixes #747.
2012-08-25 16:44:46 -07:00
Phil Hagelberg
3106e21459 Fix warn-user-repos for new :repositories format. 2012-08-25 16:39:25 -07:00
Phil Hagelberg
e29418dc58 Bump back to 2.0.0-SNAPSHOT. 2012-08-24 17:26:00 -07:00
Phil Hagelberg
88f00af830 Release 2.0.0-preview9. 2012-08-24 17:02:17 -07:00
Marshall T. Vandegrift
da5e9721d7 Include :dev profile before :provided, giving :dev priority. 2012-08-24 07:46:13 -04:00
Phil Hagelberg
b4cc744efd Merge remote branch 'llasram/provided-profile' 2012-08-23 14:49:32 -07:00
Phil Hagelberg
037cc96941 Perform de-duplication on :repositories. 2012-08-23 14:35:25 -07:00
Phil Hagelberg
b5a193d331 Switch :repositories to vector format to preserve ordering.
See http://librelist.com/browser/leiningen/2012/8/17/ordering-issues-with-repositories/
for motivation.
2012-08-23 14:34:58 -07:00
Justin Balthrop
72969e7e55 forgot to switch plugin-vars calls to pass keywords 2012-08-23 13:31:30 -07:00
Justin Balthrop
ff5524bdf1 support disabling autoload of plugin hooks and middleware 2012-08-23 13:29:37 -07:00
Justin Balthrop
99a7bfcea0 Fix #742, explicit middleware load error
Don't call set-profiles from leiningen.core.project/read because it
calls load-middleware, and we want to wait to do that for the first time
in init-project. To solve this, I added init-profiles which is called by
both read and set-profiles.

Also clean up init-project and move code duplicated in set-profiles into
activate-middleware. We now always load hooks and certificates when
activating middleware, and load-certificates is actually called twice in
the course of init-project. To make sure load-certificates is
idempotent, we memoized leiningen.core.ssl/register-scheme.
2012-08-23 12:43:14 -07:00
Justin Balthrop
d7488b2bf9 add breaking test for #742 2012-08-23 12:39:44 -07:00
Marshall T. Vandegrift
f416ad9481 Implement Maven "provided" scope with :provided profile. 2012-08-23 14:33:42 -04:00
Justin Balthrop
cc7d759c10 use (get project key) to be consistent 2012-08-23 11:31:00 -07:00
Phil Hagelberg
d4acd839fd Stop using project metadata for storing trampoline forms. 2012-08-23 10:56:59 -07:00
Justin Balthrop
aff5243920 unify :hooks and :middleware format in project.clj
Both now expect a full var, though hooks will fall back to activate in
the provided namespace for compatibility.

Also, use the following convention for plugin auto hooks and middleware:
- Assuming your plugin is called lein-config
- Put hooks you want auto-loaded in lein-config.plugin/hooks
- Put middleware you want auto-applied in lein-config.plugin/middleware
2012-08-22 13:17:27 -07:00
Phil Hagelberg
1ef883a408 set-profiles it is. and it's a high-level operation. 2012-08-22 12:08:02 -07:00
Phil Hagelberg
2348b6b619 Fix with-profile task to work from the base project rather than being additive. 2012-08-22 12:04:17 -07:00
Phil Hagelberg
f6e5959e7c Fix with-profiles to work outside project dir. 2012-08-22 11:59:51 -07:00
Phil Hagelberg
8e15d2ded5 Document profile merge logic a bit. 2012-08-22 11:41:04 -07:00
Phil Hagelberg
00ee950ef9 Load hooks inside reset-profiles. Fixes #740. 2012-08-22 11:40:51 -07:00
Phil Hagelberg
4a6953c881 Rename with-profiles to reset-profiles.
with-profiles is too close to the task name, especially considering
the with-profile task is aliased to with-profiles.
2012-08-22 11:31:25 -07:00
Phil Hagelberg
19ed0ea0b6 Fix out-of-project repls. 2012-08-22 10:42:57 -07:00
Phil Hagelberg
a04be9b655 Don't store prep blocker on project metadata. 2012-08-22 10:02:55 -07:00
Phil Hagelberg
cc16a95a59 Collapse load-hooks into one doseq. 2012-08-22 10:01:57 -07:00
Phil Hagelberg
9b22d6cdd7 The newnew plugin lives in default-profiles, not the default project. 2012-08-22 09:32:16 -07:00
Justin Balthrop
6cf023e101 rename reset-profiles to with-profiles 2012-08-21 18:46:09 -07:00
Justin Balthrop
badeefc6db fix unmerge-profiles to work with composite profiles
Previously, you could not unmerge composite profiles. So, if the
currently active profiles were [:default], which is a composite of
[:dev :user :base], then (unmerge-profiles project :dev) would do
nothing. To fix this, we have to keep track of both :included-profiles
and :excluded-profiles.

I also combined apply-profiles and reset-profiles into a single function
called reset-profiles with an optional excluded-profiles argument and
renamed apply-profiles-raw to apply-profiles.
2012-08-21 18:20:49 -07:00
Phil Hagelberg
a28cd82bd0 Don't try to merge profiles without an active project.
We should simply use the user profile directly rather than trying to
merge it in.
2012-08-21 15:32:22 -07:00
Phil Hagelberg
47cc271249 Prefer vary-meta to with-meta. Rename combine-profiles to apply-profiles-raw. 2012-08-21 14:53:54 -07:00
Phil Hagelberg
3e5f3c77be Rename resolve-symbol -> require-resolve. 2012-08-21 14:51:29 -07:00
Phil Hagelberg
a4b7ded2aa Trim long lines in leiningen-core. 2012-08-21 14:49:39 -07:00
Phil Hagelberg
cb134380a2 Merge pull request #737 from jeremyheiler/master
:plugin-repositories for #717
2012-08-18 13:38:28 -07:00
Justin Balthrop
314f27ef81 Support ext dependencies in eval-in :classloader
Any dependency marked with :ext true will be loaded by the ext class loader.
Libraries with native dependencies (e.g. tokyocabinet) need to be loaded by
the ext classloader, because native libraries can only be loaded once per
JVM. Also, most SQL libraries (e.g. postgresql) need to be in the ext class
loader because java.sql.DriverManager holds onto the class.
2012-08-18 09:01:12 -07:00
Justin Balthrop
d5a9e18e7b Better error messages for eval-in :classloader
Print the exception and	stacktrace inside eval-in :classloader
and throw an ex-info just like eval-in :subprocess.
2012-08-18 09:00:06 -07:00
Justin Balthrop
ce4e1c9f74 Make :eval-in :classloader work with native deps
Use 0.6.6 classlojure's alter-java-library-path! to set java.library.path
at runtime.

Perhaps we should be setting all of these system properties back after
we are done, including this one?
2012-08-18 08:50:05 -07:00
Jeremy Heiler
c9a89f2ffd Allow for plugin specific repositories with :plugin-repositories. 2012-08-18 10:27:46 -04:00
Phil Hagelberg
29673a7a56 Latest lein-newnew version. Fixes #638. 2012-08-17 17:10:45 -07:00
Phil Hagelberg
a01f13935b Allow fix for recursive aliases to apply globally. 2012-08-17 13:46:34 -07:00
Phil Hagelberg
cbdf49168e Allow :eval-in to be a symbol instead of a keyword. 2012-08-17 13:11:00 -07:00
Phil Hagelberg
fc71f68372 Support setting HTTPS proxy properties. Fixes #706. 2012-08-17 10:13:18 -07:00
Phil Hagelberg
d76f796047 Support picking up :dependencies from profiles in trampoline task.
Fixes #695.
Fixes #732.
2012-08-16 13:47:19 -07:00
Phil Hagelberg
fc7e3c7cb9 Back to snapshot. 2012-08-16 13:17:59 -07:00
Phil Hagelberg
ff8ed7f6a8 Release 2.0.0-preview8. 2012-08-16 11:06:45 -07:00
Phil Hagelberg
d1ba7d7d10 Ensure we don't exit without at least a message. 2012-08-16 10:41:12 -07:00
Justin Balthrop
f263db162a Preserve metadata on project in merge/unmerge/reset-profiles
This fixes the bug that was causing 'lein repl' to hang.
2012-08-14 14:49:57 -07:00
Justin Balthrop
6358a9466d only nedd to print an error about explicit hooks that cannot be resolved 2012-08-14 11:58:08 -07:00
Justin Balthrop
2c8b4ce0cc add missing utils require 2012-08-13 12:06:10 -07:00
Justin Balthrop
e491e76811 report errors better in load-hooks
- report require and activation errors separately
- don't complain if plugin-hooks are missing

Conflicts:
	leiningen-core/src/leiningen/core/utils.clj
2012-08-13 12:01:14 -07:00
Justin Balthrop
c0efbd1e7c use resolve-symbol for hooks and middleware 2012-08-13 11:48:38 -07:00
Justin Balthrop
6f1b58368b combine-profile does not need to keep track of included-profile.
Now it is just a partial around profile-key-merge and can
disappear. I hope dsantiago doesn't get mad.
2012-08-13 11:48:30 -07:00
Justin Balthrop
1f59aa8f99 add resolve-symbol to utils and use it in resolve-task
Conflicts:
	leiningen-core/src/leiningen/core/utils.clj
2012-08-13 11:47:56 -07:00
Justin Balthrop
84c93a28b3 apply middleware whenever project profiles are modified
This can happen in merge-profiles, unmerge-profiles or in the newly
added reset-profiles. All three rebuild the project map from scratch
using `(:without-profiles (meta project))`. This prevents middleware
from being applied twice to the same project map.

We also have to call apply-middleware explicitly in init-project because
we want to load-plugins before applying middleware in this case only. An
alternative would be to load plugins every time project profiles are
modified. @technomancy, what do you think of that option?

Issue #401

Conflicts:
	leiningen-core/src/leiningen/core/main.clj
	src/leiningen/pom.clj
2012-08-13 11:46:09 -07:00
Justin Balthrop
ddc2ca0321 automatically load middleware and hooks from plugins
- this is a first pass at #401
- there are still some questions about the order of everything
- the current implementation may still break #599
2012-08-13 11:36:26 -07:00
Phil Hagelberg
0c594e72a6 Exception handling in main can be simplified now that we're using ex-info. 2012-08-10 11:15:30 -07:00
Phil Hagelberg
c6acc122f1 Improve error message when plugin isn't found. 2012-08-10 10:59:11 -07:00
Phil Hagelberg
e48486f7ee Merge pull request #725 from joegallo/task-typos
Task typos
2012-08-09 15:04:49 -07:00
Phil Hagelberg
0079868188 Better error message for malformed user profiles.clj. 2012-08-09 11:00:10 -07:00
Phil Hagelberg
0c22b5d893 News updates. 2012-08-08 21:05:27 -07:00
Chas Emerick
7489266e9f fix recursive merging of profiles that involve
^:replace and ^:displace meta on nested values
2012-08-08 17:23:31 -04:00
Joe Gallo
5e2ff4ebd3 Only the suggestions that have the same minimum distance. 2012-08-08 09:22:51 -04:00
Joe Gallo
363d1c61c2 Initial crack at suggestions. 2012-08-08 07:42:48 -04:00
Joe Gallo
37aa5ab37a Distance fn from amalloy. 2012-08-08 07:42:26 -04:00
Joe Gallo
49ea29af1a Whitespace. 2012-08-08 07:41:42 -04:00
Phil Hagelberg
6700322a8a Distinguish between false and nil when checking file existence. 2012-08-06 17:32:29 -07:00
Phil Hagelberg
09052b7deb Use when for side-effects, not return values.
Should really blog about this.
2012-08-06 16:09:43 -07:00
Phil Hagelberg
a4d87094ff Temporarily honor numeric exit codes and warn of deprecation. 2012-08-06 12:40:51 -07:00
Michael Klishin
f4cfb8bb5d Merge pull request #709 from oliyh/master
Issue #706 - adding non-proxy-hosts
2012-07-31 04:44:28 -07:00
Oliver Hine
06259b6948 merging http proxy changes 2012-07-31 11:58:35 +01:00
Oliver Hine
af9aeff3ef making http.nonProxyHosts more optional 2012-07-31 11:49:41 +01:00
Oliver Hine
e4e044cc0e propagating non-proxy-hosts to sub processes too 2012-07-30 15:19:51 +01:00
Michael Klishin
5f6db9db30 merging in pitherjo\'s change 2012-07-30 14:03:35 +01:00
oliyh
9604ce9732 Honouring http_no_proxy to complement http_proxy for apache httpcomponents client compatible libraries 2012-07-30 13:47:54 +01:00
Phil Hagelberg
8d3cd95c45 Give nicer messages instead of ex-info subprocess failed traces. 2012-07-27 16:44:49 -07:00
oliyh
ca1de526fe Honouring http_no_proxy to complement http_proxy for apache httpcomponents client compatible libraries 2012-07-27 15:05:26 -07:00
Phil Hagelberg
efdbf06bcb Clean up l.c.eval namespace. 2012-07-27 09:31:54 -07:00
Jon Pither
c89a497e62 using http_no_proxy instead of httpNoProxyHost 2012-07-27 10:34:07 +01:00
Jon Pither
732b7c4fbd using http_no_proxy instead of clunky httpNoProxyHost 2012-07-27 10:29:53 +01:00
Jon Pither
7910c2f59e passing non-proxy-hosts though to pomegranate if present as environmental arg 2012-07-26 14:36:06 +01:00
Phil Hagelberg
6ddc6b71a6 Bump ordered dependency. Fixes #697. 2012-07-24 17:32:30 -07:00
Alex Osborne
1bac2ef834 Update bundled clojars.org SSL certificate. Fix #692
The new certificate is trusted by Oracle JVMs by default but there
are still some users with JVMs that don't have any default root certs
at all.  The FreeBSD OpenJDK packages are apparently one such example.
2012-07-19 14:39:50 +10:00
Justin Balthrop
b41db4d03c use composite profiles for :default
You can now overide :default in your project.clj to change what profiles are
active when none are specified. As part of this change, default is no longer
used to for built-in settings; these are now stored in the :base profile.
This makes it possible to override :default while still including the :base
profile.
2012-07-18 17:37:19 -07:00
Justin Balthrop
c36274b52e separate combine-profile out into its own function for dsantiago 2012-07-18 17:37:19 -07:00
Justin Balthrop
cadfe5c92c add support for composite-profiles
if a profile value is a vector, then combine the values using
combine-profiles. this allows you to remove duplication by putting
shared configuration in "base" profiles.
2012-07-18 17:37:19 -07:00
Phil Hagelberg
41c85ead1b Unify exit code handling with ex-info. 2012-07-17 21:11:37 -07:00
Justin Balthrop
9f6f1cc78f read profiles from PROJECT_ROOT/profiles.clj
This is useful as a place to put profile information that you don't
want committed. e.g. deployment server lists, passwords, etc...
2012-07-17 19:14:21 -07:00
Bruce Adams
94729fac33 Add aliases for -help and -version
This is helps people coming from the Java world. "java" accepts -help
and -version, and neither --help nor --version. With this commit,
Leiningen accepts long names with either single or double dashes.
2012-07-12 08:35:29 -04:00
Bruce Adams
20c266a60d "aliases" need not be an atom, now it isn't 2012-07-12 08:31:31 -04:00
Bruce Adams
ff1476a50d Remove redundant "help" aliases 2012-07-12 07:51:45 -04:00
Phil Hagelberg
066b557e97 Merge remote-tracking branch 'Moocar/prep-tasks'
Conflicts:
	leiningen-core/src/leiningen/core/eval.clj
2012-07-11 17:12:14 -07:00
Bruce Adams
d233dc64fb Intercept "help" after task name, issue #629 2012-07-11 19:45:29 -04:00
Phil Hagelberg
7a812270d9 Auto-detect wagons from plugins. 2012-07-09 16:32:45 -07:00
Anthony Marcar
1dab145352 prep-tasks handles both strings and vectors 2012-07-08 23:10:21 -07:00
Anthony Marcar
5b73ce321b added prep-tasks which allows prep tasks to include args 2012-07-08 22:13:05 -07:00
Phil Hagelberg
4beeb70d1c Allow successive eval-in-project calls with trampoline. Fixes #665. 2012-07-08 13:47:44 -07:00
Phil Hagelberg
4c4502aacd Formatting of chaining warning. 2012-07-03 22:37:32 -07:00
Phil Hagelberg
36856e4fad Drop back to 2.0.0-SNAPSHOT, hopefully for the last time. 2012-06-27 16:54:31 -07:00
Phil Hagelberg
811e974174 Release 2.0.0-preview7. 2012-06-27 16:45:13 -07:00
Phil Hagelberg
a6659e15fa Documentation, news, todo updates. 2012-06-27 16:06:48 -07:00
Phil Hagelberg
c79349d568 Add clojars to default :deploy-repositories. 2012-06-27 15:07:09 -07:00
Phil Hagelberg
7de4e12f4b Look up aliases in prep and trampoline. 2012-06-27 10:32:57 -07:00
Phil Hagelberg
5775c6a2b8 Allow user-level repositories which contain credentials only. 2012-06-27 10:10:45 -07:00
Michael S. Klishin
1d2674ab11 Add an example to the warning about task chaining
This may or may not matter in interactive use but for upgrading users on travis-ci.org it will
save some confusion.
2012-06-27 12:03:33 +04:00
Phil Hagelberg
70695f5868 Work with latest pomegranate deploy-artifacts signature. 2012-06-26 17:31:36 -07:00
Phil Hagelberg
2fffac4854 Deploy signatures along with jars and poms.
Currently depends on pomegranate branch:
https://github.com/cemerick/pomegranate/pull/27
2012-06-26 17:31:36 -07:00
Phil Hagelberg
f00c985d4e Use both built-in :leiningen/test profile and :test profile in test task. 2012-06-25 16:33:28 -07:00
Phil Hagelberg
5618a861d6 Don't decrypt credentials.clj.gpg for every request. Fixes #657. 2012-06-25 13:59:30 -07:00
Phil Hagelberg
a32abdf51c Plumb through mirror support to pomegranate. Fixes #271.
Won't actually be visible until pomegranate is bumped to 0.0.13.
2012-06-25 11:08:59 -07:00
Phil Hagelberg
519d793b5f Make problems loading project.clj explicit. Fixes #648. 2012-06-24 21:56:19 -07:00
Phil Hagelberg
de751e97d7 Pull in latest lein-newnew. 2012-06-22 20:47:20 -07:00
Phil Hagelberg
b7c6a63fd5 Qualify implicit ::test profile. Fixes #659 for real, hopefully. 2012-06-22 13:19:46 -07:00
Phil Hagelberg
9a04a356a5 Move hooke injection to :test profile. Fixes #659. 2012-06-22 11:26:49 -07:00
Phil Hagelberg
8d5b8698bd Honor :classifier and :extension when de-duping deps.
Fixes #645.
2012-06-18 20:09:59 -07:00
Phil Hagelberg
93a7042f47 Fix when-stale invocation for native extraction. Fixes #647. 2012-06-18 15:49:14 -07:00
Phil Hagelberg
2185d3809c Remove faked out exit code. 2012-06-18 15:41:51 -07:00
Jacek Laskowski
03d4411da5 Fix for Issue #589 lein 2 leaves 'stale' directories all over the place 2012-06-18 23:16:33 +02:00
Phil Hagelberg
7a2bd4dd2a Move tiered compilation out of profiles and injections into them. 2012-06-15 10:48:41 -07:00
Phil Hagelberg
c263783455 Turn :bootclasspath off by default; too many issues for now. 2012-06-15 10:48:26 -07:00
Phil Hagelberg
a581b006fb Turn off bootclasspath for projects using 1.2.
Won't help if it's an indirect dependency forced by version ranges though.
2012-06-14 16:28:37 -07:00
Phil Hagelberg
80fa274979 Use bootclasspath inside eval-in-project. Fixes #639. 2012-06-13 21:42:55 -07:00
Phil Hagelberg
d8d5ca15bf Move user-agent to its own function; make it match lein version more. 2012-06-13 10:02:53 -07:00