From d65f712ea3d8941f4b9145c0630c30c20af80d13 Mon Sep 17 00:00:00 2001
From: James Moger <james.moger@gitblit.com>
Date: Fri, 11 Nov 2011 17:22:21 -0500
Subject: [PATCH] Documentation. Add javadoc and source jars to the gbapi download.

---
 docs/01_features.mkd |    8 ++--
 .gitignore           |    1 
 build.xml            |   59 +++++++++++++++++++++++++----
 docs/05_roadmap.mkd  |   16 +++++++-
 4 files changed, 70 insertions(+), 14 deletions(-)

diff --git a/.gitignore b/.gitignore
index 3c0210d..9074474 100644
--- a/.gitignore
+++ b/.gitignore
@@ -20,3 +20,4 @@
 /src/WEB-INF/reference.properties
 /bin/
 /.settings/
+/javadoc
diff --git a/build.xml b/build.xml
index 52d9d94..8ba2b5a 100644
--- a/build.xml
+++ b/build.xml
@@ -85,7 +85,7 @@
 		<property name="distribution.zipfile" value="gitblit-${gb.version}.zip" />
 		<property name="distribution.warfile" value="gitblit-${gb.version}.war" />
 		<property name="fedclient.zipfile" value="fedclient-${gb.version}.zip" />
-		<property name="manager.jarfile" value="manager-${gb.version}.jar" />
+		<property name="manager.zipfile" value="manager-${gb.version}.zip" />
 		<property name="gbapi.zipfile" value="gbapi-${gb.version}.zip" />
 	</target>
 	
@@ -274,7 +274,7 @@
 				<arg value="%FEDCLIENT%=${fedclient.zipfile}" />
 
 				<arg value="--substitute" />
-				<arg value="%MANAGER%=${manager.jarfile}" />
+				<arg value="%MANAGER%=${manager.zipfile}" />
 
 				<arg value="--substitute" />
 				<arg value="%API%=${gbapi.zipfile}" />
@@ -422,6 +422,8 @@
 		<zip destfile="${fedclient.zipfile}">
 			<fileset dir="${basedir}">
 				<include name="fedclient.jar" />
+				<include name="LICENSE" />
+				<include name="NOTICE" />
 			</fileset>
 			<fileset dir="${basedir}/distrib">
 				<include name="federation.properties" />
@@ -438,7 +440,7 @@
 	<target name="buildManager" depends="compile" description="Builds the stand-alone Gitblit Manager">
 		<echo>Building Gitblit Manager ${gb.version}</echo>
 	
-		<genjar jarfile="${manager.jarfile}">
+		<genjar jarfile="maanager-${gb.version}.jar">
 			<resource file="${basedir}/src/com/gitblit/client/splash.png" />
 			<resource file="${basedir}/resources/gitblt-favicon.png" />
 			<resource file="${basedir}/resources/gitweb-favicon.png" />
@@ -478,6 +480,14 @@
 			</manifest>
 		</genjar>
 		
+		<!-- Build Manager Zip file -->
+		<zip destfile="${manager.zipfile}">
+			<fileset dir="${basedir}">
+				<include name="manager-${gb.version}.jar" />
+				<include name="LICENSE" />
+				<include name="NOTICE" />
+			</fileset>
+		</zip>
 	</target>
 	
 	<!-- 
@@ -488,7 +498,9 @@
 		<target name="buildApiLibrary" depends="compile" description="Builds the Gitblit RPC client library">
 			<echo>Building Gitblit API Library ${gb.version}</echo>
 		
-			<genjar jarfile="gbapi.jar">
+			<!-- Build API Library jar -->
+			<genjar jarfile="gbapi-${gb.version}.jar">
+				<class name="com.gitblit.Keys" />
 				<class name="com.gitblit.client.GitblitClient" />
 				<classpath refid="master-classpath" />
 				<classfilter>
@@ -501,10 +513,41 @@
 				</manifest>
 			</genjar>
 			
+			<!-- Build API sources jar -->
+			<zip destfile="gbapi-${gb.version}-sources.jar">
+				<fileset dir="${basedir}/src" defaultexcludes="yes">
+					<include name="com/gitblit/Constants.java"/>
+					<include name="com/gitblit/GitBlitException.java"/>
+					<include name="com/gitblit/Keys.java"/>
+			  		<include name="com/gitblit/client/**/*.java"/>
+			  		<include name="com/gitblit/models/**/*.java"/>
+			  		<include name="com/gitblit/utils/**/*.java"/>			  		
+				</fileset>
+			</zip>
+			
+			<!-- Build API JavaDoc jar -->
+			<javadoc destdir="${basedir}/javadoc">
+				<fileset dir="${basedir}/src" defaultexcludes="yes">
+					<include name="com/gitblit/Constants.java"/>
+					<include name="com/gitblit/GitBlitException.java"/>
+					<include name="com/gitblit/Keys.java"/>
+			  		<include name="com/gitblit/client/**/*.java"/>
+			  		<include name="com/gitblit/models/**/*.java"/>
+			  		<include name="com/gitblit/utils/**/*.java"/>			  		
+				</fileset>
+			</javadoc>
+			<zip destfile="gbapi-${gb.version}-javadoc.jar">
+				<fileset dir="${basedir}/javadoc" />
+			</zip>
+			
 			<!-- Build the API library zip file -->
 			<zip destfile="${gbapi.zipfile}">
 				<fileset dir="${basedir}">
-					<include name="gbapi.jar" />
+					<include name="gbapi-${gb.version}.jar" />
+					<include name="gbapi-${gb.version}-sources.jar" />
+					<include name="gbapi-${gb.version}-javadoc.jar" />
+					<include name="LICENSE" />
+					<include name="NOTICE" />
 				</fileset>
 				<fileset dir="${basedir}/ext">
 					<include name="gson*.jar" />
@@ -634,7 +677,7 @@
 			<arg value="%FEDCLIENT%=${fedclient.zipfile}" />
 
 			<arg value="--substitute" />
-			<arg value="%MANAGER%=${manager.jarfile}" />
+			<arg value="%MANAGER%=${manager.zipfile}" />
 
 			<arg value="--substitute" />
 			<arg value="%API%=${gbapi.zipfile}" />
@@ -721,8 +764,8 @@
 			username="${googlecode.user}" 
 			password="${googlecode.password}" 
 			projectname="gitblit" 
-			filename="${manager.jarfile}" 
-			targetfilename="manager-${gb.version}.jar"
+			filename="${manager.zipfile}" 
+			targetfilename="manager-${gb.version}.zip"
 			summary="Gitblit Manager v${gb.version} (Swing tool to remotely administer a Gitblit server)"
 			labels="Featured, Type-Package, OpSys-All" />
 		
diff --git a/docs/01_features.mkd b/docs/01_features.mkd
index 927df89..9b1c9a6 100644
--- a/docs/01_features.mkd
+++ b/docs/01_features.mkd
@@ -16,17 +16,17 @@
 ### Easy Web Management
 
 Administrators can create and manage all repositories & user accounts from the *web UI*.  
-Administrators can create and manage all repositories & user accounts from the *JSON RPC interface* using the [Gitblit Manager](%MANAGER%) or your own custom tooling. 
+Administrators can create and manage all repositories & user accounts from the *JSON RPC interface* using the [Gitblit Manager](http://code.google.com/p/gitblit/downloads/detail?name=%MANAGER%) or your own custom tooling. 
 
 ### Integration
 
 Gitblit has a pluggable user service mechanism which allows you to implement your own authentication, authorization, and user management.
 
-Gitblit offers RSS feeds, a JSON-based RPC mechanism, and a [Java client API library](%API%) which allow you to integrate Gitblit into your systems.
+Gitblit offers RSS feeds, a JSON-based RPC mechanism, and a [Java Client API library](http://code.google.com/p/gitblit/downloads/detail?name=%API%) which allows you to integrate Gitblit into your systems.
 
 ### Backup Strategy
 
-Gitblit includes a backup mechanism (*federation*) which can be used to backup repositories and, optionally, user accounts & server settings from your Gitblit instance to another Gitblit instance or to a [Gitblit Federation Client](%FEDCLIENT%).  Similarly you can use the federation mechanism to aggregate individual workspace Gitblit instances to a common, centralized server.
+Gitblit includes a backup mechanism (*federation*) which can be used to backup repositories and, optionally, user accounts & server settings from your Gitblit instance to another Gitblit instance or to a [Gitblit Federation Client](http://code.google.com/p/gitblit/downloads/detail?name=%FEDCLIENT%).  Similarly, you can use the federation mechanism to aggregate individual workspace Gitblit instances to a common, centralized server.
 
 
 ## Standard Features (GO/WAR)
@@ -69,7 +69,7 @@
 - A Windows service installation script and configuration tool
 
 ## Limitations
-- HTTP/HTTPS are the only supported protocols
+- HTTP/HTTPS are the only supported Git protocols
 - Access controls are not path-based, they are repository-based
 - Only Administrators can create, rename or delete repositories
 - Only Administrators can create, modify or delete users
diff --git a/docs/05_roadmap.mkd b/docs/05_roadmap.mkd
index 237952b..b29f622 100644
--- a/docs/05_roadmap.mkd
+++ b/docs/05_roadmap.mkd
@@ -13,14 +13,24 @@
 
 * Gitblit: editable settings page in GO/WAR
 * Gitblit: tag repositories and offer views of repositories by tag (issue 27)
-* Gitblit: aggregate RSS feeds by tag or subfolder
-* Gitblit: investigate create-on-push possibility
+* Gitblit: investigate create-repository-on-push.
+    * Maybe a new user role to allow this?
+    * Maybe a server setting to disable this completely?
+    * Pusher/Creator becomes repository owner and can then manipulate access lists, etc?
 * Gitblit: Clone Repository feature (issue 5)
     * optional scheduled pulls
     * optional automatic push to origin/remotes?
     * optional manual push to origin/remotes?
 * Gitblit: Lucene integration with multi-repository search (issue 16)
 * Gitblit: Repository regex substitutions should be stored in .git/.config, not gitblit.properties
+* Gitblit: Consider allowing git:// protocol using JGit
+    * new setting *git.allowGitProtocol* to enable/disable git:// protocol
+    * unrestricted repositories would have anonymous RW git:// access
+    * push-restricted repositories would have anonymous R git:// access
+    * clone-restricted repositories would prohibit git:// access
+    * view-restricted repositories would prohibit git:// access
+* Gitblit: Consider using Git-style config file instead of Java properties file for user storage (users.config vs. users.properties)
+    * this would allow for additional fields per user without bringing in a database
 
 ### TODO (low priority)
 
@@ -29,4 +39,6 @@
 
 ### IDEAS
 
+* Gitblit: aggregate RSS feeds by tag or subfolder
+* Gitblit: Consider creating more Git model objects and exposing them via the JSON RPC interface to allow inspection/retrieval of Git commits, Git trees, etc from Gitblit.
 * Gitblit: Stronger ticgit integration (issue 8)

--
Gitblit v1.9.1