This includes three changes:
* Exclude the dynapath that comes in from bultitude and pomegranate, and
depend directly on a newer version that operates properly under Java 9
* Ensure we have a modifiable classloader before asking pomegranate to
modify it. Before Java 9, the AppClassLoader was a URLClassLoader, and
therefore modifiable. This is no longer the case with Java 9.
* Remove duplicated classpath init code from `eval-in :leiningen`, and
replace it with a call to `project/init-lein-classpath`. This required
making the latter function public.
These changes allow some lein functionality to work under Java 9 - there
is a Java 9 issue with data.xml that needs to be fixed before lein's
tests can all pass (http://dev.clojure.org/jira/browse/DXML-32).
Instead of using String.split then recombining arguments to repair broken
quoted arguments, this parser now finds entire arguments using regex matching.
This is more robust, handling extra whitespace (and non-space whitespace)
correctly, while also correctly matching quotations in argument strings and
preserving internal spaces.
The documentation said to "Create a file called `src/myplugin/profiles.clj`". This didn't work for me. I had to create a file `resources/myplugin/profiles.clj` instead.
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.
There was a file handle leak in the code as it was. It would never close the open reader against the jar resource. This will eventually cause JVM to be unable to open new files.
Functional Tests
----------------------
I'm using the code as I wrote it in my own project and there is now no file handle leak.
Passing in the project map as a parameter to eval-in-subprocess causes
havoc, as it has references to the functions reduce-dep-step and
reduce-repo-step in its metadata.
Changes to a native dependency that is not cleaned up will be warned
about to the user. In addition, when a dependency changes, only the
dependencies that actually changed will be checked for native
dependencies, speeding up restart time significantly when you change a
single dependency in a big project.
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.