Browse Source

Revert the property replacement in text.

Added a note on the bug in import ( not very important, but should
be fixed ).


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@273446 13f79535-47bb-0310-9956-ffa450edef68
master
Costin Manolache 23 years ago
parent
commit
7716e2be7d
2 changed files with 10 additions and 6 deletions
  1. +3
    -3
      proposal/embed/src/java/org/apache/tools/ant/RuntimeConfigurable2.java
  2. +7
    -3
      proposal/embed/test.xml

+ 3
- 3
proposal/embed/src/java/org/apache/tools/ant/RuntimeConfigurable2.java View File

@@ -261,10 +261,10 @@ public class RuntimeConfigurable2 extends RuntimeConfigurable {
}
if (characters.length() != 0) {
// First do substitution. This allows <echo>Message</echo> to work
// like <echo message="..." />. And it's more fun.
// // First do substitution. This allows <echo>Message</echo> to work
// // like <echo message="..." />. And it's more fun.
String txt=characters.toString();
txt=ph.replaceProperties( txt );
// txt=ph.replaceProperties( txt );
ProjectHelper.addText(p, wrappedObject, txt);
characters.setLength(0);
}


+ 7
- 3
proposal/embed/test.xml View File

@@ -2,8 +2,12 @@
<property name="ant.src" location="../.."/>
<import file="build.xml"/>
<echo>Base.path from build.xml ( in top level ): ${base.path}</echo>

<!-- This is a tricky problem: import will append tasks at the
end of the task list. That's a bug, it should replace the
<import> task with the content. When fixed, this should show
the real value. -->
<echo message="Base.path from build.xml ( in top level ): ${base.path}"/>
<target name="init">
<property name="junit.jar" location="${base.path}/junit3.7/junit.jar"/>
@@ -84,7 +88,7 @@
<echo message="jxPath /references/myJars: ${jxpath:/references/myJars}" />

<!-- This is XMLDOM.java - a datatype that holds an xml DOM -->
<typedef name="xmldom" classname="org.apache.tools.ant.types.XMLDOM"/>
<typedef name="xmldom" classname="org.apache.tools.ant.taskdefs.XMLDOM"/>

<!-- Init XMLDOM. The DOM of file test.xml will be referenced via the id-->
<xmldom id="test.xml" file="test.xml"/>


Loading…
Cancel
Save