Hi,
Thanks Erik for pointing out my error. I did a copy/paste from a Korn shell
script and forgot to change $ENV_VAR to ${ENV_VAR}. Everything worked after
I made the changes.
thanks,
vince
-----Original Message-----
From: Erik Hatcher [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 14, 2002 4:02 PM
To: Ant Users List
Subject: Re: passing refid to sub-project file
I'm not 100% certain of this as you did not define more explicitly what
you mean by "doesn't work", but one of the biggest "mistakes"(?) I see
people make with Ant is using 'value' on <property> when you're refering
to files/directories. 'location' is what you want. I would recommend
(and this doesn't appear to matter in your case, but it is a best
practice) that you switch your property assignments.
I also see you using $BEA_DIR. I think you mean ${BEA_DIR}.
Erik
Buonassisi, Vincent wrote:
> Hi,
>
> I am trying to pass a 'path' to a sub-project that i call using the task
> 'ant'. I set 'inheritrefs' to true. but, it doesn't work. 'path'
contains
> my classpath that built up and I would like to pass it to the
sub-projects.
> Here is the relevant snippets of code:
>
> build.xml:
>
> <project name="ifm" default="all" basedir=".">
>
> <property environment="env"/>
> <property name="JAVA_HOME" value="${env.JAVA_HOME}"/>
> <property name="BEA_DIR" value="/tools/bea/wlserver6.1/lib"/>
> <property name="VBROKER" value="/tools/visibroker/lib"/>
> :
>
> <path id="classpath">
> <pathelement path="${java.class.path}"/>
> <pathelement location="."/>
> <pathelement location="$BEA_DIR/weblogic.jar"/>
> :
> </path>
>
>
> <target name="snmp" >
> <ant dir="." antfile="build_vjb.xml" inheritrefs="true"/>
> </target>
> </project>
>
>
> build_vjb.xml:
>
> <project name=".....
>
> :
>
> <!-- Compile ejb classes into the build directory (jar preparation)
> -->
> <target name="compile_ejb" depends="init">
> <javac srcdir="${src}" destdir="${build}"
> includes="com/erc/ifm/snmp/**"
>
> excludes="com/erc/ifm/snmp/Client.java,com/erc/ifm/snmp/startup/**">
> <classpath refid="classpath"/>
> </javac>
> </target>
>
> :
> </project>
>
> Can someone point out what I am doing wrong?
>
> thanks,
>
> vince
>
>
>
>
>
>
>
> --
> 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]>