Browse Source

Updated this to use the same approach as main wrt replacing constants in file .... strangely this one works

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@268536 13f79535-47bb-0310-9956-ffa450edef68
master
Peter Donald 24 years ago
parent
commit
9ab12cf578
4 changed files with 30 additions and 8 deletions
  1. +9
    -5
      proposal/myrmidon/build.xml
  2. BIN
      proposal/myrmidon/lib/avalonapi.jar
  3. +20
    -0
      proposal/myrmidon/src/java/org/apache/ant/Constants.java
  4. +1
    -3
      proposal/myrmidon/src/java/org/apache/ant/Main.java

+ 9
- 5
proposal/myrmidon/build.xml View File

@@ -51,7 +51,7 @@ Legal:
<property name="src.base" value="src"/>
<property name="manifest.dir" value="${src.base}/manifest"/>
<property name="xdocs.dir" value="${src.base}/xdocs"/>
<property name="src.dir" value="${src.base}/java"/>
<property name="java.dir" value="${src.base}/java"/>
<property name="skins.dir" value="${src.base}/skins"/>
<property name="script.dir" value="${src.base}/script"/>
<property name="lib.dir" value="lib"/>
@@ -68,7 +68,7 @@ Legal:
<property name="dist.conf" value="${dist.dir}/conf"/>
<property name="dist.log" value="${dist.dir}/logs"/>

<property name="constants.file" value="org/apache/ant/Main.java"/>
<property name="constants.file" value="org/apache/ant/Constants.java"/>

<!--
===================================================================
@@ -135,7 +135,9 @@ Legal:
<target name="prepare-src" depends="prepare">
<mkdir dir="${build.src}"/>
<copy todir="${build.src}">
<fileset dir="${src.dir}"/>
<fileset dir="${java.dir}">
<include name="${constants.file}" />
</fileset>
</copy>
<replace file="${build.src}/${constants.file}" token="@@VERSION@@" value="${version}" />
@@ -150,17 +152,19 @@ Legal:
<target name="compile" depends="prepare-src,prepare-lib">

<mkdir dir="${build.classes}"/>
<javac srcdir="${build.src}"
<javac srcdir="${java.dir}"
destdir="${build.classes}"
debug="${debug}"
optimize="${optimize}"
deprecation="${deprecation}">
<exclude name="org/apache/ant/gui/**"/>
<exclude name="${constants.file}"/>
<src path="${build.src}" />
</javac>

<!--
<copy todir="${build.classes}">
<fileset dir="${build.src}">
<fileset dir="${java.dir}">
<include name="**/*.properties"/>
</fileset>
</copy>


BIN
proposal/myrmidon/lib/avalonapi.jar View File


+ 20
- 0
proposal/myrmidon/src/java/org/apache/ant/Constants.java View File

@@ -0,0 +1,20 @@
/*
* 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.ant;

/**
* Abstract interface to hold constants.
*
* @author <a href="mailto:donaldp@apache.org">Peter Donald</a>
*/
interface Constants
{
//Constants to indicate the build of Ant/Myrmidon
String BUILD_DATE = "@@DATE@@";
String BUILD_VERSION = "@@VERSION@@";
}

+ 1
- 3
proposal/myrmidon/src/java/org/apache/ant/Main.java View File

@@ -58,10 +58,8 @@ public class Main
extends AbstractMain
{
//Constants to indicate the build of Ant/Myrmidon
public final static String BUILD_DATE = "@@DATE@@";
public final static String BUILD_VERSION = "@@VERSION@@";
public final static String VERSION =
"Ant " + BUILD_VERSION + " compiled on " + BUILD_DATE;
"Ant " + Constants.BUILD_VERSION + " compiled on " + Constants.BUILD_DATE;

//default log level
protected final static String DEFAULT_LOGLEVEL = "WARN";


Loading…
Cancel
Save