Paul Martin
2016-02-24 e8b565ab9d15cbcfae26f6edb59b3dea0652ddb1
build.xml
@@ -8,7 +8,7 @@
      documentation @ http://gitblit.github.io/moxie
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   -->
   <property name="moxie.version" value="0.9.1" />
   <property name="moxie.version" value="0.9.4" />
   <property name="moxie.url" value="http://gitblit.github.io/moxie/maven" />
   <property name="moxie.jar" value="moxie-toolkit-${moxie.version}.jar" />
   <property name="moxie.dir" value="${user.home}/.moxie" />
@@ -41,18 +41,18 @@
      <mx:init verbose="no" mxroot="${moxie.dir}" />
            
      <!-- Set Ant project properties -->
      <property name="distribution.zipfile" value="gitblit-${project.version}.zip" />
      <property name="distribution.tgzfile" value="gitblit-${project.version}.tar.gz" />
      <property name="distribution.warfile" value="gitblit-${project.version}.war" />
      <property name="release.name" value="gitblit-${project.version}"/>
      <property name="distribution.zipfile" value="${release.name}.zip" />
      <property name="distribution.tgzfile" value="${release.name}.tar.gz" />
      <property name="distribution.warfile" value="${release.name}.war" />
      <property name="fedclient.zipfile" value="fedclient-${project.version}.zip" />
      <property name="manager.zipfile" value="manager-${project.version}.zip" />
      <property name="authority.zipfile" value="authority-${project.version}.zip" />
      <property name="gbapi.zipfile" value="gbapi-${project.version}.zip" />
      <property name="express.zipfile" value="express-${project.version}.zip" />
      <property name="maven.directory" value="${basedir}/../gitblit-maven" />
      <!-- Download links -->
      <property name="gc.url" value="http://dl.bintray.com/jamesmoger/generic/" />
      <property name="gc.url" value="http://dl.bintray.com/gitblit/releases/" />
   </target>
   
@@ -82,10 +82,9 @@
         <fileset dir="${project.distrib.dir}/data" />
      </copy>
      
      <!-- copy gitblit.properties to the source directory.
           this file is only used for parsing setting descriptions. -->
      <copy tofile="${project.src.dir}/reference.properties" overwrite="true"
         file="${project.distrib.dir}/data/gitblit.properties" />
      <!-- copy defaults.properties to the source directory -->
      <copy tofile="${project.src.dir}/defaults.properties" overwrite="true"
         file="${project.distrib.dir}/data/defaults.properties" />
      <!-- copy clientapps.json to the source directory.
           this file is only used if a local file is not provided. -->
@@ -102,8 +101,8 @@
   -->
   <target name="compile" depends="setup" description="compiles Gitblit from source">
      
      <!-- Generate the Keys class from the properties file -->
      <mx:keys propertiesfile="${project.distrib.dir}/data/gitblit.properties"
      <!-- Generate the Keys class from the defaults.properties file -->
      <mx:keys propertiesfile="${project.distrib.dir}/data/defaults.properties"
             outputclass="com.gitblit.Keys"
             todir="${project.src.dir}" />
@@ -171,49 +170,64 @@
      
      <echo>Building Gitblit GO ${project.version}</echo>
      <local name="go.dir" />
      <property name="go.dir" value="${project.outputDirectory}/go" />
      <local name="go.dir"/>
      <property name="go.dir" value="${project.outputDirectory}/go"/>
      <delete dir="${go.dir}" />
      <local name="go.release.dir" />
      <property name="go.release.dir" value="${go.dir}/${release.name}" />
      <prepareDataDirectory toDir="${go.dir}/data" />
      <local name="webinf" />
      <property name="webinf" value="${project.compileOutputDirectory}/WEB-INF" />
      <prepareDataDirectory toDir="${go.release.dir}/data" />
      <!-- Copy the web.xml from the prototype web.xml -->
      <copy todir="${webinf}" overwrite="true">
         <fileset file="${project.src.dir}/WEB-INF/web.xml" />
         <filterset>
            <filter token="gb.version" value="${project.version}" />
         </filterset>
      </copy>
      
      <!-- Build jar -->
      <mx:jar destfile="${go.dir}/gitblit.jar" includeresources="true">
      <mx:jar destfile="${go.release.dir}/gitblit.jar" includeresources="true">
         <mainclass name="com.gitblit.GitBlitServer" />
         <launcher paths="ext" />
      </mx:jar>
      <!-- Generate the docs for the GO build -->
      <generateDocs toDir="${go.dir}/docs" />
      <generateDocs toDir="${go.release.dir}/docs" />
      <!-- Create GO Windows Zip deployment -->
      <mx:zip basedir="${go.dir}">
         <!-- LICENSE and NOTICE -->
         <fileset dir="${basedir}" >
         <zipfileset dir="${basedir}" prefix="${release.name}">
            <include name="LICENSE" />
            <include name="NOTICE" />
         </fileset>
         </zipfileset>
         <!-- Windows distrib files -->
         <zipfileset dir="${project.distrib.dir}/win" />
         <zipfileset dir="${project.distrib.dir}/win" prefix="${release.name}"/>
         <!-- Gitblit Authority data -->
         <zipfileset dir="${project.distrib.dir}/data/certs" prefix="data/certs" />
         <zipfileset dir="${project.distrib.dir}/data/certs" prefix="${release.name}/data/certs" />
         <!-- include all dependencies -->
         <dependencies prefix="ext" />
         <dependencies prefix="${release.name}/ext" />
      </mx:zip>
      <!-- Create GO Linux/OSX tar.gz deployment -->
      <mx:tar basedir="${go.dir}" longfile="gnu" compression="gzip">
         <!-- LICENSE and NOTICE -->
         <fileset dir="${basedir}" >
         <zipfileset dir="${basedir}" prefix="${release.name}">
            <include name="LICENSE" />
            <include name="NOTICE" />
         </fileset>
         </zipfileset>
         <!-- Linux/OSX distrib files -->
         <tarfileset dir="${project.distrib.dir}/linux" filemode="755" />
         <tarfileset dir="${project.distrib.dir}/linux" filemode="755" prefix="${release.name}"/>
         <!-- Gitblit Authority data -->
         <zipfileset dir="${project.distrib.dir}/data/certs" prefix="data/certs" />
         <zipfileset dir="${project.distrib.dir}/data/certs" prefix="${release.name}/data/certs" />
         <!-- include all dependencies -->
         <dependencies prefix="ext" />
         <dependencies prefix="${release.name}/ext" />
      </mx:tar>      
   </target>
@@ -247,7 +261,7 @@
      </mx:webxml>
      <!-- Gitblit jar -->
      <mx:jar destfile="${webinf}/lib/gitblit.jar" includeresources="false" />
      <mx:jar destfile="${webinf}/lib/gitblit-${project.version}.jar" includeresources="false" />
      <!-- Build the WAR file -->
      <mx:zip basedir="${war.dir}" destfile="${project.targetDirectory}/${distribution.warfile}" compress="true" >
@@ -280,7 +294,7 @@
          classes, exclude any classes in classpath jars -->
      <mx:genjar tag="" includeresources="false" excludeClasspathJars="true"
         destfile="${project.targetDirectory}/fedclient.jar"
         excludes="**/.class,**/*.java, **/Thumbs.db, **/*.mkd, com/gitblit/wicket/**">
         excludes="**/.class, **/*.java, **/Thumbs.db, **/*.mkd, **/*.md, **/*.css, com/gitblit/wicket/**">
         <mainclass name="com.gitblit.FederationClient" />
         <class name="com.gitblit.Keys" />
         <launcher paths="ext" />
@@ -311,61 +325,6 @@
   <!-- 
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      Build a Gitblit filesystem for deployment to RedHat OpenShift Express
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   -->
   <target name="buildExpress" depends="compile" description="Build exploded WAR file suitable for deployment to OpenShift Express">
      <echo>Building Gitblit Express for RedHat OpenShift ${project.version}</echo>
      <local name="express.dir" />
      <property name="express.dir" value="${project.outputDirectory}/express" />
      <delete dir="${express.dir}" />
      <!-- Create the OpenShift filesystem -->
      <local name="deployments.root" />
      <property name="deployments.root" value="${express.dir}/deployments/ROOT.war"/>
      <mkdir dir="${deployments.root}" />
      <touch file="${express.dir}/deployments/ROOT.war.dodeploy" />
      <local name="webinf" />
      <property name="webinf" value="${deployments.root}/WEB-INF" />
      <!-- Prepare the data directory -->
      <prepareDataDirectory toDir="${webinf}/data" />
      <!-- Build the Express web.xml from the prototype web.xml and gitblit.properties -->
      <!-- THIS FILE IS NOT OVERRIDDEN ONCE IT IS BUILT!!! -->
      <mx:webxml sourcefile="${project.src.dir}/WEB-INF/web.xml" destfile="${webinf}/web.xml"
         propertiesFile="${project.distrib.dir}/data/gitblit.properties"
         skip="server.*">
         <replace token="@gb.version@" value="${project.version}" />
      </mx:webxml>
      <!-- Gitblit classes -->
      <mx:jar destfile="${webinf}/lib/gitblit.jar" includeresources="false" />
      <!-- Build Express Zip file -->
      <mx:zip basedir="${express.dir}" destfile="${project.targetDirectory}/${express.zipfile}">
         <fileset dir="${basedir}">
            <include name="LICENSE" />
            <include name="NOTICE" />
         </fileset>
         <!-- README -->
         <zipfileset fullpath="README.gitblit" file="${project.siteSourceDirectory}/openshift.mkd" />
         <!-- resources -->
         <zipfileset prefix="deployments/ROOT.war" dir="${project.resources.dir}">
            <exclude name="thumbs.db" />
            <exclude name="*.mkd" />
         </zipfileset>
         <!-- include "war" tagged dependencies -->
         <dependencies prefix="deployments/ROOT.war/WEB-INF/lib" tag="war" />
      </mx:zip>
   </target>
   <!--
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      Build the stand-alone, Gitblit Manager
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   -->
@@ -375,7 +334,8 @@
      <!-- generate jar by traversing the class hierarchy of the specified
          classes, exclude any classes in classpath jars -->
      <mx:genjar tag="" includeResources="false" excludeClasspathJars="true"
         destfile="${project.targetDirectory}/manager.jar">
         destfile="${project.targetDirectory}/manager.jar"
         excludes="**/.class, **/*.java, **/Thumbs.db, **/*.mkd, **/*.md, **/*.css, com/gitblit/wicket/**">
         <resource file="${project.src.dir}/com/gitblit/client/splash.png" />
         <resource file="${project.resources.dir}/gitblt-favicon.png" />
         <resource file="${project.resources.dir}/gitweb-favicon.png" />
@@ -451,9 +411,10 @@
      <!-- Build API Library jar -->
      <mx:genjar tag="" includeResources="false" excludeClasspathJars="true"
         destfile="${project.targetDirectory}/gbapi-${project.version}.jar">
         destfile="${project.targetDirectory}/gbapi-${project.version}.jar"
         excludes="**/.class, **/*.java, **/Thumbs.db, **/*.mkd, **/*.md, **/*.css, com/gitblit/wicket/**">
         <mainclass name="com.gitblit.client.GitblitClient" />
         <class name="com.gitblit.Keys" />
         <class name="com.gitblit.client.GitblitClient" />
         <class name="com.gitblit.models.FederationModel" />
         <class name="com.gitblit.models.FederationProposal" />
         <class name="com.gitblit.models.FederationSet" />         
@@ -542,11 +503,6 @@
                  <page name="upgrade WAR" src="upgrade_war.mkd" />
               </menu>
               <divider />
               <menu name="Gitblit Express" pager="true" pagerPlacement="bottom" pagerLayout="justified">
                  <page name="setup Express" src="setup_express.mkd" />
                  <page name="upgrade Express" src="upgrade_express.mkd" />
               </menu>
               <divider />
               <menu name="Server Configuration" pager="true" pagerPlacement="bottom" pagerLayout="justified">
                  <page name="administration" src="administration.mkd" />
                  <page name="authentication" src="setup_authentication.mkd" />
@@ -557,6 +513,8 @@
                  <page name="bugtraq" src="setup_bugtraq.mkd" />
                  <page name="mirrors" src="setup_mirrors.mkd" />
                  <page name="scaling" src="setup_scaling.mkd" />
                  <page name="fail2ban" src="setup_fail2ban.mkd" />
                  <page name="filestore (Git LFS)" src="setup_filestore.mkd" />
                  <divider />
                  <page name="Gitblit as a viewer" src="setup_viewer.mkd" />
               </menu>
@@ -596,43 +554,43 @@
               <page name="release history" out="releases.html">
                  <template src="releasehistory.ftl" data="${releaselog}" />
               </page>
               <divider />
               <page name="roadmap" src="roadmap.mkd" />
            </menu>
            
            <menu name="downloads">
               <link name="Gitblit GO (Windows)" src="${gc.url}gitblit-${project.releaseVersion}.zip" />
               <link name="Gitblit GO (Linux/OSX)" src="${gc.url}gitblit-${project.releaseVersion}.tar.gz" />
               <link name="Gitblit WAR" src="${gc.url}gitblit-${project.releaseVersion}.war" />
               <link name="Gitblit Express" src="${gc.url}express-${project.releaseVersion}.zip" />
               <divider />
               <link name="Gitblit GO (Docker)" src="https://registry.hub.docker.com/u/jmoger/gitblit/" />
               <divider />
               <link name="Plugins Registry" src="http://plugins.gitblit.com" />
               <divider />
               <link name="Gitblit Manager" src="${gc.url}manager-${project.releaseVersion}.zip" />
               <link name="Federation Client" src="${gc.url}fedclient-${project.releaseVersion}.zip" />
               <divider />
               <link name="API Library" src="${gc.url}gbapi-${project.releaseVersion}.zip" />
               <divider />
               <link name="Bintray (1.4.0+)" src="https://bintray.com/jamesmoger/generic/Gitblit" />
               <link name="Bintray (1.4.0+)" src="https://bintray.com/gitblit/releases/gitblit" />
               <link name="GoogleCode (pre-1.4.0)" src="https://code.google.com/p/gitblit/downloads/list?can=1" />
               <divider />
               <link name="Maven Repository" src="${project.mavenUrl}" />
            </menu>
            
            <menu name="links">
               <link name="Gitblit Demo (RELEASE)" src="https://demo-gitblit.rhcloud.com" />
               <link name="Gitblit Next (SNAPSHOT)" src="https://next-gitblit.rhcloud.com" />
               <link name="dev.gitblit.com (self-hosted)" src="https://dev.gitblit.com" />
               <divider />
               <link name="Gitblit (Self-Hosted)" src="https://dev.gitblit.com" />
               <divider />
               <link name="Plugin Registry" src="http://plugins.gitblit.com" />
               <link name="Plugins Registry" src="http://plugins.gitblit.com" />
               <divider />
               <link name="Github" src="${project.scmUrl}" />
               <link name="Issues" src="${project.issuesUrl}" />
               <link name="Discussion" src="${project.forumUrl}" />
               <link name="Google+" src="${project.socialNetworkUrl}" />
               <link name="Twitter" src="https://twitter.com/gitblit" />
               <link name="Ohloh" src="http://www.ohloh.net/p/gitblit" />
                    <divider />
               <link name="Gitblit Tickets screencast" src="https://vimeo.com/86164723" />
               <link name="Gitblit SSH and Plugin Management asciicast" src="https://asciinema.org/a/9342" />
                    <link name="GitMinutes #29: James Moger on Gitblit" src="http://episodes.gitminutes.com/2014/05/gitminutes-29-james-moger-on-gitblit.html" />
               <divider />
               <link name="+JamesMoger" src="https://plus.google.com/+JamesMoger" />
               <link name="@JamesMoger" src="https://twitter.com/JamesMoger" />
            </menu>
            <divider />
@@ -640,7 +598,7 @@
         
         <replace token="%GCURL%" value="${gc.url}" />
         
         <properties token="%PROPERTIES%" file="${project.distrib.dir}/data/gitblit.properties" />
         <properties token="%PROPERTIES%" file="${project.distrib.dir}/data/defaults.properties" />
         
         <regex searchPattern="\b(issue)(\s*[#]?|-){0,1}(\d+)\b" replacePattern="&lt;a href='http://code.google.com/p/gitblit/issues/detail?id=$3'&gt;issue $3&lt;/a&gt;" />
         <regex searchPattern="\b(pr|pull request)(\s*[#]?|-){0,1}(\d+)\b" replacePattern="&lt;a href='https://github.com/gitblit/gitblit/pull/$3'&gt;pull request #$3&lt;/a&gt;" />
@@ -707,7 +665,7 @@
      Build all binaries and site
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   -->
   <target name="buildAll" depends="buildGO,buildWAR,buildExpress,buildFederationClient,buildManager,buildApiLibrary,buildSite" />
   <target name="buildAll" depends="buildGO,buildWAR,buildFederationClient,buildManager,buildApiLibrary,buildSite" />
   
   <!--
@@ -759,11 +717,6 @@
      <bintrayUpload
         source="${project.targetDirectory}/${gbapi.zipfile}" 
         target="gbapi-${project.version}.zip" />
      <!-- Upload Gitblit Express for RedHat OpenShift -->
      <bintrayUpload
         source="${project.targetDirectory}/${express.zipfile}"
         target="express-${project.version}.zip" />
   </target>
@@ -832,16 +785,38 @@
         </filterset>
      </copy>
      <chmod file="${recipe}" perm="ugo+rx" />
   </target>
   <!--
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      Prepare for the next point release development cycle.
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   -->
   <target name="nextPointReleaseCycle" depends="prepare" description="prepare for the next point release development cycle">
      <!-- next cycle -->
      <mx:version stage="snapshot" incrementNumber="incremental" dryrun="${dryrun}" />
      <mx:commit showtitle="no">
          <message>Reset build identifiers for next development cycle</message>
          <message>Reset build identifiers for next point release cycle</message>
      </mx:commit>      
   </target>
      
   <!--
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      Prepare for the next minor release development cycle.
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   -->
   <target name="nextMinorReleaseCycle" depends="prepare" description="prepare for the next minor release development cycle">
      <!-- next cycle -->
      <mx:version stage="snapshot" incrementNumber="minor" dryrun="${dryrun}" />
      <mx:commit showtitle="no">
          <message>Reset build identifiers for next minor release cycle</message>
      </mx:commit>
   </target>
  <!--
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      Build Gitblit Docs
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -864,11 +839,6 @@
                  <menu name="Gitblit WAR" pager="true" pagerPlacement="bottom" pagerLayout="justified">
                     <page name="setup WAR" src="setup_war.mkd" />
                     <page name="upgrade WAR" src="upgrade_war.mkd" />
                  </menu>
                  <divider />
                  <menu name="Gitblit Express" pager="true" pagerPlacement="bottom" pagerLayout="justified">
                     <page name="setup Express" src="setup_express.mkd" />
                     <page name="upgrade Express" src="upgrade_express.mkd" />
                  </menu>
                  <divider />
                  <menu name="Server Configuration" pager="true" pagerPlacement="bottom" pagerLayout="justified">
@@ -917,20 +887,18 @@
                  <page name="older releases" src="releasehistory.mkd" />
               </menu>
               <menu name="links">
                  <link name="Gitblit Demo (RELEASE)" src="https://demo-gitblit.rhcloud.com" />
                  <link name="Gitbilt Next (SNAPSHOT)" src="https://next-gitblit.rhcloud.com" />
                  <link name="dev.gitblit.com (self-hosted)" src="https://dev.gitblit.com" />
                  <divider />
                  <link name="Plugin Registry" src="http://plugins.gitblit.com" />
                  <link name="Plugins Registry" src="http://plugins.gitblit.com" />
                  <divider />
                  <link name="Github" src="${project.scmUrl}" />
                  <link name="Issues" src="${project.issuesUrl}" />
                  <link name="Discussion" src="${project.forumUrl}" />
                  <link name="Google+" src="${project.socialNetworkUrl}" />
                  <link name="Ohloh" src="http://www.ohloh.net/p/gitblit" />
               </menu>
            </structure>
            
            <properties token="%PROPERTIES%" file="${project.distrib.dir}/data/gitblit.properties" />
            <properties token="%PROPERTIES%" file="${project.distrib.dir}/data/defaults.properties" />
            
            <regex searchPattern="\b(issue)(\s*[#]?|-){0,1}(\d+)\b" replacePattern="&lt;a href='http://code.google.com/p/gitblit/issues/detail?id=$3'&gt;issue $3&lt;/a&gt;" />
            <regex searchPattern="\b(pr|pull request)(\s*[#]?|-){0,1}(\d+)\b" replacePattern="&lt;a href='https://github.com/gitblit/gitblit/pull/$3'&gt;pull request #$3&lt;/a&gt;" />
@@ -970,6 +938,7 @@
            <fileset dir="${project.distrib.dir}/data">
               <include name="users.conf" />
               <include name="projects.conf" />
               <include name="defaults.properties" />
               <include name="gitblit.properties" />               
            </fileset>
         </copy>
@@ -995,6 +964,12 @@
               <include name="subgit.groovy" />
            </fileset>
         </copy>
         <mkdir dir="@{toDir}/gitignore" />
         <copy todir="@{toDir}/gitignore">
            <fileset dir="${project.distrib.dir}/data/gitignore">
               <include name="*.gitignore" />
            </fileset>
         </copy>
      </sequential>
   </macrodef>
   
@@ -1009,7 +984,7 @@
      <sequential>
         <echo>uploading @{source} to Bintray</echo>
         <exec executable="curl">
            <arg line="--silent --show-error -T @{source} -u${bintray.username}:${bintray.apikey} https://api.bintray.com/content/${bintray.username}/generic/${project.name}/${project.version}/@{target}"></arg>
            <arg line="--silent --show-error -T @{source} -u${bintray.username}:${bintray.apikey} https://api.bintray.com/content/gitblit/releases/gitblit/${project.version}/@{target}"></arg>
         </exec>
      </sequential>
   </macrodef>
@@ -1021,13 +996,23 @@
   -->
   <target name="installMaven" depends="compile" description="Install Gitblit JAR as Maven module">
      <local name="project.jar" />
      <property name="project.jar" value="${project.outputDirectory}/gitblit.jar" />
      <property name="project.jar" value="${project.outputDirectory}/${project.artifactId}.jar" />
      <property name="resourceFolderPrefix" value="" />
      <mx:jar destfile="${project.jar}" includeresources="true" resourceFolderPrefix="${resourceFolderPrefix}" />
      <mx:jar destfile="${project.jar}" packageSources="true" includeresources="true" resourceFolderPrefix="${resourceFolderPrefix}" />
      <!-- Install Binary jar -->
      <exec executable="mvn">
         <arg value="install:install-file" />
         <arg value="-Dfile=${project.jar}" />
         <arg value="-DpomFile=${basedir}/pom.xml" />
         <arg value="-DcreateChecksum=true" />
      </exec>
      <!-- Install Sources  jar -->
      <exec executable="mvn">
         <arg value="install:install-file" />
         <arg value="-Dfile=${project.outputDirectory}/${project.artifactId}-sources.jar" />
         <arg value="-Dclassifier=sources" />
         <arg value="-DpomFile=${basedir}/pom.xml" />
         <arg value="-DcreateChecksum=true" />
      </exec>
@@ -1045,7 +1030,7 @@
   <target name="uploadMaven" depends="compile" description="Upload Gitblit JAR to remote Maven repository">
      <local name="project.jar" />
      <property name="project.jar" value="${project.outputDirectory}/gitblit.jar" />
      <mx:jar destfile="${project.jar}" includeresources="true" />
      <mx:jar destfile="${project.jar}" packageSources="true" includeresources="true" />
      <exec executable="mvn">
         <arg value="deploy:deploy-file" />
@@ -1066,9 +1051,26 @@
      <local name="project.jar" />
      <property name="project.jar" value="${project.targetDirectory}/${project.artifactId}-${project.version}.jar" />
      <property name="resourceFolderPrefix" value="" />
      <mx:jar destfile="${project.jar}" includeresources="true" resourceFolderPrefix="${resourceFolderPrefix}" />
      <mx:jar destfile="${project.jar}" packageSources="true" includeresources="true" resourceFolderPrefix="${resourceFolderPrefix}" />
      <mx:install />
   </target>
   
   <!--
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      Build Gitblit UI via npm
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   -->
   <target name="buildUI" description="Build Gitblit UI via npm">
      <exec executable="npm" dir="src/main/js/" failonerror="true" vmlauncher="false" searchpath="true" >
         <arg value="install" />
      </exec>
      <exec executable="npm" dir="src/main/js/" failonerror="true" vmlauncher="false" searchpath="true" >
         <arg value="run" />
         <arg value="build" />
      </exec>
   </target>
</project>