Commit graph

483 commits

Author SHA1 Message Date
Phil Hagelberg
c3de05b51f
Merge pull request #2279 from gonewest818/unattended-signatures
invoke GPG unattended with passphrase
2018-01-30 19:28:37 -08:00
Phil Hagelberg
0e8c823ea8 Oops; typoed that last lein new test fix. 2018-01-22 16:00:14 -08:00
Phil Hagelberg
22d1269eeb Fix test for lein new. 2018-01-22 15:28:44 -08:00
Conor McDermottroe
14807e96ca Add project coordinate data to JAR metadata
This causes entries like:

    Leiningen-Project-ArtifactId: bar
    Leiningen-Project-GroupId: foo
    Leiningen-Project-Version: 1.2.3-SNAPSHOT

to be added to META-INF/MANIFEST.MF in JARS for projects with
project.clj files like:

    (defproject foo/bar "1.2.3-SNAPSHOT"
      ...
      )
2017-12-21 15:01:14 +00:00
Nicolas Berger
726c1a4081 Add test showing that empty values can be set under :scm :git 2017-09-19 00:44:29 -03:00
Nicolas Berger
5f6a08533f Infer default values from .git/config for :scm :git
Previous when :scm :git was used only the values defined in the :scm
map of the project were used so values not defined there were left blank.
This way it was common to end having an scm node in the pom.xml without
a <tag> node, resulting in the dreaded "with this commit" in clojars
pointing to HEAD instead of pointing to the commit that originated the
release.

Now when :scm :git is used, default values for the :scm node are inferred
from .git/config as if "auto" was used, with the difference that any
value defined under :scm in the project takes precedence over those
inferred defaults. This applies to :url, :connection, :developerConnection
and :tag
2017-09-19 00:38:17 -03:00
Nicolas Berger
1937e561d2 Pom: refactor write-scm-tag and make-git-scm
Makes it to return plain maps for all values of :scm to use xmlify and
xml-tags in all cases. Apart from easier to read code, it will make it
easy to implement merging values from git and from project map when
(= "git" scm)
2017-09-19 00:33:06 -03:00
Neil Okamoto
8eff187bbf expand test coverage to confirm signing args for multiple gpg versions 2017-08-24 23:28:35 -07:00
Neil Okamoto
ec921f141e allow GPG to be invoked unattended with passphrase (+2 squashed commits)
Squashed commits:
[81bda1b] allow GPG to be invoked unattended with passphrase
[ef54597] allow GPG to be invoked unattended with passphrase
2017-08-24 13:15:21 -07:00
Phil Hagelberg
5234263d9d Update Maven Central mirror URL.
Fixes #2299.
2017-08-16 15:04:39 -07:00
Phil Hagelberg
63305fcccd Unmemoize in order to fix tests. 2017-06-04 09:38:00 -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
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
80e649329a Fix test which dumps files in project root. 2017-03-23 14:43:45 -07:00
Phil Hagelberg
9c21862f0b Remove mention of advanced query syntax.
Remove empty search test.
2017-01-17 22:50:51 -08: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
Raymond Huang
7cfa57980a Add test for deploying to a file repo 2016-11-03 23:42:39 -07:00
Raymond Huang
bf7e029d73 Infer classifier when deploying adhoc files 2016-11-02 22:26:36 -07: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
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
Chris Price
3feae04e76 Fix checking for SNAPSHOT deps with managed deps - fixes #2205
This commit fixes #2205: when using managed dependencies in
a project, if the project itself was a non-SNAPSHOT version,
then when `lein install` and similar tasks were executed,
lein would check to make sure that none of the dependencies
were a SNAPSHOT version.  lein was checking that directly against
the `:dependencies` vector, which would cause an NPE if a dependency
didn't specify a version number (because it was inheriting it from
the `:managed-dependencies` section).

This commit fixes the bug by calling the code that merges the
`:dependencies` and `:managed-dependencies` vectors together prior
to performing the SNAPSHOT check.
2016-09-15 21:12:26 -07:00
Jean Niklas L'orange
54bd09ba11 Merge PR #2159
Conflicts:
	test/leiningen/test/helper.clj
2016-08-21 20:35:15 +02:00
Chris Price
869f09eeac Update test for clojars cert expiration date - fixes #2170 2016-07-12 12:43:59 -07:00
Chris Price
eb902a2714 Add support for dependencyManagement section in pom 2016-06-30 16:24:54 -07:00
Chris Price
7ea847d16f Clarify docs, add tests for transitive deps
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`.
2016-06-30 10:29:18 -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
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
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
Alex Hall
61fd4de9db Catch and handle fixture errors during tests 2016-04-29 21:56:23 +00:00
Jean Niklas L'orange
540142bc55 Keep whitelist-keys for backwards compatibility 2016-02-17 23:53:40 +01: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
51f80c1298 Clojure 1.8.0 2016-01-21 11:08:58 +01:00
Chris Price
ef4e178f81 (#2043) release task: support SNAPSHOTs on qualifiers
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.
2015-12-24 14:25:46 -08:00
Jean Niklas L'orange
3b0bd543e4 Merge pull request #1988
Conflicts:
	test/leiningen/test/new.clj
2015-09-20 17:25:53 +02:00
Jean Niklas L'orange
a8907c496d Add CHANGELOG.md to tests. 2015-09-20 17:18:40 +02:00
Jean Niklas L'orange
af387e9e7c Merge pull request #1970 from Hardtack/master
Fix #1785
2015-09-20 15:43:35 +02:00
Daniel Compton
eb98e855cf Add option to not sign tags when running "vcs" "tag"
- Add vcs tag commandline argument parser
- Update documentation to show new options

Fixes #1873, fixes #1799
2015-09-11 09:29:53 +12:00
Jeremy Allard
bdc2e3ab33 Change the file-not-found test to be less strict on the output 2015-09-08 01:35:49 -04:00
GunWoo Choi
d9fa141629 Add test for new template with mirror settings 2015-08-30 16:59:55 +09:00
Jean Niklas L'orange
3ba4fde633 Cleanup files after test. 2015-08-08 16:55:39 +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
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
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
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
00e158f6f3 Bump standalone nrepl version as well, ref #1861. 2015-03-21 00:37:46 +01:00
Jean Niklas L'orange
c35a1de4f0 Avoid wrapping shell pipes in writers, fixes #1857
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.
2015-03-21 00:12:26 +01:00