source: main/trunk/greenstone3/src/java/org/greenstone/util/RunAnt.java@ 27826

Last change on this file since 27826 was 27826, checked in by davidb, 11 years ago

Class extended to include support for storing properties that would be defined when an 'ant' task is run. Introduced to help support Greenstone running off a read-only medium, such as a DVD

  • Property svn:keywords set to Author Date Id Revision
File size: 683 bytes
Line 
1package org.greenstone.util;
2
3import org.greenstone.util.RunTarget;
4
5public class RunAnt extends RunTarget
6{
7 String opt_cmd_args = "";
8
9 public RunAnt(String opt_args)
10 {
11 super();
12
13 if (opt_args!=null) {
14 opt_cmd_args = opt_args + " ";
15 }
16
17 targetSuccess = "BUILD SUCCESSFUL";
18 targetFailed = "BUILD FAILED";
19 targetFinished = "Total time";
20 }
21
22 public RunAnt()
23 {
24 this(null);
25 }
26
27
28 public void setTargetCmd(String target)
29 {
30 String osName = System.getProperty("os.name");
31 if (osName.startsWith("Windows")) {
32 targetCmd = "ant.bat " + opt_cmd_args + target;
33 } else {
34 targetCmd = "ant " + opt_cmd_args + target;
35 }
36 }
37}
Note: See TracBrowser for help on using the repository browser.