James Moger
2011-11-21 797322eb90a1f5d21166fd691479b050ad7b754b
build.xml
@@ -86,6 +86,7 @@
      <property name="distribution.warfile" value="gitblit-${gb.version}.war" />
      <property name="fedclient.zipfile" value="fedclient-${gb.version}.zip" />
      <property name="manager.zipfile" value="manager-${gb.version}.zip" />
      <property name="gbapi.zipfile" value="gbapi-${gb.version}.zip" />
   </target>
   
   
@@ -103,6 +104,11 @@
            <include name="users.properties" />
         </fileset>
      </copy>
      <!-- copy gitblit.properties to the WEB-INF folder.
           this file is only used for parsing setting descriptions. -->
      <copy tofile="${basedir}/src/WEB-INF/reference.properties" overwrite="true"
         file="${basedir}/distrib/gitblit.properties" />
      <!-- Compile the build tool and execute it.
          This downloads missing compile-time dependencies from Maven. -->
@@ -198,7 +204,7 @@
         <copy todir="${docs.output.dir}">
            <!-- Copy selected Gitblit resources -->
            <fileset dir="${project.resources.dir}">
               <include name="bootstrap.130.css" />
               <include name="bootstrap.140.css" />
               <include name="bootstrap.gb.css" />
               <include name="markdown.css" />
               <include name="gitblt_25_white.png" />
@@ -253,7 +259,7 @@
            <arg value="index=overview" />
            <arg value="--alias" />
            <arg value="properties=gitblit.properties" />
            <arg value="properties=settings" />
            <arg value="--substitute" />
            <arg value="%VERSION%=${gb.version}" />
@@ -269,6 +275,9 @@
            <arg value="--substitute" />
            <arg value="%MANAGER%=${manager.zipfile}" />
            <arg value="--substitute" />
            <arg value="%API%=${gbapi.zipfile}" />
            <arg value="--substitute" />
            <arg value="%BUILDDATE%=${gb.versionDate}" />
@@ -320,6 +329,10 @@
         </fileset>
      </copy>
      
      <!-- Copy gitblit.properties as reference.properties -->
      <copy tofile="${project.war.dir}/WEB-INF/reference.properties"
         file="${basedir}/distrib/gitblit.properties"/>
      <!-- Build the docs for the WAR build -->
      <antcall target="buildDocs" inheritall="true" inheritrefs="true">
         <param name="docs.output.dir" value="${project.war.dir}/WEB-INF/docs" />
@@ -369,7 +382,7 @@
            <exclude name="com/gitblit/client/**" />
            <exclude name="com/gitblit/GitBlitServer*.class" />
            <exclude name="com/gitblit/Launcher*.class" />
            <exclude name="com/gitblit/MakeCertificate*.class" />
            <exclude name="com/gitblit/MakeCertificate*.class" />
         </fileset>
      </copy>
@@ -400,7 +413,7 @@
         <classpath refid="master-classpath" />
         <manifest>
            <attribute name="Main-Class" value="com.gitblit.FederationClientLauncher" />
            <attribute name="Specification-Version" value="${gb.version}" />
            <attribute name="Specification-Version" value="${gb.version}" />
            <attribute name="Release-Date" value="${gb.versionDate}" />
         </manifest>
      </genjar>
@@ -408,10 +421,12 @@
      <!-- Build the federation client zip file -->
      <zip destfile="${fedclient.zipfile}">
         <fileset dir="${basedir}">
            <include name="fedclient.jar" />
            <include name="fedclient.jar" />
            <include name="LICENSE" />
            <include name="NOTICE" />
         </fileset>
         <fileset dir="${basedir}/distrib">
            <include name="federation.properties" />
            <include name="federation.properties" />
         </fileset>
      </zip>
   </target>
@@ -425,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.jar">
      <genjar jarfile="manager-${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" />
@@ -438,6 +453,12 @@
         <resource file="${basedir}/resources/cold_16x16.png" />
         <resource file="${basedir}/resources/book_16x16.png" />
         <resource file="${basedir}/resources/bug_16x16.png" />
         <resource file="${basedir}/resources/health_16x16.png" />
         <resource file="${basedir}/resources/feed_16x16.png" />
         <resource file="${basedir}/resources/bullet_feed.png" />
         <resource file="${basedir}/resources/search-icon.png" />
         <resource file="${basedir}/resources/commit_changes_16x16.png" />
         <resource file="${basedir}/resources/commit_merge_16x16.png" />
         <resource file="${basedir}/resources/blank.png" />
         <resource file="${basedir}/src/com/gitblit/wicket/GitBlitWebApp.properties" />
            
@@ -454,18 +475,90 @@
         <manifest>
            <attribute name="Main-Class" value="com.gitblit.client.GitblitManagerLauncher" />
            <attribute name="SplashScreen-Image" value="splash.png" />
            <attribute name="Specification-Version" value="${gb.version}" />
            <attribute name="Specification-Version" value="${gb.version}" />
            <attribute name="Release-Date" value="${gb.versionDate}" />
         </manifest>
      </genjar>
      
      <!-- Build the Manager zip file -->
      <!-- Build Manager Zip file -->
      <zip destfile="${manager.zipfile}">
         <fileset dir="${basedir}">
            <include name="manager.jar" />
         </fileset>
            <include name="manager-${gb.version}.jar" />
            <include name="LICENSE" />
            <include name="NOTICE" />
         </fileset>
      </zip>
   </target>
   <!--
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         Build the Gitblit API client library
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      -->
      <target name="buildApiLibrary" depends="compile" description="Builds the Gitblit RPC client library">
         <echo>Building Gitblit API Library ${gb.version}</echo>
         <!-- 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>
               <exclude name="com.google.gson." />
               <exclude name="com.sun.syndication." />
            </classfilter>
            <manifest>
               <attribute name="Specification-Version" value="${gb.version}" />
               <attribute name="Release-Date" value="${gb.versionDate}" />
            </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-${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" />
               <exclude name="gson*-sources.jar" />
               <exclude name="gson*-javadoc.jar" />
               <include name="rome*.jar" />
               <exclude name="rome*-sources.jar" />
               <exclude name="rome*-javadoc.jar" />
            </fileset>
         </zip>
      </target>
      
      
   <!-- 
@@ -483,7 +576,7 @@
      <copy todir="${project.site.dir}">
         <!-- Copy selected Gitblit resources -->
         <fileset dir="${project.resources.dir}">
            <include name="bootstrap.130.css" />
            <include name="bootstrap.140.css" />
            <include name="bootstrap.gb.css" />
            <include name="markdown.css" />
            <include name="gitblt_25_white.png" />
@@ -569,7 +662,7 @@
         <arg value="index=overview" />
         <arg value="--alias" />
         <arg value="properties=gitblit.properties" />
         <arg value="properties=settings" />
         <arg value="--substitute" />
         <arg value="%VERSION%=${gb.version}" />
@@ -585,6 +678,9 @@
         <arg value="--substitute" />
         <arg value="%MANAGER%=${manager.zipfile}" />
         <arg value="--substitute" />
         <arg value="%API%=${gbapi.zipfile}" />
         <arg value="--substitute" />
         <arg value="%BUILDDATE%=${gb.versionDate}" />
@@ -616,7 +712,7 @@
      Compile from source, publish binaries, and build & deploy site
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   -->
   <target name="buildAll" depends="buildGO,buildWAR,buildFederationClient,buildManager,buildSite">
   <target name="buildAll" depends="buildGO,buildWAR,buildFederationClient,buildManager,buildApiLibrary,buildSite">
      <!-- Cleanup -->
      <delete dir="${project.build.dir}" />
      <delete dir="${project.war.dir}" />
@@ -633,7 +729,7 @@
      
      <echo>Uploading Gitblit ${gb.version} binaries</echo>
      
      <!-- Upload ZIP file -->
      <!-- Upload Gitblit GO ZIP file -->
      <gcupload 
          username="${googlecode.user}" 
          password="${googlecode.password}" 
@@ -643,7 +739,7 @@
          summary="Gitblit GO v${gb.version} (standalone, integrated Gitblit server)"
          labels="Featured, Type-Package, OpSys-All" />
         
      <!-- Upload WAR file -->
      <!-- Upload Gitblit WAR file -->
      <gcupload 
           username="${googlecode.user}" 
           password="${googlecode.password}" 
@@ -653,7 +749,7 @@
           summary="Gitblit WAR v${gb.version} (standard WAR webapp for servlet containers)"
           labels="Featured, Type-Package, OpSys-All" />
      
      <!-- Upload FedClient -->
      <!-- Upload Gitblit FedClient -->
      <gcupload 
         username="${googlecode.user}" 
         password="${googlecode.password}" 
@@ -663,7 +759,7 @@
         summary="Gitblit Federation Client v${gb.version} (command-line tool to clone data from federated Gitblit instances)"
         labels="Featured, Type-Package, OpSys-All" />
      <!-- Upload Manager -->
      <!-- Upload Gitblit Manager -->
      <gcupload 
         username="${googlecode.user}" 
         password="${googlecode.password}" 
@@ -671,6 +767,16 @@
         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" />
      <!-- Upload Gitblit API Library -->
      <gcupload
         username="${googlecode.user}"
         password="${googlecode.password}"
         projectname="gitblit"
         filename="${gbapi.zipfile}"
         targetfilename="gbapi-${gb.version}.zip"
         summary="Gitblit API Library v${gb.version} (JSON RPC library to integrate with your software)"
         labels="Featured, Type-Package, OpSys-All" />
   </target>
@@ -701,7 +807,7 @@
      Compile from source, publish binaries, and build & deploy site
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   -->
   <target name="publishAll" depends="publishBinaries,publishSite">
   <target name="publishAll" depends="publishBinaries,publishSite">
      <!-- Cleanup -->
      <delete dir="${project.build.dir}" />
      <delete dir="${project.war.dir}" />