James Moger
2012-07-11 d00a0ca46fcde3e3e580afea6a548b9c12aeac25
build.xml
@@ -117,7 +117,7 @@
      <delete dir="${project.build.dir}" />
      <mkdir dir="${project.build.dir}" />
      <javac debug="true" srcdir="${basedir}/src" destdir="${project.build.dir}">
      <javac debug="true" srcdir="${basedir}/src" destdir="${project.build.dir}" includeantruntime="false">
         <include name="com/gitblit/build/Build.java" />         
         <include name="com/gitblit/Constants.java" />
         <include name="com/gitblit/utils/StringUtils.java" />         
@@ -131,7 +131,7 @@
         </fileset>
         <pathelement path="${project.build.dir}" />            
      </path>
      <javac debug="true" destdir="${project.build.dir}" failonerror="false">
      <javac debug="true" destdir="${project.build.dir}" failonerror="false" includeantruntime="false">
         <src path="${basedir}/src" />
         <classpath refid="master-classpath" />
      </javac>
@@ -182,9 +182,11 @@
      </jar>
      <!-- Gitblit library dependencies -->
      <mkdir dir="${project.deploy.dir}/lib"/>
      <copy todir="${project.deploy.dir}/lib">
      <mkdir dir="${project.deploy.dir}/ext"/>
      <copy todir="${project.deploy.dir}/ext">
         <fileset dir="${basedir}/ext">
            <exclude name="junit*.jar" />
            <exclude name="commons-net*.jar" />
            <exclude name="*-sources.jar" />
            <exclude name="*-javadoc.jar" />
         </fileset>
@@ -195,11 +197,14 @@
         <param name="docs.output.dir" value="${project.deploy.dir}/docs" />
      </antcall>
      
      <!-- Copy the sample Groovy hook scripts -->
      <!-- Copy the supported Groovy hook scripts -->
      <mkdir dir="${project.deploy.dir}/groovy" />
      <copy todir="${project.deploy.dir}/groovy">
         <fileset dir="${basedir}/groovy">
            <include name="**/*" />
            <include name="sendmail.groovy" />
            <include name="jenkins.groovy" />
            <include name="protect-refs.groovy" />
            <include name="localclone.groovy" />
         </fileset>
      </copy>
   
@@ -224,9 +229,8 @@
         <copy todir="${docs.output.dir}">
            <!-- Copy selected Gitblit resources -->
            <fileset dir="${project.resources.dir}">
               <include name="bootstrap.140.css" />
               <include name="bootstrap.gb.css" />
               <include name="markdown.css" />
               <include name="bootstrap/**/*" />
               <include name="gitblit.css" />
               <include name="gitblt_25_white.png" />
               <include name="gitblt-favicon.png" />
               <include name="lock_go_16x16.png" />
@@ -243,6 +247,7 @@
            <!-- Copy Doc images -->
            <fileset dir="${basedir}/docs">
               <include name="*.png" />
               <include name="*.gif" />
            </fileset>
         </copy>
@@ -361,11 +366,14 @@
         <param name="docs.output.dir" value="${project.war.dir}/WEB-INF/docs" />
      </antcall>
      <!-- Copy the sample Groovy hook scripts -->
      <!-- Copy the supported Groovy hook scripts -->
      <mkdir dir="${project.war.dir}/WEB-INF/groovy" />
      <copy todir="${project.war.dir}/WEB-INF/groovy">
         <fileset dir="${basedir}/groovy">
            <include name="**/*" />
            <include name="sendmail.groovy" />
            <include name="jenkins.groovy" />
            <include name="protect-refs.groovy" />
            <include name="localclone.groovy" />
         </fileset>
      </copy>
@@ -400,6 +408,7 @@
            <exclude name="jetty*.jar" />
            <exclude name="junit*.jar" />
            <exclude name="servlet*.jar" />
            <exclude name="javax.servlet*.jar" />
         </fileset>
      </copy>
@@ -411,6 +420,7 @@
            <exclude name="com/gitblit/tests/" />
            <exclude name="com/gitblit/build/**" />
            <exclude name="com/gitblit/client/**" />
            <exclude name="com/gitblit/AddIndexedBranch*.class" />
            <exclude name="com/gitblit/GitBlitServer*.class" />
            <exclude name="com/gitblit/Launcher*.class" />
            <exclude name="com/gitblit/MakeCertificate*.class" />
@@ -494,6 +504,16 @@
      <copy tofile="${deployments.root}/WEB-INF/reference.properties" 
         file="${basedir}/distrib/gitblit.properties"/>
      <!-- Copy the supported Groovy hook scripts -->
      <mkdir dir="${deployments.root}/WEB-INF/groovy" />
      <copy todir="${deployments.root}/WEB-INF/groovy">
         <fileset dir="${basedir}/groovy">
            <include name="sendmail.groovy" />
            <include name="jenkins.groovy" />
            <include name="protect-refs.groovy" />
         </fileset>
      </copy>
      <!-- Build the WAR web.xml from the prototype web.xml and gitblit.properties -->
      <!-- THIS FILE IS NOT OVERRIDDEN ONCE IT IS BUILT!!! -->
      <java classpath="${project.build.dir}" classname="com.gitblit.build.BuildWebXml">
@@ -526,12 +546,12 @@
            <exclude name="jetty*.jar" />
            <exclude name="junit*.jar" />
            <exclude name="servlet*.jar" />
            <exclude name="javax.servlet*.jar" />
         </fileset>
      </copy>
      <!-- Gitblit classes -->
      <mkdir dir="${deployments.root}/WEB-INF/classes"/>
      <copy todir="${deployments.root}/WEB-INF/classes">
      <jar destfile="${deployments.root}/WEB-INF/lib/gitblit-${gb.version}.jar">
         <fileset dir="${project.build.dir}">
            <exclude name="WEB-INF/" />
            <exclude name="com/gitblit/tests/" />
@@ -541,7 +561,7 @@
            <exclude name="com/gitblit/Launcher*.class" />
            <exclude name="com/gitblit/MakeCertificate*.class" />
         </fileset>
      </copy>
      </jar>
      <!-- Build Express Zip file -->
      <zip destfile="${express.zipfile}">
@@ -563,7 +583,9 @@
         <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/git-orange-16x16.png" />
         <resource file="${basedir}/resources/user_16x16.png" />
         <resource file="${basedir}/resources/users_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" />
@@ -580,6 +602,7 @@
         <resource file="${basedir}/resources/commit_merge_16x16.png" />
         <resource file="${basedir}/resources/blank.png" />
         <resource file="${basedir}/src/com/gitblit/wicket/GitBlitWebApp.properties" />
         <resource file="${basedir}/src/com/gitblit/wicket/GitBlitWebApp_ja.properties" />
         <class name="com.gitblit.client.GitblitManagerLauncher" />
         <classfilter>
@@ -695,9 +718,8 @@
      <copy todir="${project.site.dir}">
         <!-- Copy selected Gitblit resources -->
         <fileset dir="${project.resources.dir}">
            <include name="bootstrap.140.css" />
            <include name="bootstrap.gb.css" />
            <include name="markdown.css" />
            <include name="bootstrap/**/*" />
            <include name="gitblit.css" />
            <include name="gitblt_25_white.png" />
            <include name="gitblt-favicon.png" />
            <include name="lock_go_16x16.png" />
@@ -714,6 +736,7 @@
         <!-- Copy Doc images -->
         <fileset dir="${basedir}/docs">
            <include name="*.png" />
            <include name="*.gif" />
            <include name="*.js" />
         </fileset>
      </copy>
@@ -842,13 +865,33 @@
      <delete dir="${project.express.dir}" />
   </target>
   <!--
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      Update the gh-pages branch with the current site
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   -->
   <target name="updateGhPages" depends="buildSite">
      <!-- Build gh-pages branch -->
      <java classpath="${project.build.dir}" classname="com.gitblit.build.BuildGhPages">
         <classpath refid="master-classpath" />
         <arg value="--sourceFolder" />
         <arg value="${basedir}/site" />
         <arg value="--repository" />
         <arg value="${basedir}" />
         <arg value="--obliterate" />
      </java>
   </target>
   <!-- 
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      Publish binaries to Google Code
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   -->
   <target name="publishBinaries" depends="buildGO,buildWAR,buildExpress,buildFederationClient,buildManager" description="Publish the Gitblit binaries to Google Code">
   <target name="publishBinaries" depends="buildGO,buildWAR,buildExpress,buildFederationClient,buildManager,buildApiLibrary" description="Publish the Gitblit binaries to Google Code">
      <echo>Uploading Gitblit ${gb.version} binaries</echo>
@@ -921,7 +964,7 @@
      You must add ext/commons-net-1.4.0.jar to your ANT classpath.
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   -->
   <target name="publishSite" depends="buildSite" description="Publish the Gitblit site to a webserver (requires ext/commons-net-1.4.0.jar)" >
   <target name="publishSite" depends="buildSite,updateGhPages" description="Publish the Gitblit site to a webserver (requires ext/commons-net-1.4.0.jar)" >
      <echo>Uploading Gitblit ${gb.version} website</echo>
@@ -947,4 +990,4 @@
      <delete dir="${project.war.dir}" />
      <delete dir="${project.deploy.dir}" />
   </target>
</project>
</project>