diff options
author | Florian Zschocke <zschocke@gmx.de> | 2019-11-07 20:00:17 +0100 |
---|---|---|
committer | Florian Zschocke <florian.zschocke@devolo.de> | 2019-11-07 23:45:07 +0100 |
commit | b902e6949ea283e9e553b5b9288bb1da13193db7 (patch) | |
tree | d1c6598bfadad325b93b0521c61a0c6a76550a64 /build.xml | |
parent | 1140536f6d2f97658c97cadb0c9546df8061d541 (diff) | |
download | gitblit-b902e6949ea283e9e553b5b9288bb1da13193db7.tar.gz gitblit-b902e6949ea283e9e553b5b9288bb1da13193db7.zip |
For Java 9+ define the classpath instead of using a Launcher.
The (moxie and other) Launcher do not work with Java 9 and later anymore.
It used to dynamically extend the classpath, misusing an internal
interface of the `URLClassLoader`. This is no longer possible since Java 9,
which closed that path and does not offer any way to dynamically extend
the classpath during runtime.
So the choice is between providing one large Jar with everything in it,
providing a Jar that has the Jars in `ext` listed explicitly in its
manifest, and specifying the classpath on the command line where
the `ext` directory can be added and all contained jar files will
be put on the classpath.
The motivation for the Launcher class was to be able to simply drop
new jar files into a directory and they will be picked up at the
application start, without having to specify a classpath. We opt
for solution three here. This way jar files can still be dropped
into the ext directory, albeit the directory needs to be added to
the classpath on the command line. Unfortunately using a wildcard
is not possible in the manifest file. We change the calls in the
script files accordingly. This seems like a good compromise,
since no one will run the application manually typing the whole
commandline anyway.
This also does away with the splash screen, by the way. Again,
doesn't seem like a big loss, as I don't think it was ever shown
for the Authority.
Personally, I am not convinced that it is the best way, because
I don't really think that the use case of dropping whatever jar
files into the `ext` directory is a valid one that happened a lot.
This does not yet fix the client programs, which still use a
Launcher. Maybe for them a all-in-one Jar is a better solution.
Fixes #1262
Fixes #1294
Diffstat (limited to 'build.xml')
-rw-r--r-- | build.xml | 1 |
1 files changed, 0 insertions, 1 deletions
@@ -205,7 +205,6 @@ <!-- Build jar -->
<mx:jar destfile="${go.release.dir}/gitblit.jar" includeresources="true">
<mainclass name="com.gitblit.GitBlitServer" />
- <launcher paths="ext" />
</mx:jar>
<!-- Generate the docs for the GO build -->
|