Commit graph

353 commits

Author SHA1 Message Date
Phil Hagelberg
88181a4bbf Use dep-key for distinct call in pom task.
group/artifact version tuple isn't enough to de-dupe correctly.

Fixes #1494.
2014-04-22 15:03:34 -07:00
Jim Crossley
9d8b214ccc Include group in dedupe key to fix #1480 2014-04-15 17:29:14 -04:00
Phil Hagelberg
ed67d8093b Make Leiningen (more) Eastwood-friendly.
Still get a couple warnings... We don't really care about the
unlimited-use warnings from clojure.test, and there are a couple
warnings we get stemming from bugs/limitations in Eastwood.
2014-04-03 20:18:28 -07:00
Matthew Blair
65c3dd5766 Create new tests for use of --force option 2014-04-01 23:25:00 -04:00
Matthew Blair
f7c70fa2f0 Fix executable test - add force option since test is being run in system temp directory 2014-04-01 23:24:42 -04:00
Jean Niklas L'orange
a296ff8918 Bump all Clojure 1.5.1 deps to 1.6.0. 2014-03-26 13:43:38 +01:00
Jean Niklas L'orange
84af9246cf Do not depend on map ordering in tests. 2014-03-26 13:43:38 +01:00
Phil Hagelberg
6cdc043e9a Adapt template template so that the #1409 fix doesn't break new templates. 2014-03-17 15:30:40 -07:00
Phil Hagelberg
ae91367b78 Tell Bultitude not to ignore unreadable namespaces in test/check.
Fixes #1409.
2014-03-17 15:21:19 -07:00
Phil Hagelberg
e8da286ea7 Failing test for #1409. 2014-03-17 14:25:44 -07:00
Phil Hagelberg
a6bebc9459 Merge pull request #1470 from fredericksgary/issue-1469
lein run: don't catch app errors as require errors
2014-03-13 20:06:17 -07:00
Gary Fredericks
b19b305d58 Slightly more homogeneous test project names 2014-03-13 20:24:42 -05:00
Gary Fredericks
cc886d56a3 lein run: don't catch app errors as require errors
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.
2014-03-13 20:17:59 -05:00
Phil Hagelberg
1b39bc5b27 Make repl tests resilient to having .nrepl-port file in pwd. 2014-03-06 13:34:20 -08:00
Craig McDaniel
a5cf442cf3 Support for overriding :clean-targets sanity checking (issue #1458).
Also made unit tests safer and faster using with-redefs to mock out
calls to delete-file-recursively.
Better error messages when a path is being protected.
2014-03-03 21:35:03 -05:00
Craig McDaniel
9c84a5e2e0 Removed (run-tests) call that was being used for interactive REPL testing 2014-03-01 12:37:16 -05:00
Craig McDaniel
b19b80390c Fix for #1458: clean-targets sanity checks. 2014-03-01 12:35:32 -05:00
Craig McDaniel
ba6e88200b Partial implementation of fix for :clean-targets sanity checking (issue #1458) 2014-02-28 08:26:36 -05:00
Craig McDaniel
c87cb003a2 Initial happy-path unit tests for the clean task. Relates to #1458 2014-02-25 22:13:13 -05:00
Jean Niklas L'orange
a5d2ea5161 Allow non-string args to compile task. Fixes #1442 2014-02-22 15:24:40 +01:00
Marshall Bockrath-Vandegrift
a38f3903cf Also expand the built-in default profiles. 2014-01-28 06:20:10 -05:00
Jean Niklas L'orange
ecb7ed0e77 Decompose with-profile args not containing +/-. 2014-01-27 16:31:34 +01:00
Marshall Bockrath-Vandegrift
8bd6b8fb53 Fix #1421 by decomposing profiles into collections of atomic profiles. 2014-01-27 15:54:05 +01:00
Phil Hagelberg
04133b573a Accept both orderings of args in :show subtask of new. 2013-11-18 20:08:09 -08:00
Phil Hagelberg
a45e8a5b0f Move parse-options test, fix typo. 2013-11-16 14:43:59 -08:00
Phil Hagelberg
1f7886c8bb Move parse-options into leiningen.core.main for general use.
Also remove support for single-dashed args.
2013-11-16 14:43:59 -08:00
Travis Vachon
1926f12e48 Refactor lein new argument parsing
It was a bit janky and hard to extend. This is maybe still janky, but
very extensible. Win?

We can now easily add new options to this command. I took some pains to
maintain backwards compatibility, even with the undocumented ability to
pass arguments on to templates. The full extent of this syntax isn't
documented in the docstring yet, but I'll expand that once we support
options that expose its darker corners.
2013-11-16 14:43:59 -08:00
Jean Niklas L'orange
ae2e789b04 Support nested do chains, remove implicit help.
Also provide an example in the sample project. Closes #1359.
2013-10-30 00:40:44 +01:00
Toby Crawley
3e865aedf2 Account for repl urls with paths [fixes #1344, again] 2013-10-17 00:06:40 -04:00
Toby Crawley
9f41ea9154 Fix 'repl :connect <port>' when used outside of a project [fixes #1344]
connect-string now verifies that the string ends with a port after the
string is fully formed, aborting if no port is found. This also
includes improvements to the repl help text, and more test coverage
for connect-string.
2013-10-10 11:50:44 -04:00
Phil Hagelberg
7b3ff4e570 Add a test for gpg keys and ssl cert expiry. 2013-10-05 15:29:16 -07:00
Marshall Bockrath-Vandegrift
39e3d57ec9 Implement :uberjar-merge-with requested in issue #973. 2013-10-05 13:56:57 -04:00
Jim Crossley
360fab0fe7 Abort with a nicer message when neither port nor .nrepl-port is provided 2013-10-02 11:05:16 -04:00
Jim Crossley
bd008f800e Fallback to .nrepl-port for 'repl :connect' subtask 2013-10-01 15:18:25 -04:00
Jean Niklas L'orange
ab7f332797 Merge in better error messages for -m in lein run. 2013-09-29 20:07:49 +02:00
Jean Niklas L'orange
f39b4b7c38 More descriptive error message for nonexistant ns.
Closes #1257.
2013-09-29 20:02:17 +02:00
Jean Niklas L'orange
10adf535d3 Better error message for bad -m args. 2013-09-29 18:57:52 +02:00
Jean Niklas L'orange
c86a69333e Don't add alias-help as public API in lein.help.
Also add in a couple of tests to ensure that aliases print docstrings.
2013-09-07 03:01:06 +02:00
Jean Niklas L'orange
89f06a49aa Add in a :plugin-tree test. 2013-08-29 15:21:08 +02:00
Jean Niklas L'orange
400d782272 Reenable java main run test.
Also more changes from use to require.
2013-08-24 17:36:21 +02:00
Jean Niklas L'orange
d00670f27f Delete subdir directory. 2013-08-24 17:12:15 +02:00
Jean Niklas L'orange
ab9271bcef Go from use->require. 2013-08-24 16:56:43 +02:00
Jean Niklas L'orange
cbd9e6b1cb Clean up helper docstrings. 2013-08-24 16:56:29 +02:00
Vadim Platonov
5b97d9a472 fix(jar): Add directory entries to the jar file
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 `#"^.*/$"`.
2013-08-21 14:30:10 +03:00
Phil Hagelberg
95bdc72f80 Add :exclusions to :base deps to avoid version conflict warnings. 2013-08-17 21:10:58 -07:00
Phil Hagelberg
d12e7b1343 Fix pom tests. 2013-08-08 14:30:13 -07:00
Gary Fredericks
08eaf70781 #1269: Skip tests differently when using :test-selectors
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.
2013-07-31 23:29:19 -05:00
Wolodja Wentland
83c136daa1 Add LICENSE file to project templates
Projects created by "lein new" are meant to be licensed under the EPL as noted
in project.clj and README.md. One requirement of the EPL is, however, that "a
copy of this Agreement [the EPL] must be included with each copy of the
Program." [0].

This means that projects created by leiningen cannot be legally distributed if
the author fails to add the LICENSE him/herself. This patch fixes this issue
by creating a LICENSE file with a plain text copy of the EPL 1.0 (cf. [0]) by
default for new projects.

[0] http://www.eclipse.org/legal/epl-v10.html → 3. REQUIREMENTS
2013-07-30 15:07:44 +01:00
Jean Niklas L'orange
2d8d5b39a6 Revert uberjar test back to std. name, ref #1260. 2013-07-26 09:17:35 +02:00
Jean Niklas L'orange
ae161bac8a "Fix" uberjar test, and make jar defn private.
Ref #1260, all uberjars generated without any specific profile
additions/deletions are now put in the folder `target/uberjar+provided`.
That's not intentional, right?
2013-07-25 10:37:58 +02:00