Oops, didn't realize that --- a.xml --- <target name="a"> ... <path id="classpath-out"> <pathelement path="${classpath-out.propertyname}" /> </path> </target>
should be: --- a.xml --- <target name="a"> ... <path id="classpath-out"> <pathelement path="${${classpath-out.propertyname}}" /> </path> </target> Which is impossible ;-) Two solutions: 1) Hard-code the property name to use. 2) Use ant-contrib's <propertycopy> task. --DD -----Original Message----- From: Dominique Devienne [mailto:[EMAIL PROTECTED]] Sent: Friday, June 21, 2002 9:48 AM To: 'Ant Users List' Subject: RE: passing a classpath back to the parent? No, not directly. The only known way to achieve this (that I know off at least) is to write out the classpath from b.xml into a properties file, which is read back in a.xml after it executed b.xml's target. It's not pretty, but it works. --- a.xml --- <target name="a"> <property name="classpath-out.propertyname" value="..." /> <property name="classpath-out.propertiesfile" location="..." /> <ant antfile="b.xml" target="b" inheritAll="true" /> <property file="${classpath-out.propertiesfile} /> <path id="classpath-out"> <pathelement path="${classpath-out.propertyname}" /> </path> </target> --- b.xml --- <target name="b"> <path id="classpath-out"> ... </path> <property name="classpath-out" refid="classpath-out" /> <propertyfile file="${classpath-out.propertiesfile}"> <entry key="${classpath-out.propertyname}" value="${classpath-out}" /> </propertyfile> </target> Not tested, but it should work. --DD -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 20, 2002 10:23 PM To: [EMAIL PROTECTED] Subject: passing a classpath back to the parent? Hi all, I hope this doesn't seem too dumb a question: I'm having a project a.xml with a target "compile" that calls another compile target in b.xml. I would need a way to pass the classpath set in b.xml back to a.xml. Is there a way to do that? Thanks, Thanh Long -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>