This commit clarifies some things in the docs based on PR review.
It also adds additional test coverage for managed dependencies;
specifically, a case where two normal dependencies both have
a transitive dependency on the same library, but with different
versions. The test validates that this conflict is properly
resolved via `:managed-dependencies`.
This commit adds some additional dependencies to the test project
file for managed dependencies, and significantly increases the
coverage of the tests.
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.
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.
Prior to this commit, the `lein release` task was not
really usable for releases that had qualifiers such
as `-alpha1`, `-beta2`, or `-RC1`.
The reason for this is that the code for parsing the
semver could not handle a qualifier like `-alpha1`
AND a `-SNAPSHOT` qualifier at the same time.
The default `:release-tasks` include a `bump-version`
at the `:release` level, and then the release, and
then a `bump-version` at the `:patch` level. If
you had a version that started out as `1.0.0-alpha1` *or*
`1.0.0-alpha1-SNAPSHOT`, then the `:release` bump
would always set the version to `1.0.0`. Then the
actual release would occur, and then the `:patch` bump
would take you to `1.0.1-SNAPSHOT`.
With this commit, `qualifier` and `snapshot` are
separated into two separate fields in the version map.
This allows us to modify the `bump-version` behavior
so that it works as one would expect with a qualifier
like `alpha`:
```clj
(is (= (bump-version "1.0.0-alpha1-SNAPSHOT" :release)
"1.0.0-alpha1"))
(is (= (bump-version "1.0.0-alpha1")
"1.0.0-alpha2-SNAPSHOT"))
```
This allows the default `:release-tasks` setup to be
used with qualifiers like alpha/beta.
The commit also adds a new `level` that can be passed
to the `change` task: `:qualifier`. If this level
is passed, then the qualifier will be incremented
instead of the major/minor/patch. It is a superset
of the existing alpha/beta/RC behavior but works with
arbitrary qualifier strings.
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.
The fix is actually very easy: Instead of piping stuff into a reader,
then feed it to *out*/*err* via a writer, we directly hook them to
System.out and System.err.
The problem is that it kills many tests that rely on `with-out-str`, so
we have to include `with-system-err/out-str` macros to catch
sysout/syserr data, and replace usage where tests fail.
Adds :leaky and :pom-scope metadata for profiles. The :dev, :test,
:base and :provided profiles are implemented in terms of these.
Profiles with :leaky metadata affect the pom and jar creation.
Profiles with a :pom-scope metadata of :test or :provided also affect
the dependencies of a pom.
We need to revisit this in a way that doesn't involve hard-coding
profile names into the jar and pom tasks. The question of whether the
profile should be visible to downstream consumers should be determined
by data that's part of the profile (or metadata).