Commit graph

66 commits

Author SHA1 Message Date
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
Trevor Hartman
fb2028b36e Update remaining 2 "great documentation" links 2013-12-17 08:53:36 -07:00
Marshall Bockrath-Vandegrift
5d64d83fd6 More nuanced merging of project defaults. 2013-10-14 19:59:18 -04:00
Marshall Bockrath-Vandegrift
39e3d57ec9 Implement :uberjar-merge-with requested in issue #973. 2013-10-05 13:56:57 -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
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
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
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
Phil Hagelberg
962ce20ae9 Scope :compile-path and :native-path under :target-path. 2013-07-24 20:55:23 -07:00
Phil Hagelberg
44eb86cfd5 Don't blow up on test failures in test-ns-hook.
Fixes #1201.
2013-07-06 15:57:26 -07:00
Gary Fredericks
71e609c8a1 Don't try static methods on lein run: better error msg
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.
2013-05-22 17:32:23 -05:00
Joshua P. Tilles
437e63daab Adjust compile task to make use of regex fns
Also update documentation.
2013-03-19 16:12:08 -07:00
Marshall T. Vandegrift
24ca286d54 Test :provided profile interpretation by the uberjar task. 2012-11-17 17:38:11 -05:00
Phil Hagelberg
624bf2ae88 Move AOT of :main into uberjar task. Remove :skip-aot. 2012-11-12 15:30:43 -08:00
Jim Crossley
e770d5e649 Include namespace metadata in test-selector predicates, fixes #242
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.
2012-10-02 19:38:35 -04:00
Phil Hagelberg
5400be18a2 Fix pom and deploy tests. 2012-08-30 10:12:58 -07:00
Phil Hagelberg
22b427aca1 Fix some of the tests. 2012-08-29 19:50:53 -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
e7dadcd7b9 Remove commented-out shell wrapper remainders. 2012-08-01 09:42:20 -07:00
Phil Hagelberg
82d812eccb Fix pom tests to reflect sample project change. 2012-06-26 20:26:37 -07:00
Phil Hagelberg
70695f5868 Work with latest pomegranate deploy-artifacts signature. 2012-06-26 17:31:36 -07:00
Phil Hagelberg
2f2bd69b4d Fix tests for bootclasspath. 2012-06-14 16:26:22 -07:00
Phil Hagelberg
6ed63b0254 Remove support for :run-aliases. 2012-05-24 18:27:19 -07:00
Phil Hagelberg
f6a4ba53ae Don't re-extract native deps unless deps have changed. Fixes #535.
Also introduces the when-stale helper function which should be useful
in other cases as well.
2012-05-07 16:29:31 -07:00
Phil Hagelberg
7f5e2b1a94 Support :fn in :filespecs for arbitrary additions to jar. 2012-04-03 11:36:13 -07:00
Anthony Grimes
82df67b959 Add a failing test for overlapped sourcepaths. 2012-03-06 15:58:14 -06:00
Phil Hagelberg
1fe2fed158 Fix deps tests. 2012-01-06 21:27:21 -08:00
Phil Hagelberg
bfe2c32fd2 Remove dev-deps-only test project. 2012-01-06 21:27:21 -08:00
Phil Hagelberg
7a0449e6d6 Fix run tests. 2012-01-06 21:27:20 -08:00
Nelson Morris
cd5cd2c0d9 Update the run task tests for 2.0
The test.helper needed to change the project map for the test projects
because eval-in-project uses get-classpath, which will return the
relative paths for some directories.  This breaks in this case since
the working directory is not the root of the test project.
2011-12-02 21:45:47 -06:00
Phil Hagelberg
d3797fe408 Look for main functions on Java classes in run task. Fixes #249. 2011-11-10 13:42:19 -08:00
Phil Hagelberg
ffa1b3887c Check for file on disk before assuming :main should be AOT'd. Fixes #249. 2011-11-09 10:06:14 -08:00
Stephen Compall
372e9b902e Include a proxy in nom.nom.nom test, for compilation testing. 2011-10-19 14:32:57 -07:00
Phil Hagelberg
3b47bfccf1 Fix native-deps test. 2011-08-16 16:42:35 -04:00
Phil Hagelberg
0e299f0a17 Honor :jar-exclusions in copy-to-jar :bytes method. 2011-08-07 14:46:03 -07:00
Phil Hagelberg
874951cc56 Extract os/arch-specific native libs into native. 2011-05-31 21:40:38 -07:00
Clojure
f8831ed80f Support namespace injection in eval-in-project. 2011-05-05 20:18:12 -07:00
Phil Hagelberg
96ff4eee9e Allow multiple Java source paths. Fixes #155. 2011-03-09 21:51:49 -08:00
Phil Hagelberg
ff58079e37 Remove clojure snapshot dep from test project. 2011-02-13 15:06:42 -08:00
Matjaz Gregoric
e3bf2d0454 Fix test_deploy. 2011-02-11 23:56:52 +01:00
Phil Hagelberg
b4943e1caa Allow :clean-non-project-classes to be a seq of regexes. 2010-12-24 21:24:34 -08:00
Phil Hagelberg
c5c760329b Add a test for :skip-aot on :main. Fixes #145. 2010-12-13 22:56:10 -08:00
Phil Hagelberg
70dc18aebb Switch test project to not use missing Clojure snapshot. 2010-12-13 22:45:02 -08:00
Phil Hagelberg
b66a046609 Fix tests to reflect sample project version change. 2010-12-09 12:46:33 -08:00
Phil Hagelberg
cc62c1a818 Don't allow release versions that depend upon snapshots. 2010-12-09 12:46:33 -08:00
Phil Hagelberg
3c5fecfe98 Fix path issue in javac task. Fixes #138. 2010-11-23 20:11:58 -08:00