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 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.
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.
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).
closes#1469
`lein run` currently has some special error handling around
FileNotFoundException which helps it decide what exactly it should
do. Unfortunately if the actual running of the given main function
itself throws a FileNotFoundException this is currently caught by
Leiningen and assumed to be a require error.
The simple solution is to run the main method outside of that error
handling block.
Regression test provided.
According to the [jar file specification](http://docs.oracle.com/javase/7/docs/technotes/guides/jar/jar.html)
> For resource files with non-empty directory prefixes, mappings are also
> recorded at the directory level. Only for classes with null package
> name, and resource files which reside in the root directory, will the
> mapping be recorded at the individual file level.
If needed, directory entries may be excluded using `:jar-exclusions`
regex like `#"^.*/$"`.
The old method skipped tests by adding a hook to
clojure.test/test-var, the problem being that :each fixtures
associated with the test have already run at that point, which is
unideal.
This change skips test by removing their :test metadata before running
the tests at all, which causes clojure.test to not see it as a test.
We use ns-interns to enumerate the vars, the same way clojure.test
does.
lein run tries to support invoking static methods on classes by
swallowing FileNotFoundExceptions when requiring the namespace to run,
which can obscure the real error when there's a real issue loading a
namespace.
Phil said he wasn't interested in keeping the (undocumented) feature
around, so the easiest fix to the error message problem was to remove
that feature.
Added a test as well.
More specific metadata wins, e.g. deftest trumps its namespace.
Also tweaked the tests a bit so that actual/expected results are now
shown in the output.