--- Anupama Ramesh <[EMAIL PROTECTED]> 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}"/>
  </path>
  <property name="path" refid="a_path"/>
  <target name="main">
    <echo message="path = ${path}"/>
    <ant dir="sub"/>
  </target>
</project>
$ cat sub/build.xml
<project default="subtarget">
  <path id="a_path">
    <pathelement path="${java.class.path}"/>
  </path>
  <property name="newpath" refid="a_path"/>
  <target name="subtarget">
    <echo message="newpath = ${newpath}"/>
  </target>
</project>
$ ant
Buildfile: build.xml

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

subtarget:
  [echo] newpath =
/usr/ant/lib/optional.jar:/usr/ant/lib/jaxp.jar...(etc.)

BUILD SUCCESSFUL

Total time: 0 seconds

Diane


=====
([EMAIL PROTECTED])



__________________________________________________
Do You Yahoo!?
Find the one for you at Yahoo! Personals
http://personals.yahoo.com

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to