ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant Main.java
Date Tue, 23 Jan 2001 14:07:07 GMT
donaldp     01/01/23 06:07:06

  Modified:    src/main/org/apache/tools/ant Main.java
  Log:
  Fixed errors wrt
  
  * junit not being on primordial classloader.
  * ANT_HOME being overidden
  * no install target
  * no version data
  
  Revision  Changes    Path
  1.27      +7 -21     jakarta-ant/src/main/org/apache/tools/ant/Main.java
  
  Index: Main.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/Main.java,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- Main.java	2001/01/21 00:37:25	1.26
  +++ Main.java	2001/01/23 14:07:06	1.27
  @@ -72,6 +72,11 @@
   
   public class Main {
   
  +    public final static String VERSION             = "@VERSION@";
  +    public final static String DATE                = "@DATE@";
  +    public final static String BANNER              = 
  +        "Ant version " + DATE + " compiled on " + DATE;
  +
       /** The default build file name */
       public static final String DEFAULT_BUILD_FILENAME = "build.xml";
   
  @@ -510,27 +515,8 @@
       }
   
       private static void printVersion() {
  -        try {
  -            Properties props = new Properties();
  -            InputStream in =
  -                Main.class.getResourceAsStream("/org/apache/tools/ant/version.txt");
  -            props.load(in);
  -            in.close();
  -
  -            String lSep = System.getProperty("line.separator");
  -            StringBuffer msg = new StringBuffer();
  -            msg.append("Ant version ");
  -            msg.append(props.getProperty("VERSION"));
  -            msg.append(" compiled on ");
  -            msg.append(props.getProperty("DATE"));
  -            msg.append(lSep);
  -            System.out.println(msg.toString());
  -        } catch (IOException ioe) {
  -            System.err.println("Could not load the version information.");
  -            System.err.println(ioe.getMessage());
  -        } catch (NullPointerException npe) {
  -            System.err.println("Could not load the version information.");
  -        }
  +        System.out.println( BANNER );
  +        System.out.println();
       }
   
       /**
  
  
  

Mime
View raw message