ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Diane Holt <>
Subject Re: Redefining path id aliases in a subproject
Date Thu, 15 Nov 2001 02:31:32 GMT
--- Anupama Ramesh <> wrote:
> I'm a new user.If you're using build.xml and defining subprojects this
> may be important.I was wondering if any of you have seen the problem.Ant
> won't let a subproject redefine path id aliases.  So, if someone defines
> a path id for your classpath like:
>     <path id="class.path">
>         <pathelement path="${classpath}"/>
>         <pathelement location="${jboss.dist}/lib/ext/jboss-j2ee.jar"/>
>         <pathelement location="${tomcat.dist}/lib/servlet.jar"/>
>     </path>
> And you try to redefine class.path in a subproject's build.xml the
> redefinition won't take.

I'm not sure what you mean by "won't take". I don't have a problem
redefining a <path> id in a sub-buildfile.

Could you try assigning the path to a property so you can <echo> it out,
then sending that along so we can see what it's doing for you?

For example:
$ cat build.xml
<project default="main">
  <path id="a_path">
    <pathelement path="${java.library.path}"/>
  <property name="path" refid="a_path"/>
  <target name="main">
    <echo message="path = ${path}"/>
    <ant dir="sub"/>
$ cat sub/build.xml
<project default="subtarget">
  <path id="a_path">
    <pathelement path="${java.class.path}"/>
  <property name="newpath" refid="a_path"/>
  <target name="subtarget">
    <echo message="newpath = ${newpath}"/>
$ ant
Buildfile: build.xml

  [echo] path = /usr/local/java/jdk13/bin:/home/work/ant...(etc.)

  [echo] newpath =


Total time: 0 seconds



Do You Yahoo!?
Find the one for you at Yahoo! Personals

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message