James Moger
2011-09-22 9b72a2e674f7cbc320b0b72fc71ad813d296ab12
build.xml
@@ -2,7 +2,8 @@
<project name="gitblit" default="compile" basedir=".">
   <!-- Google Code upload task -->
   <taskdef classname="net.bluecow.googlecode.ant.GoogleCodeUploadTask" classpath="${basedir}/tools/ant-googlecode-0.0.3.jar" name="gcupload"/>
   <taskdef classname="net.bluecow.googlecode.ant.GoogleCodeUploadTask"
      classpath="${basedir}/tools/ant-googlecode-0.0.3.jar" name="gcupload"/>
   <!-- Project Properties -->
   <property name="project.jar" value="gitblit.jar" />
@@ -12,9 +13,19 @@
   <property name="project.war.dir" value="${basedir}/war" />
   <property name="project.site.dir" value="${basedir}/site" />
   <property name="project.resources.dir" value="${basedir}/resources" />   
   <available property="hasBuildProps" file="${basedir}/build.properties"/>
   <!-- Load publication servers, paths, and credentials -->
   <loadproperties srcfile="${basedir}/build.properties" />
   <!--
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      Load build.properties, if available
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   -->
   <target name="buildprops" if="hasBuildProps">
      <!-- Load publication servers, paths, and credentials -->
      <loadproperties>
         <file file="${basedir}/build.properties" />
      </loadproperties>
   </target>
   
   
   <!--
@@ -22,11 +33,7 @@
      Scrape the version info from code and setup the build properties 
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   -->
   <target name="buildinfo">
      <!-- build date -->
      <tstamp>
         <format property="gb.buildDate" pattern="yyyy-MM-dd" />
      </tstamp>
   <target name="buildinfo" depends="buildprops">
   
      <!-- extract Gitblit version number from source code -->
      <loadfile property="gb.version" srcfile="${basedir}/src/com/gitblit/Constants.java">
@@ -42,7 +49,22 @@
            </tokenfilter>
         </filterchain>
      </loadfile>
      <!-- extract Gitblit version date from source code -->
      <loadfile property="gb.versionDate" srcfile="${basedir}/src/com/gitblit/Constants.java">
         <filterchain>
            <linecontains>
               <contains value="public static final String VERSION_DATE = " />
            </linecontains>
            <striplinebreaks />
            <tokenfilter>
               <replacestring from="public static final String VERSION_DATE = &quot;" to="" />
               <replacestring from="&quot;;" to="" />
               <trim />
            </tokenfilter>
         </filterchain>
      </loadfile>
      <!-- extract JGit version number from source code -->
      <loadfile property="jgit.version" srcfile="${basedir}/src/com/gitblit/Constants.java">
         <filterchain>
@@ -123,6 +145,10 @@
         <fileset dir="${basedir}/distrib">
            <include name="**/*" />
         </fileset>
         <fileset dir="${basedir}">
            <include name="LICENSE" />
            <include name="NOTICE" />
         </fileset>
      </copy>
      <!-- Build jar -->
@@ -176,6 +202,7 @@
               <include name="bug_16x16.png" />
               <include name="book_16x16.png" />
               <include name="blank.png" />
               <include name="federated_16x16.png" />
            </fileset>
            <!-- Copy Doc images -->
@@ -229,14 +256,26 @@
            <arg value="%WAR%=${distribution.warfile}" />
            <arg value="--substitute" />
            <arg value="%BUILDDATE%=${gb.buildDate}" />
            <arg value="%BUILDDATE%=${gb.versionDate}" />
            <arg value="--substitute" />
            <arg value="%JGIT%=${jgit.version}" />
            <arg value="--load" />
            <arg value="--properties" />
            <arg value="%PROPERTIES%=${basedir}/distrib/gitblit.properties" />
            <arg value="--nomarkdown" />
            <arg value="%BEGINCODE%:%ENDCODE%" />
            <arg value="--substitute" />
            <arg value="&quot;%BEGINCODE%=&lt;pre class='prettyprint lang-java'&gt;&quot;" />
            <arg value="--substitute" />
            <arg value="%ENDCODE%=&lt;/pre&gt;" />
            <arg value="--regex" />
            <arg value="&quot;\b(issue)(\s*[#]?|-){0,1}(\d+)\b!!!&lt;a href='http://code.google.com/p/gitblit/issues/detail?id=$3'&gt;issue $3&lt;/a&gt;&quot;" />
         </java>
   </target>
   
@@ -259,6 +298,10 @@
         </fileset>
         <fileset dir="${basedir}/src/WEB-INF">
             <include name="web.xml" />
         </fileset>
         <fileset dir="${basedir}">
            <include name="LICENSE" />
            <include name="NOTICE" />
         </fileset>
      </copy>
      
@@ -346,6 +389,7 @@
            <include name="bug_16x16.png" />
            <include name="book_16x16.png" />
            <include name="blank.png" />
            <include name="federated_16x16.png" />
         </fileset>
         <!-- Copy Doc images -->
@@ -404,9 +448,15 @@
         <arg value="--pageHeader" />
         <arg value="${basedir}/docs/site_header.html" />
         <arg value="--pageFooter" />
         <arg value="${basedir}/docs/site_footer.html" />
         <arg value="--analyticsSnippet" />
         <arg value="${basedir}/docs/site_analytics.html" />
         <arg value="--adSnippet" />
         <arg value="${basedir}/docs/site_ads.html" />
         <arg value="--alias" />
         <arg value="index=overview" />
@@ -424,15 +474,27 @@
         <arg value="%WAR%=${distribution.warfile}" />
         <arg value="--substitute" />
         <arg value="%BUILDDATE%=${gb.buildDate}" />
         <arg value="%BUILDDATE%=${gb.versionDate}" />
         <arg value="--substitute" />
         <arg value="%JGIT%=${jgit.version}" />
         <arg value="--load" />
         <arg value="--properties" />
         <arg value="%PROPERTIES%=${basedir}/distrib/gitblit.properties" />
         <arg value="--nomarkdown" />
         <arg value="%BEGINCODE%:%ENDCODE%" />
      </java>
         <arg value="--substitute" />
         <arg value="&quot;%BEGINCODE%=&lt;pre class='prettyprint lang-java'&gt;&quot;" />
         <arg value="--substitute" />
         <arg value="%ENDCODE%=&lt;/pre&gt;" />
         <arg value="--regex" />
         <arg value="&quot;\b(issue)(\s*[#]?|-){0,1}(\d+)\b!!!&lt;a href='http://code.google.com/p/gitblit/issues/detail?id=$3'&gt;issue $3&lt;/a&gt;&quot;" />
      </java>
   </target>
      
@@ -465,7 +527,7 @@
          projectname="gitblit" 
          filename="${distribution.zipfile}" 
          targetfilename="gitblit-${gb.version}.zip"
          summary="Standalone, integrated Gitblit server v${gb.version}"
          summary="Gitblit GO v${gb.version} (standalone, integrated Gitblit server)"
          labels="Featured, Type-Package, OpSys-All" />
         
      <!-- Upload WAR file -->
@@ -475,7 +537,7 @@
           projectname="gitblit" 
           filename="${distribution.warfile}" 
           targetfilename="gitblit-${gb.version}.war"
           summary="Gitblit WAR v${gb.version} for your servlet container"
           summary="Gitblit WAR v${gb.version} (standard WAR webapp for servlet containers)"
           labels="Featured, Type-Package, OpSys-All" />
   </target>