Browse Source

Patch from Lo��c P��ron <loic.peron@bigfoot.com> to compile against ant153

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@274432 13f79535-47bb-0310-9956-ffa450edef68
master
Costin Manolache 22 years ago
parent
commit
6f398b3e92
2 changed files with 5 additions and 4 deletions
  1. +2
    -2
      proposal/embed/build.xml
  2. +3
    -2
      proposal/embed/src/java/org/apache/tools/ant/RuntimeConfigurable2.java

+ 2
- 2
proposal/embed/build.xml View File

@@ -26,12 +26,12 @@
<target name="build" depends="main" />

<target name="main" depends="init" >
<echo>Embed is no longer supported with ant1.6. It is only used with ant1.5 ! The dynamic properties work with both, use embed-optional target</echo>
<target name="main" depends="init,main-ant15" >
</target>

<target name="main-ant15" depends="init"
description="Build hacks into ant1.5 to support some 1.6 features" >
<echo>Embed is no longer supported with ant1.6. It is only used with ant1.5 ! The dynamic properties work with both, use embed-optional target</echo>
<javac srcdir="src/java"
debug="${debug}"
destdir="${embed.build}/classes" >


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

@@ -288,14 +288,15 @@ public class RuntimeConfigurable2 extends RuntimeConfigurable {

if (attributes != null) {
IntrospectionHelper ih =
IntrospectionHelper.getHelper(p, target.getClass());
IntrospectionHelper.getHelper(target.getClass());
p.addBuildListener( ih );

for (int i = 0; i < attributes.getLength(); i++) {
String name= attributes.getQName(i);
String value= attributes.getValue(i);

// reflect these into the target
value = ph.replaceProperties(null, value, null);
value = ph.replaceProperties(null, value, p.getProperties());
try {
ih.setAttribute(p, target,
name.toLowerCase(Locale.US), value);


Loading…
Cancel
Save