Commit graph

1052 commits

Author SHA1 Message Date
Phil Hagelberg
141da75b31 Bump copyright years. 2017-05-29 15:56:01 -07:00
Phil Hagelberg
809c7d33ea Document what causes insecure HTTP repository errors.
Fixes #2277.
2017-05-29 15:55:49 -07:00
Phil Hagelberg
3385971e65 Add tests from pedantic lib as well.
Fix HTTP-using jar test.
2017-05-26 11:32:59 -07:00
Phil Hagelberg
c968fa5068 Upgrade Aether via new pomegranate; merge pedantic into leiningen-core. 2017-05-26 11:04:41 -07:00
Phil Hagelberg
1a502050c7 Move plugin conflict warnings to only activate when :pedantic? is set. 2017-05-23 10:09:53 -07:00
Phil Hagelberg
8982e9c5dc Getting false from .mkdirs doesn't mean the directory doesn't exist.
This is such a dumb API.

Also, my key expiring doesn't need to fail the suite any more.
2017-05-18 17:08:14 -07:00
Phil Hagelberg
04d500103b Never use .mkdirs directly; it silently masks errors.
Use leiningen.core.utils/mkdirs so that problems will be found when
they happen.
2017-05-16 15:14:46 -07:00
Iván Perdomo
5e5aeebea9
[#2272] Catch read-string exceptions and print a nicer error
* This is change in behavior, we catch the clojure.core/read-string
  exception and we print it to stderr. The difference is that we
  let the process continue (e.g. `lein repl` starts) and the previous
  behavior was to die (due to the throwing the exception)
* We could mimic the previous behavior by exiting (System/exit 1) on
  this exception.
2017-05-11 08:57:53 +02:00
Iván Perdomo
ae9ae4825d
[#2272] Use clojure.edn/read-string to read profiles files
Using clojure.edn/read-string results in nil instead of an exception

    user=> (edn/read-string "")
    nil
    user=> (read-string "")
    RuntimeException EOF while reading  clojure.lang.Util.runtimeException (Util.java:221)
2017-05-09 05:58:06 +02:00
Phil Hagelberg
9b2792d249 Remove pedantic version warnings in leiningen-core.
[skip ci]
2017-05-05 15:47:45 -07:00
Phil Hagelberg
53fae3ab3e Update list of conflictable bootclasspath deps. 2017-04-26 07:58:22 -07:00
Phil Hagelberg
778a01e482 Merge pull request #2261 from technomancy/repl-outside-project
Make repls outside project run in Leiningen
2017-04-25 15:41:08 -07:00
Phil Hagelberg
aaa3ef161b Warn when trying to load plugins that can't be used.
This addresses the problems seen in #1900 and #1901. It doesn't fix
them because they can't be fixed without breaking other things,
(https://github.com/technomancy/grenchman/issues/34) but at least it
lets people know what is going on and suggests a workaround.
2017-03-28 12:11:49 -07:00
Phil Hagelberg
c1aea4d256 Merge pull request #2258 from firesofmay/catch-no-route-exception
Catch NoRouteToHostException exception
2017-03-23 14:46:32 -07:00
Phil Hagelberg
627d4448d4 Merge remote-tracking branch 'weavejester/smarter-target-profiles'
Conflicts:
	leiningen-core/src/leiningen/core/project.clj
2017-03-23 14:35:02 -07:00
James Reeves
1fe6dce707 Change profiles string to recursively normalize
Composite profiles that are made of other composite profiles should be
recursively normalized when creating the target path string.
2017-03-13 22:31:06 +00:00
Mayank Jain
1d996b378f Catch NoRouteToHostException exception
In case network is down while fetching dependencies and we get
NoRouteToHostException exception, fallback to `:offline? true`
behaviour.

Fixes #2054 issue.
2017-03-13 10:54:19 +05:30
Phil Hagelberg
178f99bf0d Fix misplaced docstring.
[ci skip]
2017-03-07 13:36:13 -08:00
Rovanion Luckey
a445f34fab Removed duplicate of alias clojure.string in leiningen-core's project.clj 2017-03-06 11:43:39 +01:00
James Reeves
5a4f9fca0b Change profiles string to match subseqs
Because order of profiles matters, subsequences rather than subsets
should be substituted for composites.
2017-03-03 19:56:15 +00:00
James Reeves
3981ea4971 Make profiles string in target path smarter
When generating a profile scope string for the target path, any subset
of active profiles that matches a composite profile are replaced with
the composite.

For example, the profiles [:base :system :user :provided :dev :foo]
would be represented as "default+foo", because the :default profile is a
composite of [:base :system :user :provided :dev].
2017-03-01 02:56:02 +00:00
Danielle Tomlinson
b22dc25b3b
Add note about fs permissions in get-deps error 2017-02-08 21:23:03 +01:00
Wes Morgan
8de742d231
Rename artifact-namespace & artifact-name
...to group-id and artifact-id
2017-02-01 19:24:45 -07:00
Wes Morgan
66cef075e8
Add support for string deps in project.clj
This is needed for rare cases where maven artifact-ids and/or group-ids
aren't valid symbols (e.g. they start with a number).

Test coverage added.
2017-02-01 18:45:34 -07:00
Jean Niklas L'orange
bbbead38b2 Bump http maven-wagon, fixes #1966 2017-01-31 11:16:35 +01:00
Phil Hagelberg
a76de08f0d Bump a few versions here and there. 2017-01-20 16:18:10 -08:00
Phil Hagelberg
f42a5cfec3 Bump tools.macro transitive dep. 2017-01-18 13:29:19 -08:00
Jean Niklas L'orange
d82f539d66 Merge pull request #2225 from tobias/new-clojars-repo-url
Use new clojars repo url
2016-12-14 00:59:32 +01:00
Toby Crawley
eb701d3eb2
Update to dynapath 0.2.5
This version addresses two Java 9 related issues:

* 0.2.4 would fail under Java 9 if AOT'd
* the latest Java 9 build (9-ea+148) broke dynapath's reflection to make
  URLClassLoader modifiable
2016-12-09 16:32:26 -05:00
Toby Crawley
21badb1503
Use new clojars repo url
This switches the default repo url (for resolving artifacts, not
deploying) to point to the CDN-fronted repo. Note that this repo won't
work with Java 6 - users of 6 will need to manually override the default
url to point to the old one (https://clojars.org/repo).
2016-11-30 09:32:45 -05:00
Emlyn Corrin
d5a66f7d35 Only warn about each exclusion once
In one of my projects, `lein deps :tree` produces output like the following, I think it would be clearer (and less daunting for the user) to only print out distinct exclusions.

```
Consider using these exclusions:
[org.apache.spark/spark-hive_2.11 "2.0.0" :exclusions [org.antlr/ST4 org.slf4j/slf4j-log4j12 org.slf4j/slf4j-api]]
[org.apache.spark/spark-hive_2.11 "2.0.0" :exclusions [org.antlr/ST4 org.slf4j/slf4j-log4j12 org.slf4j/slf4j-api]]
[org.apache.spark/spark-hive_2.11 "2.0.0" :exclusions [org.antlr/ST4 org.slf4j/slf4j-log4j12 org.slf4j/slf4j-api]]
[org.apache.spark/spark-hive_2.11 "2.0.0" :exclusions [org.antlr/ST4 org.slf4j/slf4j-log4j12 org.slf4j/slf4j-api]]
[org.apache.spark/spark-hive_2.11 "2.0.0" :exclusions [org.antlr/ST4 org.slf4j/slf4j-log4j12 org.slf4j/slf4j-api]]
[org.apache.spark/spark-hive_2.11 "2.0.0" :exclusions [org.antlr/ST4 org.slf4j/slf4j-log4j12 org.slf4j/slf4j-api]]
[org.apache.spark/spark-hive_2.11 "2.0.0" :exclusions [org.antlr/ST4 org.slf4j/slf4j-log4j12 org.slf4j/slf4j-api]]
[org.apache.spark/spark-hive_2.11 "2.0.0" :exclusions [org.antlr/ST4 org.slf4j/slf4j-log4j12 org.slf4j/slf4j-api]]
[org.apache.spark/spark-hive_2.11 "2.0.0" :exclusions [org.antlr/ST4 org.slf4j/slf4j-log4j12 org.slf4j/slf4j-api]]
[org.apache.spark/spark-hive_2.11 "2.0.0" :exclusions [org.antlr/ST4 org.slf4j/slf4j-log4j12 org.slf4j/slf4j-api]]
[org.apache.spark/spark-hive_2.11 "2.0.0" :exclusions [org.antlr/ST4 org.slf4j/slf4j-log4j12 org.slf4j/slf4j-api]]
[org.apache.spark/spark-hive_2.11 "2.0.0" :exclusions [org.antlr/ST4 org.slf4j/slf4j-log4j12 org.slf4j/slf4j-api]]
[org.apache.spark/spark-sql_2.11 "2.0.0" :exclusions [org.slf4j/slf4j-log4j12 org.slf4j/slf4j-api]]
[org.apache.spark/spark-sql_2.11 "2.0.0" :exclusions [org.slf4j/slf4j-log4j12 org.slf4j/slf4j-api]]
[org.apache.spark/spark-sql_2.11 "2.0.0" :exclusions [org.slf4j/slf4j-log4j12 org.slf4j/slf4j-api]]
[org.apache.spark/spark-hive_2.11 "2.0.0" :exclusions [org.antlr/ST4 org.slf4j/slf4j-log4j12 org.slf4j/slf4j-api]]
[org.apache.spark/spark-hive_2.11 "2.0.0" :exclusions [org.antlr/ST4 org.slf4j/slf4j-log4j12 org.slf4j/slf4j-api]]
[org.apache.spark/spark-hive_2.11 "2.0.0" :exclusions [org.antlr/ST4 org.slf4j/slf4j-log4j12 org.slf4j/slf4j-api]]
[org.apache.spark/spark-hive_2.11 "2.0.0" :exclusions [org.antlr/ST4 org.slf4j/slf4j-log4j12 org.slf4j/slf4j-api]]
[org.apache.spark/spark-hive_2.11 "2.0.0" :exclusions [org.antlr/ST4 org.slf4j/slf4j-log4j12 org.slf4j/slf4j-api]]
[org.apache.spark/spark-hive_2.11 "2.0.0" :exclusions [org.antlr/ST4 org.slf4j/slf4j-log4j12 org.slf4j/slf4j-api]]
[org.apache.spark/spark-hive_2.11 "2.0.0" :exclusions [org.antlr/ST4 org.slf4j/slf4j-log4j12 org.slf4j/slf4j-api]]
[org.apache.spark/spark-hive_2.11 "2.0.0" :exclusions [org.antlr/ST4 org.slf4j/slf4j-log4j12 org.slf4j/slf4j-api]]
[org.apache.spark/spark-hive_2.11 "2.0.0" :exclusions [org.antlr/ST4 org.slf4j/slf4j-log4j12 org.slf4j/slf4j-api]]
[org.apache.spark/spark-hive_2.11 "2.0.0" :exclusions [org.antlr/ST4 org.slf4j/slf4j-log4j12 org.slf4j/slf4j-api]]
[org.apache.spark/spark-sql_2.11 "2.0.0" :exclusions [org.slf4j/slf4j-log4j12 org.slf4j/slf4j-api]]
[org.apache.spark/spark-sql_2.11 "2.0.0" :exclusions [org.slf4j/slf4j-log4j12 org.slf4j/slf4j-api]]
[org.apache.spark/spark-sql_2.11 "2.0.0" :exclusions [org.slf4j/slf4j-log4j12 org.slf4j/slf4j-api]]
[org.apache.spark/spark-sql_2.11 "2.0.0" :exclusions [org.slf4j/slf4j-log4j12 org.slf4j/slf4j-api]]
[org.apache.spark/spark-sql_2.11 "2.0.0" :exclusions [org.slf4j/slf4j-log4j12 org.slf4j/slf4j-api]]
[org.apache.spark/spark-sql_2.11 "2.0.0" :exclusions [org.slf4j/slf4j-log4j12 org.slf4j/slf4j-api]]
[org.apache.spark/spark-sql_2.11 "2.0.0" :exclusions [org.slf4j/slf4j-log4j12 org.slf4j/slf4j-api]]
[org.apache.spark/spark-sql_2.11 "2.0.0" :exclusions [org.slf4j/slf4j-log4j12 org.slf4j/slf4j-api]]
[org.apache.spark/spark-sql_2.11 "2.0.0" :exclusions [org.slf4j/slf4j-log4j12 org.slf4j/slf4j-api]]
[org.apache.spark/spark-hive_2.11 "2.0.0" :exclusions [org.antlr/ST4 org.slf4j/slf4j-log4j12 org.slf4j/slf4j-api]]
[org.apache.spark/spark-hive_2.11 "2.0.0" :exclusions [org.antlr/ST4 org.slf4j/slf4j-log4j12 org.slf4j/slf4j-api]]
[org.apache.spark/spark-hive_2.11 "2.0.0" :exclusions [org.antlr/ST4 org.slf4j/slf4j-log4j12 org.slf4j/slf4j-api]]
[org.apache.spark/spark-hive_2.11 "2.0.0" :exclusions [org.antlr/ST4 org.slf4j/slf4j-log4j12 org.slf4j/slf4j-api]]
[org.apache.spark/spark-hive_2.11 "2.0.0" :exclusions [org.antlr/ST4 org.slf4j/slf4j-log4j12 org.slf4j/slf4j-api]]
[org.apache.spark/spark-hive_2.11 "2.0.0" :exclusions [org.antlr/ST4 org.slf4j/slf4j-log4j12 org.slf4j/slf4j-api]]
[org.apache.spark/spark-hive_2.11 "2.0.0" :exclusions [org.antlr/ST4 org.slf4j/slf4j-log4j12 org.slf4j/slf4j-api]]
[org.apache.spark/spark-sql_2.11 "2.0.0" :exclusions [org.slf4j/slf4j-log4j12 org.slf4j/slf4j-api]]
[org.apache.spark/spark-sql_2.11 "2.0.0" :exclusions [org.slf4j/slf4j-log4j12 org.slf4j/slf4j-api]]
[org.apache.spark/spark-sql_2.11 "2.0.0" :exclusions [org.slf4j/slf4j-log4j12 org.slf4j/slf4j-api]]
[org.apache.spark/spark-sql_2.11 "2.0.0" :exclusions [org.slf4j/slf4j-log4j12 org.slf4j/slf4j-api]]
[org.apache.spark/spark-sql_2.11 "2.0.0" :exclusions [org.slf4j/slf4j-log4j12 org.slf4j/slf4j-api]]
[org.apache.spark/spark-sql_2.11 "2.0.0" :exclusions [org.slf4j/slf4j-log4j12 org.slf4j/slf4j-api]]
[org.apache.spark/spark-sql_2.11 "2.0.0" :exclusions [org.slf4j/slf4j-log4j12 org.slf4j/slf4j-api]]
[org.apache.spark/spark-core_2.11 "2.0.0" :exclusions [org.slf4j/slf4j-log4j12 org.slf4j/slf4j-api]]
[org.apache.spark/spark-core_2.11 "2.0.0" :exclusions [org.slf4j/slf4j-log4j12 org.slf4j/slf4j-api]]
[org.apache.spark/spark-core_2.11 "2.0.0" :exclusions [org.slf4j/slf4j-log4j12 org.slf4j/slf4j-api]]
[org.apache.spark/spark-hive_2.11 "2.0.0" :exclusions [org.antlr/ST4 org.slf4j/slf4j-log4j12 org.slf4j/slf4j-api]]
[org.apache.spark/spark-sql_2.11 "2.0.0" :exclusions [org.slf4j/slf4j-log4j12 org.slf4j/slf4j-api]]
[org.apache.spark/spark-core_2.11 "2.0.0" :exclusions [org.slf4j/slf4j-log4j12 org.slf4j/slf4j-api]]
[org.apache.spark/spark-core_2.11 "2.0.0" :exclusions [org.slf4j/slf4j-log4j12 org.slf4j/slf4j-api]]
[org.apache.spark/spark-core_2.11 "2.0.0" :exclusions [org.slf4j/slf4j-log4j12 org.slf4j/slf4j-api]]
[org.apache.spark/spark-core_2.11 "2.0.0" :exclusions [org.slf4j/slf4j-log4j12 org.slf4j/slf4j-api]]
[org.apache.spark/spark-core_2.11 "2.0.0" :exclusions [org.slf4j/slf4j-log4j12 org.slf4j/slf4j-api]]
[org.apache.spark/spark-core_2.11 "2.0.0" :exclusions [org.slf4j/slf4j-log4j12 org.slf4j/slf4j-api]]
[org.apache.spark/spark-core_2.11 "2.0.0" :exclusions [org.slf4j/slf4j-log4j12 org.slf4j/slf4j-api]]
[org.slf4j/slf4j-log4j12 "1.7.12" :exclusions [org.slf4j/slf4j-api]]
```
2016-10-20 00:39:16 +01:00
Chris Price
6c69f563f7 (#2216) Fix bug with managed deps in profiles w/:replace
Prior to this commit, profiles with `^:replace` on the dependencies
list would never end up having their dependencies vector normalized
so that it would have `nil` placeholders for the versions of
dependencies that were inheriting their version from `:managed-dependencies`.

This commit normalizes the dependencies vector of a profile during
initialization, to make sure that it will always be normalized.
2016-10-10 18:55:05 -07:00
Jean Niklas L'orange
abfa7f67ff Allow keyword dependency versions, fixes #2212 2016-09-28 13:32:29 +02:00
Jean Niklas L'orange
c06bc76959 Back to snapshot 2016-09-22 02:48:48 +02:00
Jean Niklas L'orange
150d98b7ae
Release 2.7.1 2016-09-22 01:04:59 +02:00
Jean Niklas L'orange
716d833f48 Let ns-exists? return true on generated namespaces
fixes #2204
2016-09-20 23:06:13 +02:00
Chris Price
1e5d1fd195 Change from concat to into, to ensure vector
Since pomegranate mentions that it likes vectors as inputs to its
functions, this commit changes the normalization function to use
`into` instead of `concat`, to make sure that we get a vector instead
of a sequence.
2016-09-18 10:19:53 -07:00
Chris Price
5bd091a2bf Don't require nil for version in managed deps - fixes #2195
Prior to this commit, if you wanted to use modifiers such as
`:exclusions` or `:classifier` for a dependency whose version you
were managing with `:managed-dependencies`, you would need to
explicitly pass a `nil` as the version string in the dependency
tuple.  This commit adds some logic to coerce the vectors before
they are processed, so that if the version string is simply
omitted instead of being set to `nil`, the `nil` will be implicitly
inserted and things will continue to work as before.

This provides a slightly nicer and more intuitive UX for the
managed-dependencies feature.
2016-09-18 09:21:04 -07:00
Jean Niklas L'orange
309abec275 Back to snapshot 2016-08-24 02:27:09 +02:00
Jean Niklas L'orange
c5d95b7190
Release 2.7.0 2016-08-24 02:18:10 +02:00
Jean Niklas L'orange
54bd09ba11 Merge PR #2159
Conflicts:
	test/leiningen/test/helper.clj
2016-08-21 20:35:15 +02:00
Jean Niklas L'orange
549e248b09 Merge PR #2152
Conflicts:
	leiningen-core/src/leiningen/core/eval.clj
2016-08-21 19:55:55 +02:00
Chris Price
41febc332c Merge pull request #2164 from cprice404/feature/master/support-reading-proj-from-reader
Add support for reading project from Reader instead of file
2016-07-18 10:35:01 -07:00
Toby Crawley
8fb87da2e7
Provide the current clojars certificate [#2170] 2016-07-12 15:32:56 -04:00
Chris Price
2a30d862f6 Add support for reading project from Reader instead of file
In certain cases (e.g. reading a project.clj file out of a jar,
rather than from a file on disk) it is useful for the `read`
and `read-raw` functions to support being passed a `Reader` object,
rather than a File or path.

This commit modifies the `read-raw` function to support being
passed a Reader.  It also modifies the `defproject` macro to
avoid the assumption that `*file*` will always have a non-nil
value, because that assumption causes an NPE in the case where
a Reader is the source of the project definition.
2016-06-23 09:31:20 -07:00
Chris Price
54fda200d7 (#2067) Improve test coverage for managed dependencies
This commit adds some additional dependencies to the test project
file for managed dependencies, and significantly increases the
coverage of the tests.
2016-06-22 14:24:38 -07:00
Chris Price
867b667601 (#2067) Improve comment about call to private pomegranate fn 2016-06-22 11:37:13 -07:00
Chris Price
dd824e572b (#2067) Deprecate 'resolve-dependencies', add managed deps to it
This commit deprecates the `resolve-dependencies` function in
favor of `resolve-managed-dependencies`.  It also conditionally adds
the `:managed-dependencies` key to the execution of the deprecated
function, in hopes of improving backward compatibility for cases
where people are still calling the deprecated version.

It also cleans up a few docstring "TODO"s and adds real docstrings.
2016-06-22 11:22:29 -07:00
Chris Price
27782edb2e (#2067) add support for managed-dependencies
This commit provides initial support for `managed-dependencies`,
where dependency version numbers may be specified in a separate
section called `managed-dependencies`, and those version numbers
will be used for any deps in the main `dependencies` section
that do not explicitly specify a version number.

This is a precursor to being able to specify a "parent" project
that could be used to consolidate version numbers of common
dependencies across a large number of libraries.
2016-06-22 11:20:38 -07:00
Jean Niklas L'orange
49abe11085 Merge pull request #2155 from 3duard0/fix-issue-2082
Fix for issue #2082
2016-06-19 15:41:13 +02:00
Eduardo Seabra Silva
674eb86498 Fix for issue #2156
Usage of with-out-str with eval/sh should be replaced by utils/with-system-out-str
as eval/sh is writing output to System/out.
2016-06-10 01:32:22 -03:00
Eduardo Seabra Silva
3b57068121 Fix issue #2082 2016-06-09 00:52:37 -03:00
Toby Crawley
0bf4ffee5d
Get lein partially working under Java 9
This includes three changes:

* Exclude the dynapath that comes in from bultitude and pomegranate, and
  depend directly on a newer version that operates properly under Java 9
* Ensure we have a modifiable classloader before asking pomegranate to
  modify it. Before Java 9, the AppClassLoader was a URLClassLoader, and
  therefore modifiable. This is no longer the case with Java 9.
* Remove duplicated classpath init code from `eval-in :leiningen`, and
  replace it with a call to `project/init-lein-classpath`. This required
  making the latter function public.

These changes allow some lein functionality to work under Java 9 - there
is a Java 9 issue with data.xml that needs to be fixed before lein's
tests can all pass (http://dev.clojure.org/jira/browse/DXML-32).
2016-05-27 17:28:30 -04:00
Stephen Nelson
f1fc34ee00 Fix #2145: extra whitespace added to JVM_OPTS
Instead of using String.split then recombining arguments to repair broken
quoted arguments, this parser now finds entire arguments using regex matching.
This is more robust, handling extra whitespace (and non-space whitespace)
correctly, while also correctly matching quotations in argument strings and
preserving internal spaces.
2016-05-18 17:44:13 +12:00
Chris Price
f592c811c9 Update to pomegranate 0.3.1 2016-03-22 07:04:18 -07:00
Rick Moynihan
e401c2d921 Allow user repositories with uberjar Fixes #2098
Allow user defined private repositories when building jars, uberjars and
running deploy tasks.

For details see issue at:

https://github.com/technomancy/leiningen/issues/2098
2016-02-23 15:13:56 +00:00
Chris Price
f981ddd247 Honor whitelist settings when javac called via jar - fixes #2089
This commit refactors a few things from the `jar` and
`javac` tasks in order to ensure that the "whitelisted"
settings from the user profile (`:local-repo`, `:mirrors`,
etc.) are honored when the `jar` task launches `javac`.

It also adds a test to validate the new behavior.
2016-02-16 12:15:41 -08:00
Jean Niklas L'orange
6046f1f848 Back to snapshot 2016-02-08 18:36:20 +01:00
Jean Niklas L'orange
f9a464e008
Release 2.6.1 2016-02-08 18:20:33 +01:00
Jean Niklas L'orange
4383caecce Print meta only during compile, fixes #2079
Passing in the project map as a parameter to eval-in-subprocess causes
havoc, as it has references to the functions reduce-dep-step and
reduce-repo-step in its metadata.
2016-02-07 01:23:59 +01:00
Jean Niklas L'orange
58b8c1658a Back to snapshot 2016-02-05 01:36:14 +01:00
Jean Niklas L'orange
0fe3f86a3c
Release 2.6.0 2016-02-05 01:17:21 +01:00
Jean Niklas L'orange
adb7b999fd Improve native dependency feedback, fixes #1961
Changes to a native dependency that is not cleaned up will be warned
about to the user. In addition, when a dependency changes, only the
dependencies that actually changed will be checked for native
dependencies, speeding up restart time significantly when you change a
single dependency in a big project.
2016-02-04 23:54:23 +01:00
Jean Niklas L'orange
56389b2067 Move away from deprecated Apache HTTP parts 2016-02-04 23:35:42 +01:00
Jean Niklas L'orange
c630502d18 Code cleanup 2016-02-04 23:32:52 +01:00
Jean Niklas L'orange
99d53683eb Print meta when eval-in-subprocess
This fixes the issue with reflection warnings in #2045, but
unfortunately breaks backwards compatibility with 1.1.0. So the lowest
version of Clojure Leiningen now supports is 1.2.0.
2016-02-04 23:24:37 +01:00
Daniel Compton
090e7a114e Upgrade clojure-complete from 0.2.3 to 0.2.4
0.2.4 contains type hints to eliminate reflection warnings.
2016-02-02 07:55:45 +13:00
Jean Niklas L'orange
51f80c1298 Clojure 1.8.0 2016-01-21 11:08:58 +01:00
Andrea Richiardi
e8e5e78687 Bind *read-eval* false when reading gpg credentials 2016-01-10 17:28:39 -08:00
Andrea Richiardi
12b44df3e7 Avoid piping std out when reading gpg credentials, ref #2062 2016-01-10 17:28:12 -08:00
Florian Anderiasch
f5682f543c Bump copyright years 2016-01-03 00:43:46 +01:00
Jean Niklas L'orange
b4161e347f Don't create implicit resource dirs, fixes #2010
Yeah, I know, this is not pretty.
2015-12-17 09:57:07 +01:00
solicode
d8cb708160 Modify tiered-jvm-opts for :base profile
Ensures `-XX:-OmitStackTraceInFastThrow` is always included by default
regardless of user's LEIN_JVM_OPTS. This setting can be overridden in
other profiles by the user.
2015-12-05 21:30:34 +09:00
Jean Niklas L'orange
53f12e8d4b Allow tasks to have vararg-only form, closes #1913
Aliases are higher order, but also attempts to keep track of tasks via
:arglists metadata. The :arglists update function assumed all tasks
would start with a project arg. However, this isn't necessary: A task
may e.g. have the form [& args] and destructure the project arg inside
the function. This caused lein to incorrectly assume that appending more
arguments to the tasks was an error. (The only tasks I know of right now
that does this is mine, so I should probably take the hint)

I also decided to clean up the drop-partial-args function a bit to make
it more readable.
2015-11-24 00:28:28 +01:00
Jean Niklas L'orange
58b5f7248b Remove duplicate profiles before profile merging
When we expand composite profiles, we may end up with multiple identical
profiles in the resulting list. However, we should only merge a profile
at most once. To fix this, we dedupe the list and retain the _last_
profile mentioned. We retain the last instead of the first as this
prioritises the last profile merges, which is somewhat important for
tasks like repl, uberjar, and to some extent `with-profile +foo`.

It might be interesting to see if we can get away from this in 3.0.0,
for example by saying that
(= (merge-profiles project [:a]) (merge-profiles project [:a :a])).

Fixes #1824 and fixes #2001.
2015-11-22 16:19:49 +01:00
Jean Niklas L'orange
fb876c7d49 Print GPG errors when we receive them, ref #1892
This isn't a perfect solution to error messages, as GPG bypasses the
stdin and sends data directly to the terminal. As such, things from
"stdin" is printed immediately, whereas stderr is printed through the
JVM. As a consequence, it's almost always the case that the stdin lines
are printed before the stderr lines, even though GPG usually sends them
in the opposite order. But it should give you a better indication when
something bad has happened.

Issue #1904 may accidentally be solved as well, as we now have a
shutdown hook on GPG.
2015-11-22 02:52:15 +01:00
Jean Niklas L'orange
c6b559ddb5 bump some hidden nrepl deps, ref #2017 2015-11-01 23:57:53 +01:00
Pietro F. Menna
d2a2076477 Return non zero status when :pedantic? is set to true or :abort
Closes #1856.
2015-10-11 17:16:46 -03:00
Jean Niklas L'orange
87c7e07da9 Back to snapshot 2015-09-22 00:37:56 +02:00
Jean Niklas L'orange
574aabb9d4 Release 2.5.3 2015-09-21 23:23:51 +02:00
James Reeves
1ecbb98ffc Create source, resource and test paths for eval prep
If a directory on the classpath does not exist when the JVM is started,
it's ignored even if it is subsequently created. This commit ensures
that source, resource and test paths exist as part of the prep work for
eval-in-project.
2015-09-04 04:20:32 +01:00
Tim Visher
30fccae5a1 Add eval/sh-with-exit-code
Exactly like `sh` except that it requires a failure message and if the
command exits with a non-0 code, it use the failure message to throw an
Exception.

Added unit tests as well.
2015-09-01 20:51:38 -04:00
shimanekb
e972e10cea fixed LANGUAGE only env variable 2015-08-22 23:00:41 -05:00
Phil Hagelberg
5ef752760c Add downgrade as first-class alias.
Upgrade/downgrade are "primitive" tasks that must be implemented in the
shell script for bootstrapping reasons. We have a dummy task just for
the purposes of having somewhere to hang a docstring; this commit adds
the alias for downgrade.

Fixes #1947
2015-08-10 10:58:27 +07:00
Jean Niklas L'orange
35aef5832b Back to snapshot. 2015-08-09 15:58:37 +02:00
Jean Niklas L'orange
fe48537e7d Release 2.5.2 2015-08-09 15:28:06 +02:00
Jean Niklas L'orange
7284785a77 Do not include repl deps as test deps, fixes #1771
While it's a good thought to have them as test dependencies, it just
breaks everything if you transitively depend on it.
2015-08-08 16:48:32 +02:00
Jean Niklas L'orange
4859747b16 Allow ^:displace'ing clojure dep in :repl profile
This is a temporary workaround, as this doesn't work for tools.nrepl nor
clojure-complete. Gurr.
2015-08-08 15:33:52 +02:00
Jean Niklas L'orange
08c8a9d53f Allow tools.nrepl and cc to be project deps again
Fixes #1748.
2015-08-08 03:09:33 +02:00
Phil Hagelberg
2ea050fc67 Merge pull request #1941 from towler73/master
added fix for components.xml merging.  If the description tag contain…
2015-07-30 08:45:16 +07:00
Jean Niklas L'orange
ffa700f946 Replace old HttpWagon conn-mngr setup. Fixes #1746
Bumping HttpWagon from 2.4 to 2.6 caused old methods in HttpWagon to
disappear, and along with it all the old Apache Http stuff we depended
on. This caused additional CA certificates provided in :certificates to
make Lein just fall on the floor and die.

This bumps HttpWagon to 2.9 and refactors Apache Http usage to
non-deprecated usage for the version we depend on.
2015-07-26 22:12:01 +02:00
Yannick Scherer
da574d7b4c add simple test for certificate processing.
Signed-off-by: Jean Niklas L'orange <jeannikl@hypirion.com>
2015-07-26 19:03:38 +02:00
Brett Morgan
79f0d3a99a added fix for components.xml merging. If the description tag contained embedded html, it needs to be escaped in the resulting merged components.xml. 2015-07-23 11:12:07 -04:00
Stephen Nelson
f413b6d73f Add support for reader conditional files (cljc)
Clojure 1.7.0 will add support for reader conditionals:

http://dev.clojure.org/display/design/Reader+Conditionals

This patch adds reader conditional support to leiningen, in particular for
compilation (including aot and stale files) and testing.
2015-07-19 08:52:49 +12:00
Stephen Nelson
6e0ebc20f7 Upgrade clojure dependency to 1.7.0 2015-07-16 15:11:01 +12:00
Jean Niklas L'orange
4ab6de9b9c Bump nrepl dependency. 2015-07-09 15:32:01 +02:00
Or Neeman
a1c4cb2d94 Refactor main/drop-partial-args 2015-04-23 12:58:03 -06:00
Jean Niklas L'orange
ff84da6972 Chas isn't wasting time, I can tell you that. 2015-03-24 21:56:17 +01:00
Jean Niklas L'orange
80c84f3dff Fix docstrings for checkout functions.
[ci skip]
2015-03-22 02:28:24 +01:00
Jean Niklas L'orange
17a32dd510 Merge pull request #1842 from avasenin/read-checkouts
Move read-checkouts to project module and make it public
2015-03-22 01:58:19 +01:00