Hi,

embed currently does not work with ant-1.5.3

1) RuntimeConfigurable2 does not compile because it uses a method
   introduced for 1.6:
       ih = IntrospectionHelper.getHelper(Project p, Class c);
   which can easily be replaced by:
       ih = IntrospectionHelper.getHelper(Class c);
       p.addBuildListener(ih);

2) PropertyHelper needs to be passed the properties set in the
   project to correctly replace them because it does not get these
   itself anymore in 1.6:
       ph.replaceProperties(null, value, null);
   must be replaced by:
       ph.replaceProperties(null, value, p.getProperties());

Costin, may you please apply the attached patch which contains these
changes and allows embed-head to compile and run with ant-1.5.3

PropertyHelper could also be synchronized with 1.6 to get a few
corrections.

Thanks all for your hard work.

-- 
Loïc Péron

phone:(33) 683 880 177
mailto:[EMAIL PROTECTED]
--- RuntimeConfigurable2.java-1.8       Fri Mar 07 18:14:58 2003
+++ RuntimeConfigurable2.java   Thu Apr 10 14:10:01 2003
@@ -288,14 +288,15 @@
 
         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);

Reply via email to