[prev in list] [next in list] [prev in thread] [next in thread]
List: ant-user
Subject: RE: how to export a reference ?
From: SimonRichardson2 () hbosts ! com
Date: 2003-02-28 13:22:18
[Download RAW message or body]
I think you'd have to de-reference the path and create a property with it.
A technique to return properties is to create a property file in your nested \
build.xml and then on return to the calling root build.xml load (source) the property \
file.
So your nested/build.xml will contain the following:
<property name="myReturnValue" refid="yourRefID"/>
<propertyfile file="return_values.xml"
<entry key="returnKey" value="${myReturnValue}"/>
</propertyfile>
and in your calling build.xml:
<ant file="nested/build.xml"
inheritall="true"
inheritrefs="true"/>
<property file="nested/return_values.xml" prefix="new"/>
<echo message"value of returnKey = ${new.returnKey}"/>
NOTE:inheritall="true" and inheritrefs="true" are optional.
and prefix stops the new property values clashing with existing one.
I haven't tried it - should work, but might need a couple of tweaks.
Simon
> -----Original Message-----
> From: Romain Rouvoy [mailto:Romain.Rouvoy@lifl.fr]
> Sent: 28 February 2003 13:53
> To: Ant Users List
> Subject: Re: how to export a reference ?
>
>
> Hi,
>
> This option (inheritrefs) is usefull when you want to
> export from the root build.xml to the nested build.xml but I
> wan't to know how to export from the nested build.xml to the
> calling root build.xml. =)
>
> On Fri, 28 Feb 2003 06:52:53 -0600
> "Steve Cohen" <SCohen@sportvision.com> wrote:
>
> > <ant antfile="${cfg.ORB.ant.dir}/build.xml"
> target="ORB_init" inheritrefs="true"/>
> >
> >
> >
> >
> > -----Original Message-----
> > From: Romain Rouvoy [mailto:Romain.Rouvoy@lifl.fr]
> > Sent: Fri 2/28/2003 7:43 AM
> > To: ant-user@jakarta.apache.org
> > Cc:
> > Subject: how to export a reference ?
> >
> > Hello,
> >
> > I just want to know if it is possible (and how to do) to
> export the refid of a path defined in a nested build.xml file
> which is called using the ant task.
> >
> > Here is my code :
> >
> >
> > nested build.xml :
> > <target name="ORB_init" >
> > <path id="ORB.class.path" >
> > <fileset dir="${ORB.jar.dir}">
> > <include name="OB.jar" />
> > <include name="OBNaming.jar" />
> > <include name="OBUtil.jar" />
> > </fileset>
> > </path>
> > </target>
> >
> >
> >
> > root build.xml :
> > <target name="common_init" depends="common_header">
> > <ant antfile="${cfg.ORB.ant.dir}/build.xml" target="ORB_init" />
> >
> > <path id="project.boot.class.path">
> > <pathelement path="${build.class.dir}" />
> > <path refid="ORB.class.path" />
> > <pathelement path="${JDK.jar.file}" />
> > </path>
> > </target>
> >
> >
> >
> >
> > My problem comes from the directive <path
> refid="ORB.class.path" /> which told me "Reference
> ORB.class.path not found" =(
> >
> > Does anyone knows how to do ?
> >
> >
> >
> >
> >
> > Best Regards,
> > Romain ,,,
> > (. .)
> > ---------------------------------.oOO--(_)--OOo.--
> > Romain Rouvoy - Master Thesis Student
> > Laboratoire d'Informatique Fondamentale de Lille
> > UPRESA 8022 CNRS - U.F.R. I.E.E.A. - Batiment M3
> > Universite des Sciences et Technologies de Lille
> > 59655 Villeneuve d'Ascq CEDEX France
> >
> > NEW Phone: (33) (0)3 20 43 47 28
> > Fax: (33) (0)3 20 43 65 66
> > E-Mail: Romain.Rouvoy@lifl.fr
> > ICQ: #159382122
> > Home Page: http://www.lifl.fr/~rouvoy/
> > See Also: http://www.objectweb.org/openccm/
> > http://www.objectweb.org/jotm/
> > --------------------------------------------------
> >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> > For additional commands, e-mail: user-help@ant.apache.org
> >
> >
> >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> > For additional commands, e-mail: user-help@ant.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>
>
--
------------------------------------------------------------------------------
For more information on HBOS Treasury Services, please visit http://www.HBOSTS.com
Or for details of our online FX & Deposit services, please go to \
http://www.HBOSdeal.com
HBOS Treasury Services plc is part of the HBOS Group, which also includes Halifax plc \
and Bank of Scotland. Registered Office: 33 Old Broad Street, London EC2N 1HZ. \
Registered No. 2692890. Registered in England. Regulated by the Financial Services \
Authority.
The information contained in this message is confidential and is intended for the \
addressee only. If you have received this message in error or there are any problems \
please notify the originator immediately. The unauthorised use, disclosure, copying \
or alteration of this message is strictly forbidden. This mail and any attachments \
have been scanned for viruses prior to leaving the HBOS Treasury Services plc \
network. HBOS Treasury Services plc will not be liable for direct, special, indirect \
or consequential damages arising from alteration of the contents of this message by a \
third party or as a result of any virus being passed on.
HBOS Treasury Services plc reserves the right to monitor and record e-mail messages \
sent to and from this address for the purposes of investigating or detecting any \
unauthorised use of its system and ensuring its effective operation.
==============================================================================
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic