Thanks hugely for this Ian - that's exactly the functionality I was looking for, so I 
guess it's not there yet. Unfortunately I seem to have misunderstood inheritall too! 
What I'm trying to do is effectively have default parameters in a build file that can 
be overridden when called from another build file. For example:
 
build1.build:
 
<project name="build1" default="build" basedir=".">
  <property name="project.name" value="build1" />
  <target name="build">
    <echo message="Child project name ${project.name}" />
  </target>
</project>
 
build2.build:
 
<project name="build2" default="build" basedir=".">
  <property name="project.name" value="build2" />
  <target name="build">
    <echo message="Parent project name ${project.name}" />
    <nant buildfile="build1.build" inheritall="true" />
  </target>
</project> 
 
When calling nant on build1.build, as expected it returns "Child project name build1".
 
I would have hoped that when build2 calls nant on build1, it would return "Child 
project name build2" - unfortunately when you run this, it's still "build1". I'm using 
version 0.8.2.
 
Can you or anyone think of a way of doing what I'm trying to do?
 
Many thanks
 
Kenton Price

        -----Original Message----- 
        From: Ian MacLean [mailto:[EMAIL PROTECTED] 
        Sent: Tue 08/07/2003 15:43 
        To: Kenton Price 
        Cc: [EMAIL PROTECTED] 
        Subject: Re: [Nant-users] Passing attributes when calling <nant... >?
        
        

        Kenton,
        right now you can use the inheritall attribute to get all of them. There
        is no way right now of passing selected properties. Maybe it would be
        useful to have an optionset under the nant task so you could do:
        
        <nant buildfile="[buildfile2]" target="build >
                <properties>
                        <property name="attribute1" value="${attribute1}" />
                </properties>
        
        </nant>
        
        Ian
        
        >Hi
        >
        >Apologies if this has been answered before, but I'm trying to pass selected 
specific attributes when calling <nant>. I don't want to inherit all attributes, just 
some of them. I was hoping to be able to do something like this:
        >
        >        <nant buildfile="[buildfile2]" target="build 
-D:attribute1=${attribute1} -D:attribute3=${attribute3} />
        >
        >but it falls over. Is there a way of doing what I'm trying to do?
        >
        >Many thanks
        >
        >Kenton Price
        >?????????????????????????????????????????ӆ+?^?隊[)?{([EMAIL 
PROTECTED];"??"??nv)?
        
>?ZE?h????(?g?q?Ϣ?Z??ڝ?h??j?????i?^????'?????Zɩ?z{^??0?v?\???b??J۝?????????w???brO?_ܢo??lkM5?M4???ثy??j?ڲ???]???5?M????????????????????????????????????Z????왨??x%??Mj{??ǫ??b??????q?????a??l????l??.?ǟ???w??X?????b????????
        > 
        >
        
        
        

�ą5�^�����'[EMAIL 
PROTECTED])ZnW����yhi�hu���ק�����ju�9z+V+.jT��ب4D����)��\�'$��\�o��lkM5�M4���ثy�Z��)ӭv�}5�MMj{n��왨��x%��Mj{n���+-��.�ǟ����a��l��b��,���y�+��޷�b��?�+-�w��v����

Reply via email to