James Moger
2011-11-10 c7a721aad7c23640d59ad682854e066f4538436c
build.xml
@@ -85,7 +85,8 @@
      <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="rpcclient.zipfile" value="rpcclient-${gb.version}.zip" />
      <property name="manager.jarfile" value="manager-${gb.version}.jar" />
      <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. -->
@@ -162,6 +168,7 @@
      <jar jarfile="${project.deploy.dir}/${project.jar}">
         <fileset dir="${project.build.dir}">
            <include name="**/*" />
            <exclude name="com/gitblit/client/**" />
         </fileset>
         <fileset dir="${project.resources.dir}">
            <exclude name="thumbs.db" />
@@ -252,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}" />
@@ -267,7 +274,10 @@
            <arg value="%FEDCLIENT%=${fedclient.zipfile}" />
            <arg value="--substitute" />
            <arg value="%RPCCLIENT%=${rpcclient.zipfile}" />
            <arg value="%MANAGER%=${manager.jarfile}" />
            <arg value="--substitute" />
            <arg value="%API%=${gbapi.zipfile}" />
            <arg value="--substitute" />
            <arg value="%BUILDDATE%=${gb.versionDate}" />
@@ -319,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" />
@@ -365,9 +379,10 @@
            <exclude name="WEB-INF/web.xml" />
            <exclude name="com/gitblit/tests/" />
            <exclude name="com/gitblit/build/**" />
            <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>
@@ -398,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>
@@ -406,10 +421,10 @@
      <!-- Build the federation client zip file -->
      <zip destfile="${fedclient.zipfile}">
         <fileset dir="${basedir}">
            <include name="fedclient.jar" />
            <include name="fedclient.jar" />
         </fileset>
         <fileset dir="${basedir}/distrib">
            <include name="federation.properties" />
            <include name="federation.properties" />
         </fileset>
      </zip>
   </target>
@@ -417,15 +432,18 @@
   <!-- 
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      Build the stand-alone, Gitblit RPC Client
      Build the stand-alone, Gitblit Manager
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   -->
   <target name="buildRpcClient" depends="compile" description="Builds the stand-alone Gitblit RPC client">
      <echo>Building Gitblit RPC Client ${gb.version}</echo>
   <target name="buildManager" depends="compile" description="Builds the stand-alone Gitblit Manager">
      <echo>Building Gitblit Manager ${gb.version}</echo>
   
      <genjar jarfile="rpcclient.jar">
      <genjar jarfile="${manager.jarfile}">
         <resource file="${basedir}/src/com/gitblit/client/splash.png" />
         <resource file="${basedir}/resources/gitblt-favicon.png" />
         <resource file="${basedir}/resources/gitweb-favicon.png" />
         <resource file="${basedir}/resources/user_16x16.png" />
         <resource file="${basedir}/resources/settings_16x16.png" />
         <resource file="${basedir}/resources/lock_go_16x16.png" />
         <resource file="${basedir}/resources/lock_pull_16x16.png" />
         <resource file="${basedir}/resources/shield_16x16.png" />
@@ -433,9 +451,15 @@
         <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/blank.png" />
         <resource file="${basedir}/src/com/gitblit/wicket/GitBlitWebApp.properties" />
            
         <class name="com.gitblit.client.GitblitClientLauncher" />
         <class name="com.gitblit.client.GitblitManagerLauncher" />
         <classfilter>
            <exclude name="org.apache." />
            <exclude name="org.bouncycastle." />
@@ -446,20 +470,51 @@
         </classfilter>
         <classpath refid="master-classpath" />
         <manifest>
            <attribute name="Main-Class" value="com.gitblit.client.GitblitClientLauncher" />
            <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 rpc client zip file -->
      <zip destfile="${rpcclient.zipfile}">
         <fileset dir="${basedir}">
            <include name="rpcclient.jar" />
         </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>
         <genjar jarfile="gbapi.jar">
            <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 the API library zip file -->
         <zip destfile="${gbapi.zipfile}">
            <fileset dir="${basedir}">
               <include name="gbapi.jar" />
            </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>
      
      
   <!-- 
@@ -563,7 +618,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}" />
@@ -578,7 +633,10 @@
         <arg value="%FEDCLIENT%=${fedclient.zipfile}" />
         <arg value="--substitute" />
         <arg value="%RPCCLIENT%=${rpcclient.zipfile}" />
         <arg value="%MANAGER%=${manager.jarfile}" />
         <arg value="--substitute" />
         <arg value="%API%=${gbapi.zipfile}" />
         <arg value="--substitute" />
         <arg value="%BUILDDATE%=${gb.versionDate}" />
@@ -610,7 +668,7 @@
      Compile from source, publish binaries, and build & deploy site
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   -->
   <target name="buildAll" depends="buildGO,buildWAR,buildFederationClient,buildRpcClient,buildSite">
   <target name="buildAll" depends="buildGO,buildWAR,buildFederationClient,buildManager,buildApiLibrary,buildSite">
      <!-- Cleanup -->
      <delete dir="${project.build.dir}" />
      <delete dir="${project.war.dir}" />
@@ -623,11 +681,11 @@
      Publish binaries to Google Code
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   -->
   <target name="publishBinaries" depends="buildGO,buildWAR,buildFederationClient,buildRpcClient" description="Publish the Gitblit binaries to Google Code">
   <target name="publishBinaries" depends="buildGO,buildWAR,buildFederationClient,buildManager" description="Publish the Gitblit binaries to Google Code">
      
      <echo>Uploading Gitblit ${gb.version} binaries</echo>
      
      <!-- Upload ZIP file -->
      <!-- Upload Gitblit GO ZIP file -->
      <gcupload 
          username="${googlecode.user}" 
          password="${googlecode.password}" 
@@ -637,7 +695,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}" 
@@ -647,7 +705,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}" 
@@ -657,14 +715,24 @@
         summary="Gitblit Federation Client v${gb.version} (command-line tool to clone data from federated Gitblit instances)"
         labels="Featured, Type-Package, OpSys-All" />
      <!-- Upload RpcClient -->
      <!-- Upload Gitblit Manager -->
      <gcupload 
         username="${googlecode.user}" 
         password="${googlecode.password}" 
         projectname="gitblit" 
         filename="${rpcclient.zipfile}"
         targetfilename="rpcclient-${gb.version}.zip"
         summary="Gitblit RPC Client v${gb.version} (Swing tool to clone repositories and remotely administer a Gitblit server)"
         filename="${manager.jarfile}"
         targetfilename="manager-${gb.version}.jar"
         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>
@@ -695,7 +763,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}" />