|
|
@@ -72,6 +72,11 @@ import java.util.*; |
|
|
|
|
|
|
|
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 @@ public class Main { |
|
|
|
} |
|
|
|
|
|
|
|
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(); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|