diff --git a/src/main/org/apache/tools/ant/Constants.java b/src/main/org/apache/tools/ant/Constants.java new file mode 100644 index 000000000..8a50dc4c8 --- /dev/null +++ b/src/main/org/apache/tools/ant/Constants.java @@ -0,0 +1,19 @@ +/* + * Copyright (C) The Apache Software Foundation. All rights reserved. + * + * This software is published under the terms of the Apache Software License + * version 1.1, a copy of which has been included with this distribution in + * the LICENSE file. + */ +package org.apache.tools.ant; + +/** + * Abstract interface to hold constants. + * + * @author Peter Donald + */ +interface Constants +{ + String DATE = "@@DATE@@"; + String VERSION = "@@VERSION@@"; +} diff --git a/src/main/org/apache/tools/ant/Main.java b/src/main/org/apache/tools/ant/Main.java index ab1f0682f..5fd2edd7a 100644 --- a/src/main/org/apache/tools/ant/Main.java +++ b/src/main/org/apache/tools/ant/Main.java @@ -72,10 +72,8 @@ 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 " + VERSION + " compiled on " + DATE; + "Ant version " + Constants.VERSION + " compiled on " + Constants.DATE; /** The default build file name */ public static final String DEFAULT_BUILD_FILENAME = "build.xml";