\r
<arg value="--pageFooter" />\r
<arg value="${basedir}/docs/page_footer.html" />\r
+ \r
+ <arg value="--alias" />\r
+ <arg value="index=overview" />\r
</java>\r
\r
</target>\r
--- /dev/null
+## Overview\r
+Git:Blit is an open-source, integrated pure Java stack for managing, viewing, and serving [Git][git] repositories.\r
+Its designed primarily as a tool for small workgroups who want to host [Git][git] repositories on a Windows machine.\r
+\r
+Of course, since its pure Java it should run with any JVM on any platform, but there are already [many compelling Git solutions](https://git.wiki.kernel.org/index.php/InterfacesFrontendsAndTools) for non-Windows environments.\r
+ \r
+### Current Version\r
+\r
+[{0}](http://gitblit.com/{1}) based on [{2}][jgit] (*{3}*)\r
+\r
+sources @ [Github][gitbltsrc]\r
+\r
+### Design Principles\r
+1. [KISS](http://en.wikipedia.org/wiki/KISS_principle)\r
+2. Offer useful features for serving Git repositories. If feature is complex, refer to #1.\r
+3. All dependencies must be retrievable from a publicly accessible Maven repository.<br/>This is to ensure authenticity of dependencies and to keep the Git:Blit distribution svelte. \r
+\r
+### Features\r
+- Out-of-the-box integrated stack requiring minimal configuration\r
+- JGit SmartHTTP servlet\r
+- Browser and git client authentication\r
+- Four repository access control configurations and a Read-Only flag\r
+ <ul class='noBullets'>\r
+ <li>![anonymous](blank.png) *Anonymous View, Clone & Push*</li>\r
+ <li>![push](lock_go_16x16.png) *Authenticated Push*</li>\r
+ <li>![clone](lock_pull_16x16.png) *Authenticated Clone & Push*</li>\r
+ <li>![view](shield_16x16.png) *Authenticated View, Clone & Push*</li>\r
+ <li>![freeze](cold_16x16.png) Freeze repository (i.e. deny push, make read-only)\r
+ </ul>\r
+- Gitweb inspired UI\r
+- Administrators may create, edit, rename, or delete repositories through the web UI\r
+- Administrators may create, edit, rename, or delete users through the web UI\r
+- Repository Owners may edit repositories through the web UI\r
+- Automatically generates a self-signed certificate for https communications\r
+- Dates can optionally be displayed using the browser''s reported timezone\r
+- Author and Committer email address display can be controlled\r
+- Markdown view support\r
+- Syntax highlighting\r
+- Customizable regular expression handling for commit messages\r
+- Single text file for server configuration\r
+- Single text file for users configuration\r
+- Simple repository stats and activity graph (uses Google Charts)\r
+- Optional utility pages\r
+ <ul class='noBullets'>\r
+ <li>![docs](book_16x16.png) Docs page which enumerates all Markdown files within a repository</li>\r
+ <li>![tickets](bug_16x16.png) Ticgit ticket pages *(based on last MIT release bf57b032 2009-01-27)*</li>\r
+ </ul>\r
+\r
+### Limitations\r
+- HTTP/HTTPS are the only supported protocols\r
+- Access controls are not path-based, they are repository-based\r
+- Only Administrators can create, rename or delete repositories\r
+- Git:Blit is an integrated, full-stack solution. There is no WAR build at this time.\r
+\r
+### Todo List\r
+- Manual certificate generation with BouncyCastle\r
+- User list with edit and delete links\r
+- Review spots where Git:Blit can cache data instead of abusing the disk\r
+ - stats\r
+ - users.properties access\r
+ - available repositories\r
+ - etc\r
+- Download zip feature\r
+- Site documentation\r
+- Code documentation\r
+- Unit testing\r
+\r
+### Idea List\r
+- Ticgit activity/timeline\r
+- Ticgit query feature with paging support\r
+- Ticgit ticket change history\r
+- View images on Blob page\r
+- View other binary files on Blob page\r
+- Markdown editing feature\r
+- Blame feature (waiting for the [JGit][jgit] team to do the hard part)\r
+\r
+### License\r
+TBD\r
+\r
+### Inspirations\r
+- [Gitweb](http://www.git-scm.com)\r
+- [Fossil](http://www.fossil-scm.org) \r
+\r
+## Architecture\r
+\r
+![block diagram](architecture.png "Git Blit Architecture")\r
+\r
+### Bundled Dependencies\r
+The following dependencies are bundled with the Git:Blit zip distribution file.\r
+\r
+- [google-code-prettify](http://code.google.com/p/google-code-prettify) (Apache 2.0)\r
+- [JavaService](http://forge.ow2.org/projects/javaservice) (BSD and LGPL)\r
+- icons courtesy of [FatCow Hosting](http://www.fatcow.com/free-icons) (Creative Commons CC-BY)\r
+- magnifying glass search icon courtesy of [Gnome](http://gnome.org) (Creative Commons CC-BY)\r
+\r
+### Downloaded Dependencies\r
+The following dependencies are automatically downloaded from the Apache Maven repository and from the Eclipse Maven repository when Git:Blit is launched for the first time.\r
+\r
+- [JGit][jgit] (EDL 1.0)\r
+- [Wicket](http://wicket.apache.org) (Apache 2.0)\r
+- [WicketStuff GoogleCharts](https://github.com/wicketstuff/core/wiki/GoogleCharts) (Apache 2.0)\r
+- [MarkdownPapers](http://markdown.tautua.org) (Apache 2.0)\r
+- [Jetty](http://eclipse.org/jetty) (Apache 2.0, EPL 1.0)\r
+- [SLF4J](http://www.slf4j.org) (MIT/X11)\r
+- [Log4j](http://logging.apache.org/log4j) (Apache 2.0) \r
+- [JCommander](http://jcommander.org) (Apache 2.0)\r
+- [BouncyCastle](http://www.bouncycastle.org) (MIT/X11)\r
+\r
+### Other Build Dependencies\r
+- [Fancybox image viewer](http://fancybox.net) (MIT and GPL dual-licensed)\r
+\r
+## Building\r
+[Eclipse](http://eclipse.org) is recommended for development as the project settings are preconfigured.\r
+\r
+1. Clone the git repository from [Github][gitbltsrc].\r
+2. Import the gitblit project into your Eclipse workspace.<br/>\r
+*There will be lots of build errors.*\r
+3. Using Ant, execute the `build.xml` script in the project root.<br/>\r
+*This will download all necessary build dependencies and will also generate the Keys class for accessing settings.*\r
+4. Select your gitblit project root and **Refresh** the project, this should correct all build problems.\r
+5. Review the settings in `gitblit.properties` in your project root.<br/>\r
+Make sure you set an appropriate value for *git.repositoriesFolder*. \r
+6. Execute the *com.gitblit.Launcher* class to start Git:Blit.\r
+\r
+[jgit]: http://eclipse.org/jgit "Eclipse JGit Site"\r
+[git]: http://git-scm.com "Official Git Site"\r
+[gitbltsrc]: http://somewhere.com "gitblit git repository"
\ No newline at end of file
+++ /dev/null
-## Overview\r
-Git:Blit is an open-source, integrated pure Java stack for managing, viewing, and serving [Git][git] repositories.\r
-Its designed primarily as a tool for small workgroups who want to host [Git][git] repositories on a Windows machine.\r
-\r
-Of course, since its pure Java it should run with any JVM on any platform, but there are already [many compelling Git solutions](https://git.wiki.kernel.org/index.php/InterfacesFrontendsAndTools) for non-Windows environments.\r
- \r
-### Current Version\r
-\r
-[{0}](http://gitblit.com/{1}) based on [{2}][jgit] (*{3}*)\r
-\r
-sources @ [Github][gitbltsrc]\r
-\r
-### Design Principles\r
-1. [KISS](http://en.wikipedia.org/wiki/KISS_principle)\r
-2. Offer useful features for serving Git repositories. If feature is complex, refer to #1.\r
-3. All dependencies must be retrievable from a publicly accessible Maven repository.<br/>This is to ensure authenticity of dependencies and to keep the Git:Blit distribution svelte. \r
-\r
-### Features\r
-- Out-of-the-box integrated stack requiring minimal configuration\r
-- JGit SmartHTTP servlet\r
-- Browser and git client authentication\r
-- Four repository access control configurations and a Read-Only flag\r
- <ul class='noBullets'>\r
- <li>![anonymous](blank.png) *Anonymous View, Clone & Push*</li>\r
- <li>![push](lock_go_16x16.png) *Authenticated Push*</li>\r
- <li>![clone](lock_pull_16x16.png) *Authenticated Clone & Push*</li>\r
- <li>![view](shield_16x16.png) *Authenticated View, Clone & Push*</li>\r
- <li>![freeze](cold_16x16.png) Freeze repository (i.e. deny push, make read-only)\r
- </ul>\r
-- Gitweb inspired UI\r
-- Administrators may create, edit, rename, or delete repositories through the web UI\r
-- Administrators may create, edit, rename, or delete users through the web UI\r
-- Repository Owners may edit repositories through the web UI\r
-- Automatically generates a self-signed certificate for https communications\r
-- Dates can optionally be displayed using the browser''s reported timezone\r
-- Author and Committer email address display can be controlled\r
-- Markdown view support\r
-- Syntax highlighting\r
-- Customizable regular expression handling for commit messages\r
-- Single text file for server configuration\r
-- Single text file for users configuration\r
-- Simple repository stats and activity graph (uses Google Charts)\r
-- Optional utility pages\r
- <ul class='noBullets'>\r
- <li>![docs](book_16x16.png) Docs page which enumerates all Markdown files within a repository</li>\r
- <li>![tickets](bug_16x16.png) Ticgit ticket pages *(based on last MIT release bf57b032 2009-01-27)*</li>\r
- </ul>\r
-\r
-### Limitations\r
-- HTTP/HTTPS are the only supported protocols\r
-- Access controls are not path-based, they are repository-based\r
-- Only Administrators can create, rename or delete repositories\r
-- Git:Blit is an integrated, full-stack solution. There is no WAR build at this time.\r
-\r
-### Todo List\r
-- Manual certificate generation with BouncyCastle\r
-- User list with edit and delete links\r
-- Review spots where Git:Blit can cache data instead of abusing the disk\r
- - stats\r
- - users.properties access\r
- - available repositories\r
- - etc\r
-- Download zip feature\r
-- Site documentation\r
-- Code documentation\r
-- Unit testing\r
-\r
-### Idea List\r
-- Ticgit activity/timeline\r
-- Ticgit query feature with paging support\r
-- Ticgit ticket change history\r
-- View images on Blob page\r
-- View other binary files on Blob page\r
-- Markdown editing feature\r
-- Blame feature (waiting for the [JGit][jgit] team to do the hard part)\r
-\r
-### License\r
-TBD\r
-\r
-### Inspirations\r
-- [Gitweb](http://www.git-scm.com)\r
-- [Fossil](http://www.fossil-scm.org) \r
-\r
-## Architecture\r
-\r
-![block diagram](architecture.png "Git Blit Architecture")\r
-\r
-### Bundled Dependencies\r
-The following dependencies are bundled with the Git:Blit zip distribution file.\r
-\r
-- [google-code-prettify](http://code.google.com/p/google-code-prettify) (Apache 2.0)\r
-- [JavaService](http://forge.ow2.org/projects/javaservice) (BSD and LGPL)\r
-- icons courtesy of [FatCow Hosting](http://www.fatcow.com/free-icons) (Creative Commons CC-BY)\r
-- magnifying glass search icon courtesy of [Gnome](http://gnome.org) (Creative Commons CC-BY)\r
-\r
-### Downloaded Dependencies\r
-The following dependencies are automatically downloaded from the Apache Maven repository and from the Eclipse Maven repository when Git:Blit is launched for the first time.\r
-\r
-- [JGit][jgit] (EDL 1.0)\r
-- [Wicket](http://wicket.apache.org) (Apache 2.0)\r
-- [WicketStuff GoogleCharts](https://github.com/wicketstuff/core/wiki/GoogleCharts) (Apache 2.0)\r
-- [MarkdownPapers](http://markdown.tautua.org) (Apache 2.0)\r
-- [Jetty](http://eclipse.org/jetty) (Apache 2.0, EPL 1.0)\r
-- [SLF4J](http://www.slf4j.org) (MIT/X11)\r
-- [Log4j](http://logging.apache.org/log4j) (Apache 2.0) \r
-- [JCommander](http://jcommander.org) (Apache 2.0)\r
-- [BouncyCastle](http://www.bouncycastle.org) (MIT/X11)\r
-\r
-### Other Build Dependencies\r
-- [Fancybox image viewer](http://fancybox.net) (MIT and GPL dual-licensed)\r
-\r
-## Building\r
-[Eclipse](http://eclipse.org) is recommended for development as the project settings are preconfigured.\r
-\r
-1. Clone the git repository from [Github][gitbltsrc].\r
-2. Import the gitblit project into your Eclipse workspace.<br/>\r
-*There will be lots of build errors.*\r
-3. Using Ant, execute the `build.xml` script in the project root.<br/>\r
-*This will download all necessary build dependencies and will also generate the Keys class for accessing settings.*\r
-4. Select your gitblit project root and **Refresh** the project, this should correct all build problems.\r
-5. Review the settings in `gitblit.properties` in your project root.<br/>\r
-Make sure you set an appropriate value for *git.repositoriesFolder*. \r
-6. Execute the *com.gitblit.Launcher* class to start Git:Blit.\r
-\r
-[jgit]: http://eclipse.org/jgit "Eclipse JGit Site"\r
-[git]: http://git-scm.com "Official Git Site"\r
-[gitbltsrc]: http://somewhere.com "gitblit git repository"
\ No newline at end of file
--- /dev/null
+## Setup and Configuration\r
+\r
+1. Download and unzip Git:Blit.<br/>\r
+*Its best to eliminate spaces in the path name as that can cause troubleshooting headaches.* \r
+2. The server itself is configured through a simple text file.<br/>\r
+Open `gitblit.properties` in your favorite text editor and make sure to review and set:\r
+ - *git.repositoryFolder*\r
+ - *server.tempFolder*\r
+ - *server.httpBindInterface* and *server.httpsBindInterface*<br/>\r
+**NOTE:** Consider using **https** exclusively because passwords for authentication are transmitted as clear text! \r
+ - *server.storePassword*<br/>\r
+**NOTE:** The certificate password AND the keystore password must match! \r
+3. Execute `gitblit.cmd` or `java -jar gitblit.jar` from a command-line\r
+4. Wait a minute or two while all dependencies are downloaded and your self-signed certificate is generated.\r
+5. Open your browser to <http://localhost> or <https://localhost> depending on your chosen configuration.\r
+6. Click the *Login* link and enter the default administrator credentials: **admin / admin**<br/>\r
+**NOTE:** Make sure to change the administrator username and/or password!! \r
+\r
+### Administering Repositories\r
+Repositories can be created, edited, renamed, and deleted through the web UI. They may also be created, edited, and deleted from the command-line using real [Git](http://git-scm.com) or your favorite file manager and text editor.\r
+\r
+All repository settings are stored within the repository `.git/config` file under the *gitblit* section.\r
+\r
+ [gitblit]\r
+ description = master repository\r
+ owner = james\r
+ useTickets = false\r
+ useDocs = true\r
+ showRemoteBranches = false\r
+ accessRestriction = clone\r
+ isFrozen = false\r
+ \r
+#### Repository Names\r
+Repository names must be unique and are case-insensitive. The name must be composed of letters, digits, or `/ _ - .`<br/>\r
+Whitespace is illegal.\r
+\r
+#### Repository Owner\r
+The *Repository Owner* has the special permission of being able to edit a repository through the web UI. The Repository Owner is not permitted to rename the repository, delete the repository, or reassign ownership to another user.\r
+\r
+### Administering Users\r
+All users are stored in the `users.properties` file or in the file you specified in `gitblit.properties`.<br/>\r
+The format of `users.properties` follows Jetty's convention for HashRealms:\r
+\r
+ username,password,role1,role2,role3...\r
+\r
+#### Usernames\r
+Usernames must be unique and are case-insensitive.<br/>\r
+Whitespace is illegal.\r
+\r
+#### Passwords\r
+User passwords are CASE-SENSITIVE and may be *plain*, *md5*, or *crypt* formatted (see `gitblit.properties` -> *realm.passwordStorage*).\r
+\r
+#### User Roles\r
+There is only one actual *role* in Git:Blit and that is *#admin* which grants administrative powers to that user. Administrators automatically have access to all repositories. All other *roles* are repository names. If a repository is access-restricted, the user must have the repository's name within his/her roles to bypass the access restriction. This is how users are granted access to a restricted repository.\r
+\r
+### Creating your own Self-Signed Certificate\r
+\r
+Review the contents of the `makekeystore.cmd` or `makekeystore_jdk.cmd` script and execute it.<br/>\r
+**NOTE:** The certificate password AND the keystore password must match!\r
+\r
+### Running as a Service\r
+Review the contents of the `installService.cmd` or `installService64.cmd`, as appropriate for your JVM.<br/>\r
+Set the *JDK* variable in the script to the location of your JDK, add any necessary start parameters, and execute the script.\r
+\r
+#### Command-Line Parameters\r
+ --tempFolder Server temp folder\r
+ --repositoriesFolder Git Repositories Folder\r
+ --realmFile Users Realm Hash File\r
+ --useNio Use NIO Connector else use Socket Connector.\r
+ --httpPort HTTP port for to serve. (port <= 0 will disable this connector)\r
+ --httpsPort HTTPS port to serve. (port <= 0 will disable this connector)\r
+ --storePassword Password for SSL (https) keystore.\r
+ --shutdownPort Port for Shutdown Monitor to listen on. (port <= 0 will disable this monitor)\r
+ \r
+**Example**\r
+\r
+ java -jar gitblit.jar --realmFile c:\myrealm.txt --storePassword something
\ No newline at end of file
+++ /dev/null
-## Setup and Configuration\r
-\r
-1. Download and unzip Git:Blit.<br/>\r
-*Its best to eliminate spaces in the path name as that can cause troubleshooting headaches.* \r
-2. The server itself is configured through a simple text file.<br/>\r
-Open `gitblit.properties` in your favorite text editor and make sure to review and set:\r
- - *git.repositoryFolder*\r
- - *server.tempFolder*\r
- - *server.httpBindInterface* and *server.httpsBindInterface*<br/>\r
-**NOTE:** Consider using **https** exclusively because passwords for authentication are transmitted as clear text! \r
- - *server.storePassword*<br/>\r
-**NOTE:** The certificate password AND the keystore password must match! \r
-3. Execute `gitblit.cmd` or `java -jar gitblit.jar` from a command-line\r
-4. Wait a minute or two while all dependencies are downloaded and your self-signed certificate is generated.\r
-5. Open your browser to <http://localhost> or <https://localhost> depending on your chosen configuration.\r
-6. Click the *Login* link and enter the default administrator credentials: **admin / admin**<br/>\r
-**NOTE:** Make sure to change the administrator username and/or password!! \r
-\r
-### Administering Repositories\r
-Repositories can be created, edited, renamed, and deleted through the web UI. They may also be created, edited, and deleted from the command-line using real [Git](http://git-scm.com) or your favorite file manager and text editor.\r
-\r
-All repository settings are stored within the repository `.git/config` file under the *gitblit* section.\r
-\r
- [gitblit]\r
- description = master repository\r
- owner = james\r
- useTickets = false\r
- useDocs = true\r
- showRemoteBranches = false\r
- accessRestriction = clone\r
- isFrozen = false\r
- \r
-#### Repository Names\r
-Repository names must be unique and are case-insensitive. The name must be composed of letters, digits, or `/ _ - .`<br/>\r
-Whitespace is illegal.\r
-\r
-#### Repository Owner\r
-The *Repository Owner* has the special permission of being able to edit a repository through the web UI. The Repository Owner is not permitted to rename the repository, delete the repository, or reassign ownership to another user.\r
-\r
-### Administering Users\r
-All users are stored in the `users.properties` file or in the file you specified in `gitblit.properties`.<br/>\r
-The format of `users.properties` follows Jetty's convention for HashRealms:\r
-\r
- username,password,role1,role2,role3...\r
-\r
-#### Usernames\r
-Usernames must be unique and are case-insensitive.<br/>\r
-Whitespace is illegal.\r
-\r
-#### Passwords\r
-User passwords are CASE-SENSITIVE and may be *plain*, *md5*, or *crypt* formatted (see `gitblit.properties` -> *realm.passwordStorage*).\r
-\r
-#### User Roles\r
-There is only one actual *role* in Git:Blit and that is *#admin* which grants administrative powers to that user. Administrators automatically have access to all repositories. All other *roles* are repository names. If a repository is access-restricted, the user must have the repository's name within his/her roles to bypass the access restriction. This is how users are granted access to a restricted repository.\r
-\r
-### Creating your own Self-Signed Certificate\r
-\r
-Review the contents of the `makekeystore.cmd` or `makekeystore_jdk.cmd` script and execute it.<br/>\r
-**NOTE:** The certificate password AND the keystore password must match!\r
-\r
-### Running as a Service\r
-Review the contents of the `installService.cmd` or `installService64.cmd`, as appropriate for your JVM.<br/>\r
-Set the *JDK* variable in the script to the location of your JDK, add any necessary start parameters, and execute the script.\r
-\r
-#### Command-Line Parameters\r
- --tempFolder Server temp folder\r
- --repositoriesFolder Git Repositories Folder\r
- --realmFile Users Realm Hash File\r
- --useNio Use NIO Connector else use Socket Connector.\r
- --httpPort HTTP port for to serve. (port <= 0 will disable this connector)\r
- --httpsPort HTTPS port to serve. (port <= 0 will disable this connector)\r
- --storePassword Password for SSL (https) keystore.\r
- --shutdownPort Port for Shutdown Monitor to listen on. (port <= 0 will disable this monitor)\r
- \r
-**Example**\r
-\r
- java -jar gitblit.jar --realmFile c:\myrealm.txt --storePassword something
\ No newline at end of file
import java.nio.charset.Charset;\r
import java.text.MessageFormat;\r
import java.text.SimpleDateFormat;\r
+import java.util.ArrayList;\r
import java.util.Arrays;\r
import java.util.Date;\r
+import java.util.HashMap;\r
+import java.util.List;\r
+import java.util.Map;\r
\r
import com.beust.jcommander.JCommander;\r
import com.beust.jcommander.Parameter;\r
});\r
Arrays.sort(markdownFiles);\r
\r
+ Map<String, String> aliasMap = new HashMap<String, String>();\r
+ for (String alias:params.aliases) {\r
+ String [] values = alias.split("=");\r
+ aliasMap.put(values[0], values[1]);\r
+ }\r
+ \r
System.out.println(MessageFormat.format("Generating site from {0} Markdown Docs in {1} ", markdownFiles.length, sourceFolder.getAbsolutePath()));\r
String linkPattern = "<a href=''{0}''>{1}</a>";\r
StringBuilder sb = new StringBuilder();\r
for (File file : markdownFiles) {\r
- String displayName = getDocumentName(file);\r
- String fileName = displayName + ".html";\r
+ String documentName = getDocumentName(file);\r
+ String displayName = documentName;\r
+ if (aliasMap.containsKey(documentName)) {\r
+ displayName = aliasMap.get(documentName);\r
+ }\r
+ String fileName = documentName + ".html";\r
sb.append(MessageFormat.format(linkPattern, fileName, displayName));\r
sb.append(" | ");\r
}\r
sb.setLength(sb.length() - 3);\r
sb.trimToSize();\r
+ \r
String html_header = readContent(new File(params.pageHeader));\r
String html_footer = readContent(new File(params.pageFooter));\r
final String links = sb.toString();\r
final String footer = MessageFormat.format(html_footer, "generated " + date);\r
for (File file : markdownFiles) {\r
try {\r
- String displayName = getDocumentName(file);\r
- String fileName = displayName + ".html";\r
+ String documentName = getDocumentName(file);\r
+ String displayName = documentName;\r
+ if (aliasMap.containsKey(documentName)) {\r
+ displayName = aliasMap.get(documentName);\r
+ }\r
+ String fileName = documentName + ".html";\r
System.out.println(MessageFormat.format(" {0} => {1}", file.getName(), fileName));\r
InputStreamReader reader = new InputStreamReader(new FileInputStream(file), Charset.forName("UTF-8"));\r
String content = MarkdownUtils.transformMarkdown(reader);\r
@Parameter(names = { "--pageFooter" }, description = "Page Footer HTML Snippet", required = true)\r
public String pageFooter;\r
\r
+ @Parameter(names = { "--alias" }, description = "Filename=Linkname aliases", required = false)\r
+ public List<String> aliases = new ArrayList<String>();\r
+\r
}\r
}\r