Package core plugins in Gerrit war and install them on init

This change adds a new Maven project 'gerrit-package-plugins' which
adds the core plugin jars to the Gerrit war file. Inside of the
resulting Gerrit war file the plugins are stored under
'WEB-INF/plugins/'.

The init command will now look at this folder during the site
initialization and offer the plugins for installation.

Change-Id: Ia6c28ef13bbbb7a0358c84e785b8422a2e6a47b3
This commit is contained in:
Edwin Kempin
2012-07-23 10:46:06 +02:00
parent 88531176ec
commit 67e09dc69e
9 changed files with 307 additions and 30 deletions

View File

@@ -148,6 +148,11 @@ public class PluginLoader implements LifecycleListener {
}
}
public static File storeInTemp(String pluginName, InputStream in,
SitePaths sitePaths) throws IOException {
return asTemp(in, tempNameFor(pluginName), ".jar", sitePaths.tmp_dir);
}
private static File asTemp(InputStream in,
String prefix, String suffix,
File dir) throws IOException {