From aefb59ef98522ef8a10ab64b25840f11e622e1c7 Mon Sep 17 00:00:00 2001 From: Stardrad Yin <yin8086@gmail.com> Date: Wed, 23 Jan 2013 03:16:08 -0500 Subject: [PATCH] Modify Chinese translation in properties file, and add new translation that synchronizes with commit synchronize with commit e4e6829 --- build.xml | 730 ++++++++++++++++++++++++++++++++++++++++++++++--------- 1 files changed, 601 insertions(+), 129 deletions(-) diff --git a/build.xml b/build.xml index 8ba2b5a..f60dcef 100644 --- a/build.xml +++ b/build.xml @@ -12,10 +12,15 @@ <property name="project.jar" value="gitblit.jar" /> <property name="project.mainclass" value="com.gitblit.Launcher" /> <property name="project.build.dir" value="${basedir}/build" /> - <property name="project.deploy.dir" value="${basedir}/deploy" /> + <property name="project.deploy.dir" value="${basedir}/deploy" /> <property name="project.war.dir" value="${basedir}/war" /> - <property name="project.site.dir" value="${basedir}/site" /> + <property name="project.jar.dir" value="${basedir}/jar" /> + <property name="project.site.dir" value="${basedir}/target/site" /> + <property name="project.target.dir" value="${basedir}/target" /> <property name="project.resources.dir" value="${basedir}/resources" /> + <property name="project.express.dir" value="${basedir}/express" /> + <property name="project.maven.repo.url" value="enter here your Maven repo URL" /> + <property name="project.maven.repo.id" value="gitblit.maven.repo" /> <available property="hasBuildProps" file="${basedir}/build.properties"/> <!-- @@ -84,9 +89,14 @@ </loadfile> <property name="distribution.zipfile" value="gitblit-${gb.version}.zip" /> <property name="distribution.warfile" value="gitblit-${gb.version}.war" /> + <property name="distribution.jarfile" value="gitblit-${gb.version}.jar" /> + <property name="distribution.pomfile" value="${basedir}/pom.xml" /> <property name="fedclient.zipfile" value="fedclient-${gb.version}.zip" /> <property name="manager.zipfile" value="manager-${gb.version}.zip" /> + <property name="authority.zipfile" value="authority-${gb.version}.zip" /> <property name="gbapi.zipfile" value="gbapi-${gb.version}.zip" /> + <property name="express.zipfile" value="express-${gb.version}.zip" /> + <property name="distribution.pomfileTmplt" value="tmplt.pom.xml" /> </target> @@ -97,13 +107,66 @@ --> <target name="compile" depends="buildinfo" description="Retrieves dependencies and compiles Gitblit from source"> - <!-- copy required distribution files to project folder --> - <copy todir="${basedir}" overwrite="false"> + <!-- cleanup old builds --> + <delete dir="${project.target.dir}" /> + <mkdir dir="${project.target.dir}" /> + + <!-- cleanup old builds --> + <delete> + <fileset dir="${basedir}"> + <include name="*.zip" /> + <include name="*.war" /> + <include name="*.jar" /> + </fileset> + </delete> + + <!-- copy required distribution files to data folder --> + <mkdir dir="${basedir}/data" /> + <copy todir="${basedir}/data" overwrite="false"> <fileset dir="${basedir}/distrib"> <include name="gitblit.properties" /> - <include name="users.properties" /> + <include name="users.conf" /> + <include name="projects.conf" /> </fileset> </copy> + + <!-- copy required distribution files to project folder --> + <mkdir dir="${basedir}/data/certs" /> + <copy todir="${basedir}/data/certs" overwrite="false"> + <fileset dir="${basedir}/distrib"> + <include name="authority.conf" /> + <include name="*.tmpl" /> + </fileset> + </copy> + + <!-- copy required distribution files to project folder --> + <mkdir dir="${basedir}/data/groovy" /> + <copy todir="${basedir}/data/groovy" overwrite="false"> + <fileset dir="${basedir}/distrib/groovy" /> + </copy> + + <!-- upgrade existing workspace to data folder --> + <move todir="${basedir}/data" overwrite="true" failonerror="false"> + <fileset dir="${basedir}"> + <include name="users.conf" /> + <include name="projects.conf" /> + <include name="gitblit.properties" /> + <include name="serverKeyStore.jks" /> + <include name="serverTrustStore.jks" /> + </fileset> + </move> + <move todir="${basedir}/data/certs" overwrite="true" failonerror="false"> + <fileset dir="${basedir}/certs" /> + </move> + <move todir="${basedir}/data/git" overwrite="true" failonerror="false"> + <fileset dir="${basedir}/git" /> + </move> + <move todir="${basedir}/data/proposals" overwrite="true" failonerror="false"> + <fileset dir="${basedir}/proposals" /> + </move> + <delete dir="${basedir}/javadoc" failonerror="false" /> + <delete dir="${basedir}/site" failonerror="false" /> + <delete dir="${basedir}/temp" failonerror="false" /> <!-- copy gitblit.properties to the WEB-INF folder. this file is only used for parsing setting descriptions. --> @@ -115,12 +178,21 @@ <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" /> </javac> - <java classpath="${project.build.dir}" classname="com.gitblit.build.Build" /> + + <java classpath="${project.build.dir}" classname="com.gitblit.build.Build" failonerror="true"> + <syspropertyset id="proxy.properties"> + <propertyref prefix="java.net.useSystemProxies"/> + <propertyref prefix="http."/> + <propertyref prefix="https."/> + <propertyref prefix="ftp."/> + <propertyref prefix="socksProxy"/> + </syspropertyset> + </java> <!-- Compile Project --> <path id="master-classpath"> @@ -129,7 +201,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> @@ -144,7 +216,7 @@ Build Gitblit GO ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --> - <target name="buildGO" depends="compile" description="Build Gitblit GO distribution"> + <target name="buildGO" depends="compile,buildAuthority" description="Build Gitblit GO distribution"> <echo>Building Gitblit GO ${gb.version}</echo> @@ -157,18 +229,58 @@ <fileset dir="${basedir}/distrib"> <include name="**/*" /> <exclude name="federation.properties" /> + <exclude name="openshift.mkd" /> + <exclude name="authority.conf" /> + <exclude name="users.conf" /> + <exclude name="projects.conf" /> + <exclude name="gitblit.properties" /> + <exclude name="*.tmpl" /> + <exclude name="groovy/**" /> </fileset> <fileset dir="${basedir}"> <include name="LICENSE" /> <include name="NOTICE" /> + </fileset> + </copy> + + <!-- Copy the supported Groovy hook scripts --> + <mkdir dir="${project.deploy.dir}/data/groovy" /> + <copy todir="${project.deploy.dir}/data/groovy"> + <fileset dir="${basedir}/distrib/groovy"> + <include name="sendmail.groovy" /> + <include name="sendmail-html.groovy" /> + <include name="jenkins.groovy" /> + <include name="protect-refs.groovy" /> </fileset> </copy> - + + <copy tofile="${project.deploy.dir}/authority.jar" file="${project.target.dir}/authority-${gb.version}.jar" /> + + <!-- Prepare the data folder --> + <mkdir dir="${project.deploy.dir}/data"/> + <copy todir="${project.deploy.dir}/data"> + <fileset dir="${basedir}/distrib"> + <include name="users.conf" /> + <include name="projects.conf" /> + <include name="gitblit.properties" /> + </fileset> + </copy> + + <!-- Certificate templates --> + <mkdir dir="${project.deploy.dir}/data/certs"/> + <mkdir dir="${project.deploy.dir}/data/certs"/> + <copy todir="${project.deploy.dir}/data/certs"> + <fileset dir="${basedir}/distrib"> + <include name="*.tmpl" /> + <include name="authority.conf" /> + </fileset> + </copy> + <!-- Build jar --> <jar jarfile="${project.deploy.dir}/${project.jar}"> <fileset dir="${project.build.dir}"> <include name="**/*" /> - <exclude name="com/gitblit/client/**" /> + <exclude name="com/gitblit/client/**" /> </fileset> <fileset dir="${project.resources.dir}"> <exclude name="thumbs.db" /> @@ -178,13 +290,24 @@ </manifest> </jar> + <!-- Gitblit library dependencies --> + <mkdir dir="${project.deploy.dir}/ext"/> + <copy todir="${project.deploy.dir}/ext"> + <fileset dir="${basedir}/ext"> + <exclude name="src/**" /> + <exclude name="junit*.jar" /> + <exclude name="hamcrest*.jar" /> + <exclude name="commons-net*.jar" /> + </fileset> + </copy> + <!-- Build the docs for the deploy --> <antcall target="buildDocs" inheritall="true" inheritrefs="true"> <param name="docs.output.dir" value="${project.deploy.dir}/docs" /> </antcall> <!-- Create Zip deployment --> - <zip destfile="${distribution.zipfile}"> + <zip destfile="${project.target.dir}/${distribution.zipfile}"> <fileset dir="${project.deploy.dir}"> <include name="**/*" /> </fileset> @@ -204,9 +327,8 @@ <copy todir="${docs.output.dir}"> <!-- Copy selected Gitblit resources --> <fileset dir="${project.resources.dir}"> - <include name="bootstrap.130.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" /> @@ -223,6 +345,7 @@ <!-- Copy Doc images --> <fileset dir="${basedir}/docs"> <include name="*.png" /> + <include name="*.gif" /> </fileset> </copy> @@ -280,6 +403,9 @@ <arg value="%API%=${gbapi.zipfile}" /> <arg value="--substitute" /> + <arg value="%EXPRESS%=${express.zipfile}" /> + + <arg value="--substitute" /> <arg value="%BUILDDATE%=${gb.versionDate}" /> <arg value="--substitute" /> @@ -313,13 +439,10 @@ <echo>Building Gitblit WAR ${gb.version}</echo> - <delete dir="${project.war.dir}" /> + <delete dir="${project.war.dir}" /> - <!-- Copy web.xml and users.properties to WEB-INF --> + <!-- Copy web.xml and users.conf to WEB-INF --> <copy todir="${project.war.dir}/WEB-INF"> - <fileset dir="${basedir}/distrib"> - <include name="users.properties" /> - </fileset> <fileset dir="${basedir}/src/WEB-INF"> <include name="web.xml" /> </fileset> @@ -337,8 +460,29 @@ <antcall target="buildDocs" inheritall="true" inheritrefs="true"> <param name="docs.output.dir" value="${project.war.dir}/WEB-INF/docs" /> </antcall> - - <!-- Build the WAR web.xml from the prototype web.xml and gitblit.properties --> + + <!-- Copy users.conf to WEB-INF/data --> + <mkdir dir="${project.war.dir}/WEB-INF/data" /> + <copy todir="${project.war.dir}/WEB-INF/data"> + <fileset dir="${basedir}/distrib"> + <include name="users.conf" /> + <include name="projects.conf" /> + <include name="gitblit.properties" /> + </fileset> + </copy> + + <!-- Copy the supported Groovy hook scripts --> + <mkdir dir="${project.war.dir}/WEB-INF/data/groovy" /> + <copy todir="${project.war.dir}/WEB-INF/data/groovy"> + <fileset dir="${basedir}/distrib/groovy"> + <include name="sendmail.groovy" /> + <include name="sendmail-html.groovy" /> + <include name="jenkins.groovy" /> + <include name="protect-refs.groovy" /> + </fileset> + </copy> + + <!-- Build the WAR web.xml from the prototype web.xml --> <java classpath="${project.build.dir}" classname="com.gitblit.build.BuildWebXml"> <classpath refid="master-classpath" /> @@ -348,8 +492,6 @@ <arg value="--destinationFile" /> <arg value="${project.war.dir}/WEB-INF/web.xml" /> - <arg value="--propertiesFile" /> - <arg value="${basedir}/distrib/gitblit.properties" /> </java> <!-- Gitblit resources --> @@ -363,12 +505,13 @@ <mkdir dir="${project.war.dir}/WEB-INF/lib"/> <copy todir="${project.war.dir}/WEB-INF/lib"> <fileset dir="${basedir}/ext"> - <exclude name="*-sources.jar" /> - <exclude name="*-javadoc.jar" /> + <exclude name="src/**" /> <exclude name="jcommander*.jar" /> <exclude name="jetty*.jar" /> <exclude name="junit*.jar" /> + <exclude name="hamcrest*.jar" /> <exclude name="servlet*.jar" /> + <exclude name="javax.servlet*.jar" /> </fileset> </copy> @@ -376,21 +519,97 @@ <mkdir dir="${project.war.dir}/WEB-INF/classes"/> <copy todir="${project.war.dir}/WEB-INF/classes"> <fileset dir="${project.build.dir}"> - <exclude name="WEB-INF/web.xml" /> + <exclude name="WEB-INF/" /> <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" /> + <exclude name="com/gitblit/authority/**" /> </fileset> </copy> <!-- Build the WAR file --> - <jar basedir="${project.war.dir}" destfile="${distribution.warfile}" compress="true" /> + <jar basedir="${project.war.dir}" destfile="${project.target.dir}/${distribution.warfile}" compress="true" /> </target> + <!-- + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Build Gitblit JAR for usage in other projects plug-ins (i.e. Gerrit) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + --> + <target name="buildJAR" depends="compile" description="Build Gitblit JAR"> + + <echo>Building Gitblit JAR ${gb.version}</echo> + + <delete dir="${project.jar.dir}" /> + + <!-- Gitblit classes --> + <mkdir dir="${project.jar.dir}"/> + <copy todir="${project.jar.dir}"> + <fileset dir="${project.build.dir}"> + <exclude name="WEB-INF/" /> + <exclude name="com/gitblit/tests/" /> + <exclude name="com/gitblit/build/**" /> + <exclude name="com/gitblit/client/**" /> + <exclude name="com/gitblit/authority/**" /> + <exclude name="com/gitblit/AddIndexedBranch*.class" /> + <exclude name="com/gitblit/GitBlitServer*.class" /> + <exclude name="com/gitblit/Launcher*.class" /> + </fileset> + </copy> + <copy todir="${project.jar.dir}/static"> + <fileset dir="${project.resources.dir}"> + <exclude name="thumbs.db" /> + </fileset> + </copy> + + <!-- Build the JAR file --> + <jar basedir="${project.jar.dir}" destfile="${distribution.jarfile}" compress="true" /> + </target> + + <!-- + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Build pom.xml for GitBlit JAR Maven module + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + --> + <target name="buildMaven" depends="buildJAR" description="Build pom.xml for Gitblit JAR Maven module"> + <copy tofile="${distribution.pomfile}" file="${distribution.pomfileTmplt}"/> + <replace file="${distribution.pomfile}" token="@gb.version@" value="${gb.version}" /> + </target> + + <!-- + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Install Gitblit JAR for usage as Maven module + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + --> + <target name="installMaven" depends="buildMaven" description="Install Gitblit JAR as Maven module"> + <exec executable="mvn"> + <arg value="install:install-file" /> + <arg value="-Dfile=${distribution.jarfile}" /> + <arg value="-DpomFile=${distribution.pomfile}" /> + <arg value="-DcreateChecksum=true" /> + </exec> + </target> + + <!-- + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Upload Gitblit JAR to remote Maven repository + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + --> + <target name="uploadMaven" depends="buildJAR" description="Upload Gitblit JAR to remote Maven repository"> + <exec executable="mvn"> + <arg value="deploy:deploy-file" /> + <arg value="-Dfile=${distribution.jarfile}" /> + <arg value="-DpomFile=${distribution.pomfile}" /> + <arg value="-Durl=${project.maven.repo.url}" /> + <arg value="-DrepositoryId=${project.maven.repo.id}" /> + <arg value="-DcreateChecksum=true" /> + </exec> + </target> + <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Build the stand-alone, command-line Gitblit Federation Client @@ -399,7 +618,7 @@ <target name="buildFederationClient" depends="compile" description="Builds the stand-alone Gitblit federation client"> <echo>Building Gitblit Federation Client ${gb.version}</echo> - <genjar jarfile="fedclient.jar"> + <genjar jarfile="${project.target.dir}/fedclient.jar"> <class name="com.gitblit.FederationClientLauncher" /> <resource file="${project.build.dir}/log4j.properties" /> <classfilter> @@ -409,6 +628,7 @@ <exclude name="org.slf4j." /> <exclude name="com.beust." /> <exclude name="com.google." /> + <exclude name="com.unboundid." /> </classfilter> <classpath refid="master-classpath" /> <manifest> @@ -419,16 +639,132 @@ </genjar> <!-- Build the federation client zip file --> - <zip destfile="${fedclient.zipfile}"> + <zip destfile="${project.target.dir}/${fedclient.zipfile}"> <fileset dir="${basedir}"> - <include name="fedclient.jar" /> <include name="LICENSE" /> <include name="NOTICE" /> + </fileset> + <fileset dir="${project.target.dir}"> + <include name="fedclient.jar" /> </fileset> <fileset dir="${basedir}/distrib"> <include name="federation.properties" /> </fileset> </zip> + + <!-- Cleanup --> + <delete file="${project.target.dir}/fedclient.jar" /> + </target> + + + <!-- + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Build a Gitblit filesystem for deployment to RedHat OpenShif Expresst + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + --> + <target name="buildExpress" depends="compile" description="Build exploded WAR file suitable for deployment to OpenShift Express"> + <echo>Building Gitblit Express for RedHat OpenShift ${gb.version}</echo> + + <delete dir="${project.express.dir}" /> + + <!-- Create the OpenShift filesystem --> + <property name="deployments.root" value="${project.express.dir}/deployments/ROOT.war"/> + <mkdir dir="${deployments.root}" /> + <touch file="${project.express.dir}/deployments/ROOT.war.dodeploy" /> + + <!-- Copy the Gitblit OpenShift readme file --> + <copy tofile="${project.express.dir}/README.gitblit" + file="${basedir}/distrib/openshift.mkd"/> + + <!-- Copy LICENSE and NOTICE to WEB-INF --> + <copy todir="${deployments.root}/WEB-INF"> + <fileset dir="${basedir}"> + <include name="LICENSE" /> + <include name="NOTICE" /> + </fileset> + </copy> + + <!-- Copy gitblit.properties as reference.properties --> + <copy tofile="${deployments.root}/WEB-INF/reference.properties" + file="${basedir}/distrib/gitblit.properties"/> + + <!-- Copy users.conf and gitblit.properties --> + <mkdir dir="${deployments.root}/WEB-INF/data" /> + <copy todir="${deployments.root}/WEB-INF/data"> + <fileset dir="${basedir}/distrib"> + <include name="users.conf" /> + <include name="projects.conf" /> + <include name="gitblit.properties" /> + </fileset> + </copy> + + <!-- Copy the supported Groovy hook scripts --> + <mkdir dir="${deployments.root}/WEB-INF/data/groovy" /> + <copy todir="${deployments.root}/WEB-INF/data/groovy"> + <fileset dir="${basedir}/distrib/groovy"> + <include name="sendmail.groovy" /> + <include name="sendmail-html.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"> + <classpath refid="master-classpath" /> + + <arg value="--sourceFile" /> + <arg value="${basedir}/src/WEB-INF/web.xml" /> + + <arg value="--destinationFile" /> + <arg value="${deployments.root}/WEB-INF/web.xml" /> + + <arg value="--propertiesFile" /> + <arg value="${basedir}/distrib/gitblit.properties" /> + </java> + + <!-- Gitblit resources --> + <copy todir="${deployments.root}"> + <fileset dir="${project.resources.dir}"> + <exclude name="thumbs.db" /> + </fileset> + </copy> + + <!-- Gitblit library dependencies --> + <mkdir dir="${deployments.root}/WEB-INF/lib"/> + <copy todir="${deployments.root}/WEB-INF/lib"> + <fileset dir="${basedir}/ext"> + <exclude name="src/**" /> + <exclude name="jcommander*.jar" /> + <exclude name="jetty*.jar" /> + <exclude name="junit*.jar" /> + <exclude name="hamcrest*.jar" /> + <exclude name="servlet*.jar" /> + <exclude name="javax.servlet*.jar" /> + <exclude name="jsslutils*.jar" /> + <exclude name="jcalendar*.jar" /> + </fileset> + </copy> + + <!-- Gitblit 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/" /> + <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/authority/**" /> + </fileset> + </jar> + + <!-- Build Express Zip file --> + <zip destfile="${project.target.dir}/${express.zipfile}"> + <fileset dir="${project.express.dir}" /> + </zip> + </target> @@ -439,12 +775,14 @@ --> <target name="buildManager" depends="compile" description="Builds the stand-alone Gitblit Manager"> <echo>Building Gitblit Manager ${gb.version}</echo> - - <genjar jarfile="maanager-${gb.version}.jar"> + + <genjar jarfile="${project.target.dir}/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" /> + <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" /> @@ -459,9 +797,17 @@ <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/commit_divide_16x16.png" /> + <resource file="${basedir}/resources/star_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_es.properties" /> + <resource file="${basedir}/src/com/gitblit/wicket/GitBlitWebApp_ja.properties" /> + <resource file="${basedir}/src/com/gitblit/wicket/GitBlitWebApp_ko.properties" /> + <resource file="${basedir}/src/com/gitblit/wicket/GitBlitWebApp_nl.properties" /> + <resource file="${basedir}/src/com/gitblit/wicket/GitBlitWebApp_pl.properties" /> + <resource file="${basedir}/src/com/gitblit/wicket/GitBlitWebApp_pt_BR.properties" /> + <class name="com.gitblit.client.GitblitManagerLauncher" /> <classfilter> <exclude name="org.apache." /> @@ -470,6 +816,7 @@ <exclude name="org.slf4j." /> <exclude name="com.beust." /> <exclude name="com.google." /> + <exclude name="com.unboundid." /> </classfilter> <classpath refid="master-classpath" /> <manifest> @@ -479,86 +826,176 @@ <attribute name="Release-Date" value="${gb.versionDate}" /> </manifest> </genjar> - + <!-- Build Manager Zip file --> - <zip destfile="${manager.zipfile}"> + <zip destfile="${project.target.dir}/${manager.zipfile}"> <fileset dir="${basedir}"> - <include name="manager-${gb.version}.jar" /> <include name="LICENSE" /> <include name="NOTICE" /> </fileset> + <fileset dir="${project.target.dir}"> + <include name="manager-${gb.version}.jar" /> + </fileset> </zip> + + <!-- Cleanup --> + <delete file="${project.target.dir}/manager-${gb.version}.jar" /> </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 the stand-alone, Gitblit Authority + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + --> + <target name="buildAuthority" depends="compile" description="Builds the stand-alone Gitblit Authority"> + <echo>Building Gitblit Authority ${gb.version}</echo> + + <genjar jarfile="${project.target.dir}/authority-${gb.version}.jar"> + <resource file="${basedir}/src/com/gitblit/client/splash.png" /> + <resource file="${basedir}/resources/gitblt-favicon.png" /> + <resource file="${basedir}/resources/user_16x16.png" /> + <resource file="${basedir}/resources/users_16x16.png" /> + <resource file="${basedir}/resources/rosette_16x16.png" /> + <resource file="${basedir}/resources/rosette_32x32.png" /> + <resource file="${basedir}/resources/vcard_16x16.png" /> + <resource file="${basedir}/resources/settings_16x16.png" /> + <resource file="${basedir}/resources/settings_32x32.png" /> + <resource file="${basedir}/resources/search-icon.png" /> + <resource file="${basedir}/resources/mail_16x16.png" /> + <resource file="${basedir}/resources/script_16x16.png" /> + <resource file="${basedir}/resources/blank.png" /> + <resource file="${basedir}/resources/bullet_green.png" /> + <resource file="${basedir}/resources/bullet_orange.png" /> + <resource file="${basedir}/resources/bullet_red.png" /> + <resource file="${basedir}/resources/bullet_white.png" /> + <resource file="${basedir}/resources/bullet_delete.png" /> + <resource file="${basedir}/resources/bullet_key.png" /> + <resource file="${basedir}/src/log4j.properties" /> + <resource file="${basedir}/src/com/gitblit/wicket/GitBlitWebApp.properties" /> + <resource file="${basedir}/src/com/gitblit/wicket/GitBlitWebApp_es.properties" /> + <resource file="${basedir}/src/com/gitblit/wicket/GitBlitWebApp_ja.properties" /> + <resource file="${basedir}/src/com/gitblit/wicket/GitBlitWebApp_ko.properties" /> + <resource file="${basedir}/src/com/gitblit/wicket/GitBlitWebApp_pl.properties" /> + + <class name="com.gitblit.authority.GitblitAuthorityLauncher" /> + <classfilter> + <exclude name="org.apache." /> + <exclude name="org.bouncycastle." /> + <exclude name="org.eclipse." /> + <exclude name="org.slf4j." /> + <exclude name="com.beust." /> + <exclude name="com.google." /> + <exclude name="com.unboundid." /> + </classfilter> + <classpath refid="master-classpath" /> + <manifest> + <attribute name="Main-Class" value="com.gitblit.authority.GitblitAuthorityLauncher" /> + <attribute name="SplashScreen-Image" value="splash.png" /> + <attribute name="Specification-Version" value="${gb.version}" /> + <attribute name="Release-Date" value="${gb.versionDate}" /> + </manifest> + </genjar> + + <!-- Build Authority Zip file --> + <zip destfile="${project.target.dir}/${authority.zipfile}"> + <fileset dir="${basedir}"> + <include name="LICENSE" /> + <include name="NOTICE" /> + </fileset> + <fileset dir="${project.target.dir}"> + <include name="authority-${gb.version}.jar" /> + </fileset> + <zipfileset dir="${basedir}/distrib" prefix="data/certs"> + <include name="authority.conf" /> + <include name="mail.tmpl" /> + <include name="instructions.tmpl" /> + </zipfileset> + </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="${project.target.dir}/gbapi-${gb.version}.jar"> + <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" /> + <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 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> + <!-- Build API sources jar --> + <zip destfile="${project.target.dir}/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="${project.target.dir}/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="${project.target.dir}/gbapi-${gb.version}-javadoc.jar"> + <fileset dir="${project.target.dir}/javadoc" /> + </zip> + + <!-- Build the API library zip file --> + <zip destfile="${project.target.dir}/${gbapi.zipfile}"> + <fileset dir="${basedir}"> + <include name="LICENSE" /> + <include name="NOTICE" /> + </fileset> + <fileset dir="${project.target.dir}"> + <include name="gbapi-${gb.version}.jar" /> + <include name="gbapi-${gb.version}-sources.jar" /> + <include name="gbapi-${gb.version}-javadoc.jar" /> + </fileset> + <fileset dir="${basedir}/ext"> + <exclude name="src/**" /> + <include name="gson*.jar" /> + <include name="rome*.jar" /> + <include name="jdom*.jar" /> + </fileset> + </zip> + + <!-- Cleanup --> + <delete> + <fileset dir="${project.target.dir}"> + <include name="javadoc/**" /> + <include name="gbapi-${gb.version}.jar" /> + <include name="gbapi-${gb.version}-sources.jar" /> + <include name="gbapi-${gb.version}-javadoc.jar" /> + </fileset> + </delete> + </target> <!-- @@ -576,9 +1013,8 @@ <copy todir="${project.site.dir}"> <!-- Copy selected Gitblit resources --> <fileset dir="${project.resources.dir}"> - <include name="bootstrap.130.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" /> @@ -595,6 +1031,7 @@ <!-- Copy Doc images --> <fileset dir="${basedir}/docs"> <include name="*.png" /> + <include name="*.gif" /> <include name="*.js" /> </fileset> </copy> @@ -683,6 +1120,9 @@ <arg value="%API%=${gbapi.zipfile}" /> <arg value="--substitute" /> + <arg value="%EXPRESS%=${express.zipfile}" /> + + <arg value="--substitute" /> <arg value="%BUILDDATE%=${gb.versionDate}" /> <arg value="--substitute" /> @@ -705,56 +1145,77 @@ </java> </target> - + <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Compile from source, publish binaries, and build & deploy site ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --> - <target name="buildAll" depends="buildGO,buildWAR,buildFederationClient,buildManager,buildApiLibrary,buildSite"> + <target name="buildAll" depends="buildAuthority,buildGO,buildWAR,buildExpress,buildFederationClient,buildManager,buildApiLibrary,buildSite"> <!-- Cleanup --> <delete dir="${project.build.dir}" /> <delete dir="${project.war.dir}" /> <delete dir="${project.deploy.dir}" /> + <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}/target/site" /> + + <arg value="--repository" /> + <arg value="${basedir}" /> + + <arg value="--obliterate" /> + </java> + </target> + + <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Publish binaries to Google Code ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --> - <target name="publishBinaries" depends="buildGO,buildWAR,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> - + <!-- Upload Gitblit GO ZIP file --> <gcupload username="${googlecode.user}" password="${googlecode.password}" projectname="gitblit" - filename="${distribution.zipfile}" + filename="${project.target.dir}/${distribution.zipfile}" targetfilename="gitblit-${gb.version}.zip" summary="Gitblit GO v${gb.version} (standalone, integrated Gitblit server)" labels="Featured, Type-Package, OpSys-All" /> - + <!-- Upload Gitblit WAR file --> <gcupload username="${googlecode.user}" password="${googlecode.password}" projectname="gitblit" - filename="${distribution.warfile}" + filename="${project.target.dir}/${distribution.warfile}" targetfilename="gitblit-${gb.version}.war" summary="Gitblit WAR v${gb.version} (standard WAR webapp for servlet containers)" labels="Featured, Type-Package, OpSys-All" /> - + <!-- Upload Gitblit FedClient --> <gcupload username="${googlecode.user}" password="${googlecode.password}" projectname="gitblit" - filename="${fedclient.zipfile}" + filename="${project.target.dir}/${fedclient.zipfile}" targetfilename="fedclient-${gb.version}.zip" summary="Gitblit Federation Client v${gb.version} (command-line tool to clone data from federated Gitblit instances)" labels="Featured, Type-Package, OpSys-All" /> @@ -764,33 +1225,44 @@ username="${googlecode.user}" password="${googlecode.password}" projectname="gitblit" - filename="${manager.zipfile}" + filename="${project.target.dir}/${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}" + filename="${project.target.dir}/${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" /> + + <!-- Upload Gitblit Express for RedHat OpenShift --> + <gcupload + username="${googlecode.user}" + password="${googlecode.password}" + projectname="gitblit" + filename="${project.target.dir}/${express.zipfile}" + targetfilename="express-${gb.version}.zip" + summary="Gitblit Express v${gb.version} (run Gitblit on RedHat's OpenShift cloud)" + labels="Featured, Type-Package, OpSys-All" /> + </target> - + <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Publish site to hosting service + Publish site to site hosting service 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> - + <ftp server="${ftp.server}" userid="${ftp.user}" password="${ftp.password}" @@ -801,7 +1273,7 @@ </ftp> </target> - + <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Compile from source, publish binaries, and build & deploy site @@ -813,4 +1285,4 @@ <delete dir="${project.war.dir}" /> <delete dir="${project.deploy.dir}" /> </target> -</project> +</project> -- Gitblit v1.9.1