From df3594165089d28409cdd57bbe5f3fde304557f1 Mon Sep 17 00:00:00 2001 From: James Moger Date: Fri, 11 Apr 2014 13:41:53 -0400 Subject: [PATCH] Improve plugin documentation --- build.xml | 16 ++++++--- src/main/distrib/data/gitblit.properties | 25 +-------------- src/site/features.mkd | 5 +-- src/site/setup_plugins.mkd | 41 +++++++++++++++++++----- 4 files changed, 49 insertions(+), 38 deletions(-) diff --git a/build.xml b/build.xml index 0baf090e..f9b171dc 100644 --- a/build.xml +++ b/build.xml @@ -558,8 +558,6 @@ - - @@ -577,6 +575,10 @@ + + + + @@ -620,6 +622,8 @@ + + @@ -877,8 +881,6 @@ - - @@ -896,6 +898,10 @@ + + + + @@ -912,6 +918,8 @@ + + diff --git a/src/main/distrib/data/gitblit.properties b/src/main/distrib/data/gitblit.properties index 3a531232..beeb965b 100644 --- a/src/main/distrib/data/gitblit.properties +++ b/src/main/distrib/data/gitblit.properties @@ -570,7 +570,7 @@ plugins.folder = ${baseFolder}/plugins # The registry of available plugins. # # SINCE 1.5.0 -plugins.registry = http://gitblit.github.io/gitblit-registry/plugins.json +plugins.registry = http://plugins.gitblit.com/plugins.json # # Groovy Integration @@ -1748,12 +1748,6 @@ realm.redmine.url = http://example.com/redmine # BASEFOLDER server.tempFolder = ${baseFolder}/temp -# Use Jetty NIO connectors. If false, Jetty Socket connectors will be used. -# -# SINCE 0.5.0 -# RESTART REQUIRED -server.useNio = true - # Specify the maximum number of concurrent http/https worker threads to allow. # # SINCE 1.3.0 @@ -1783,14 +1777,6 @@ server.httpPort = 0 # RESTART REQUIRED server.httpsPort = 8443 -# Port for serving an Apache JServ Protocol (AJP) 1.3 connector for integrating -# Gitblit GO into an Apache HTTP server setup. <= 0 disables this connector. -# Recommended value: 8009 -# -# SINCE 0.9.0 -# RESTART REQUIRED -server.ajpPort = 0 - # Automatically redirect http requests to the secure https connector. # # This setting requires that you have configured server.httpPort and server.httpsPort. @@ -1819,15 +1805,6 @@ server.httpBindInterface = # RESTART REQUIRED server.httpsBindInterface = -# Specify the interface for Jetty to bind the AJP connector. -# You may specify an ip or an empty value to bind to all interfaces. -# Specifying localhost will result in Gitblit ONLY listening to requests to -# localhost. -# -# SINCE 0.9.0 -# RESTART REQUIRED -server.ajpBindInterface = localhost - # Alias of certificate to use for https/SSL serving. If blank the first # certificate found in the keystore will be used. # diff --git a/src/site/features.mkd b/src/site/features.mkd index 6d933cc1..dc048804 100644 --- a/src/site/features.mkd +++ b/src/site/features.mkd @@ -21,9 +21,10 @@ - **RWD** (clone and push with ref creation, deletion) - **RW+** (clone and push with ref creation, deletion, rewind) - Menu driven native platform clone links for all popular Git clients -- *Experimental* built-in Garbage Collection +- Garbage Collection service - Ability to federate with one or more other Gitblit instances - RSS/JSON RPC interface +- An evolving plugin infrastructure - Java/Swing Gitblit Manager tool - Responsive web UI that subtracts elements to be usable on phones, tablets, and desktop browsers - Groovy pre- and post- push hook scripts, per-repository or globally for all repositories @@ -46,7 +47,7 @@ - User-tracked reflog for pushes, tags, etc. - Fanout PubSub notifications service for self-hosted [Sparkleshare](http://sparkleshare.org) use - gh-pages display support (Jekyll is not supported) -- Branch metrics (uses Google Charts) +- Branch metrics - HEAD and Branch RSS feeds - Blame annotations view - Dates can optionally be displayed using the browser's reported timezone diff --git a/src/site/setup_plugins.mkd b/src/site/setup_plugins.mkd index 6ab4f1ef..b609a683 100644 --- a/src/site/setup_plugins.mkd +++ b/src/site/setup_plugins.mkd @@ -3,7 +3,7 @@ *SINCE 1.5.0* -Gitblit supports extending and enhacing the core functionality through plugins. This mechanism is very young and incomplete with few extension points, but you can expect it to evolve rapidly in upcoming releases. +Gitblit supports extending and enhancing the core functionality through plugins. This mechanism is very young and incomplete with few extension points, but you can expect it to evolve rapidly in upcoming releases. ### Architecture @@ -13,20 +13,45 @@ The zip plugins are stored in `${baseFolder}/plugins` and are unpacked on startu A plugin defines it's metadata in the META-INF/MANIFEST.MF file: - Plugin-Class: com.gitblit.plugins.cookbook.CookbookPlugin - Plugin-Dependencies: foo, bar - Plugin-Id: gitblit-plugin - Plugin-Provider: John Doe - Plugin-Version: 1.0 + Plugin-Class: com.gitblit.plugin.powertools.Powertools + Plugin-Dependencies: + Plugin-Id: com.gitblit.plugin:powertools + Plugin-Provider: James Moger + Plugin-Version: 1.1.0 In addition to extending Gitblit core, plugins can also define extension points that may be implemented by other plugins. Therefore a plugin may depend on other plugins. Plugin-Dependencies: foo, bar -Plugins are controlled by the `plugin` SSH dispatch command. Only *administrators* have permission to use this dispatch command. - +**NOTE:** The pf4j plugin framework relies on a javac apt processor to generate compile-time extension information, so be sure to enable apt processing in your build process. +### Managing Plugins + +Administrators may manage plugins through the `plugin` SSH dispatch command: + + ssh host plugin + +Through this command interface plugins can be started, stopped, disabled, enabled, installed, uninstalled, listed, etc. + +### Default Plugin Registry + +Gitblit provides a simple default registry of plugins. The registry is a JSON file and it lists plugin metadata and download locations. + + plugins.registry = http://plugins.gitblit.com/plugins.json + +The [registry](http://plugins.gitblit.com/plugins.json) is currently hosted in a [Git repository on Github](https://github.com/gitblit/gitblit-registry). This git repository is also a [Maven-compatible repository](http://plugins.gitblit.com), which hosts some plugin binaries. + +### Contributing Plugins to the Default Registry + +If you develop your own plugins that you want hosted by or linked in the default registry, open pull request for the registry repository. Any contributed binaries hosted in this repository must have Maven metadata and the SHA-1 & MD5 checksums. By default, Gitblit enforces checksum validation on all downloads. + +### Hosting your Own Registry / Allowing Multiple Registries + +The `plugins.json` file is parameterized with the `${self}` placeholder. This parameter is substituted on download with with the source URL of the registry file. This allows you to clone and serve your own copy of this git repository or just server your own `plugins.json` on your own network. + +Gitblit also supports loading multiple plugin registries. Just place another **properly formatted** `.json` file in `${baseFolder}/plugins` and Gitblit will load that as an additional registry. + ### Extension Point: SSH DispatchCommand You can provide your own custom SSH commands by extending the DispatchCommand. -- 2.39.5