Subversion Repositories DevTools

Rev

Rev 844 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 844 Rev 854
Line 4... Line 4...
4
import com.erggroup.buildtool.ripple.MutableInt;
4
import com.erggroup.buildtool.ripple.MutableInt;
5
import com.erggroup.buildtool.ripple.MutableString;
5
import com.erggroup.buildtool.ripple.MutableString;
6
import com.erggroup.buildtool.ripple.Package;
6
import com.erggroup.buildtool.ripple.Package;
7
import com.erggroup.buildtool.ripple.ReleaseManager;
7
import com.erggroup.buildtool.ripple.ReleaseManager;
8
 
8
 
-
 
9
import java.io.File;
9
import java.net.InetAddress;
10
import java.net.InetAddress;
10
 
11
 
11
import java.net.UnknownHostException;
12
import java.net.UnknownHostException;
12
 
13
 
13
import java.sql.SQLException;
14
import java.sql.SQLException;
Line 26... Line 27...
26
  /**hostname
27
  /**hostname
27
   * @attribute
28
   * @attribute
28
   */
29
   */
29
  static String mHostname = new String();
30
  static String mHostname = new String();
30
 
31
 
-
 
32
  /**GBE_LOG
-
 
33
   * @attribute
-
 
34
   */
-
 
35
  static String mGbeLog = new String();
-
 
36
 
31
  /**Logger
37
  /**Logger
32
   * @attribute
38
   * @attribute
33
   */
39
   */
34
  private static final Logger mLogger = Logger.getLogger(BuildDaemon.class);
40
  private static final Logger mLogger = Logger.getLogger(BuildDaemon.class);
35
 
41
 
Line 82... Line 88...
82
  /**main method for the Build Daemon program
88
  /**main method for the Build Daemon program
83
   * instantiates a BuildDaemon object
89
   * instantiates a BuildDaemon object
84
   */
90
   */
85
  public static void main(String[] args)
91
  public static void main(String[] args)
86
  {
92
  {
-
 
93
    String antHome = System.getenv("ANT_HOME");
-
 
94
    
-
 
95
    if ( antHome == null )
-
 
96
    {
-
 
97
      mLogger.fatal("main ANT_HOME not set");
-
 
98
      System.exit(1);
-
 
99
    }
-
 
100
 
-
 
101
    mGbeLog = System.getenv("GBE_LOG");
-
 
102
    
-
 
103
    if ( mGbeLog == null )
-
 
104
    {
-
 
105
      mLogger.fatal("main GBE_LOG not set");
-
 
106
      System.exit(1);
-
 
107
    }
-
 
108
    
-
 
109
    File gl = new File( mGbeLog );
-
 
110
    
-
 
111
    if ( !gl.isDirectory() )
-
 
112
    {
-
 
113
      mLogger.fatal("main GBE_LOG is not a directory");
-
 
114
    }
-
 
115
 
-
 
116
    String gbeUNC = System.getenv("GBE_UNC");
-
 
117
    
-
 
118
    if ( gbeUNC == null )
-
 
119
    {
-
 
120
      mLogger.fatal("main GBE_UNC not set");
-
 
121
      System.exit(1);
-
 
122
    }
-
 
123
 
87
    String abtdXml = System.getenv("ABT_HOME");
124
    String abtdXml = System.getenv("ABT_HOME");
88
    
125
    
89
    if ( abtdXml != null )
126
    if ( abtdXml != null )
90
    {
127
    {
91
      abtdXml += System.getProperty( "file.separator" ) + "abtd.xml";
128
      abtdXml += System.getProperty( "file.separator" ) + "abtd.xml";
Line 94... Line 131...
94
    {
131
    {
95
      abtdXml = new String("abtd.xml");
132
      abtdXml = new String("abtd.xml");
96
    }
133
    }
97
    DOMConfigurator.configure(abtdXml);
134
    DOMConfigurator.configure(abtdXml);
98
    mLogger.debug("main");
135
    mLogger.debug("main");
99
    String usage = 
-
 
100
      new String("Usage: java -jar abtdD.jar -c connectionString -u username -p password");
-
 
101
    String connectionString = System.getenv("GBE_RM_LOCATION");
136
    String connectionString = System.getenv("GBE_RM_LOCATION");
102
    String username = System.getenv("GBE_RM_USERNAME");
137
    String username = System.getenv("GBE_RM_USERNAME");
103
    String password = System.getenv("GBE_RM_PASSWORD");
138
    String password = System.getenv("GBE_RM_PASSWORD");
104
 
139
 
105
    for (int optind = 0; optind < args.length; optind++)
140
    for (int optind = 0; optind < args.length; optind++)
Line 116... Line 151...
116
      {
151
      {
117
        password = args[++optind];
152
        password = args[++optind];
118
      }
153
      }
119
    }
154
    }
120
 
155
 
-
 
156
    if (connectionString == null ||
121
    if (connectionString.compareTo("") == 0 || 
157
        connectionString.length() == 0 ||
-
 
158
        username == null ||
122
        username.compareTo("") == 0 || password.compareTo("") == 0)
159
        username.length() == 0 ||
-
 
160
        password == null ||
-
 
161
        password.length() == 0)
123
    {
162
    {
124
      mLogger.fatal(usage);
163
      mLogger.fatal("Usage: java -jar abtdD.jar -c connectionString -u username -p password");
125
      System.exit(1);
164
      System.exit(1);
126
    }
165
    }
127
    
166
    
128
    BuildDaemon buildDaemon = new BuildDaemon(connectionString, username, password);
167
    BuildDaemon buildDaemon = new BuildDaemon(connectionString, username, password);
129
    buildDaemon.cleanUp();
168
    buildDaemon.cleanUp();