James Moger
2011-07-22 b1dba764c201f4708b82767b2d91edb6e189ce6f
src/com/gitblit/build/Build.java
@@ -35,8 +35,25 @@
import com.gitblit.Constants;
import com.gitblit.utils.StringUtils;
/**
 * The Build class downloads runtime and compile-time jar files from the Apache
 * or Eclipse Maven repositories.
 *
 * It also generates the Keys class from the gitblit.properties file.
 *
 * Its important that this class have minimal compile dependencies since its
 * called very early in the build script.
 *
 * @author James Moger
 *
 */
public class Build {
   /**
    * BuildType enumeration representing compile-time or runtime. This is used
    * to download dependencies either for Gitblit GO runtime or for setting up
    * a development environment.
    */
   public static enum BuildType {
      RUNTIME, COMPILETIME;
   }
@@ -95,6 +112,10 @@
      downloadFromApache(MavenObject.COMMONSNET, BuildType.RUNTIME);
   }
   /**
    * Builds the Keys class based on the gitblit.properties file and inserts
    * the class source into the project source folder.
    */
   public static void buildSettingKeys() {
      // Load all keys
      Properties properties = new Properties();
@@ -297,13 +318,18 @@
      String anim = "==========";
      int width = Math.round(anim.length() * progress);
      System.out.print("\r[");
      System.out.print(anim.substring(0, width));
      System.out.print(anim.substring(0, Math.min(width, anim.length())));
      for (int i = 0; i < anim.length() - width; i++) {
         System.out.print(' ');
      }
      System.out.print("] " + url);
   }
   /**
    * MavenObject represents a complete maven artifact (binary, sources, and
    * javadoc). MavenObjects can be downloaded and checksummed to confirm
    * authenticity.
    */
   private static class MavenObject {
      public static final MavenObject JCOMMANDER = new MavenObject("jCommander", "com/beust",
@@ -313,10 +339,10 @@
            "c7adc475ca40c288c93054e0f4fe58f3a98c0cb5");
      public static final MavenObject JETTY = new MavenObject("Jetty",
            "org/eclipse/jetty/aggregate", "jetty-webapp", "7.4.2.v20110526", 1000000, 680000,
            2720000, "56331143afa22d24d9faba96e86e6371b0686c7c",
            "9f38230fd589e29c8be0fc3c80fb51c5093c2e1e",
            "0d48212889c25252c5c14bef62703e28215d80cc");
            "org/eclipse/jetty/aggregate", "jetty-webapp", "7.4.3.v20110701", 1000000, 680000,
            2720000, "bde072b178f9650e2308f0babe58a4baaa469e3c",
            "bc75f05dd4f7fa848720ac669b8b438ee4a6b146",
            "dcd42f672e734521d1a6ccc0c2f9ecded1a1a281");
      public static final MavenObject SERVLET = new MavenObject("Servlet 2.5", "javax/servlet",
            "servlet-api", "2.5", 105000, 158000, 0,
@@ -368,10 +394,10 @@
            237000, 0, 0, "c94f54227b08100974c36170dcb53329435fe5ad", "", "");
      public static final MavenObject MARKDOWNPAPERS = new MavenObject("MarkdownPapers",
            "org/tautua/markdownpapers", "markdownpapers-core", "1.0.0", 87000, 58000, 278000,
            "feda63bd149f3315da210e397d45d02277038ad5",
            "a9a6c4d163af81e265a15138fcaeafa9829c6054",
            "f932656266a7f9593488d3f89e815d0af44d0853");
            "org/tautua/markdownpapers", "markdownpapers-core", "1.1.0", 87000, 58000, 278000,
            "b879b4720fa642d3c490ab559af132daaa16dbb4",
            "d98c53939815be2777d5a56dcdc3bbc9ddb468fa",
            "4c09d2d3073e85b973572292af00bd69681df76b");
      public static final MavenObject BOUNCYCASTLE = new MavenObject("BouncyCastle",
            "org/bouncycastle", "bcprov-jdk16", "1.46", 1900000, 1400000, 4670000,