From 88355d87fdce7b32f129f96e3183d1fc5e3f9e11 Mon Sep 17 00:00:00 2001 From: Peter Donald Date: Mon, 29 Jan 2001 12:42:16 +0000 Subject: [PATCH] Changed source structure so that constants can be retrieved from a separate class built in alternate tree. This negates the need for multiple source trees. git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@268530 13f79535-47bb-0310-9956-ffa450edef68 --- src/main/org/apache/tools/ant/Constants.java | 19 +++++++++++++++++++ src/main/org/apache/tools/ant/Main.java | 4 +--- 2 files changed, 20 insertions(+), 3 deletions(-) create mode 100644 src/main/org/apache/tools/ant/Constants.java 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";