You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Conor MacNeill <co...@cortexebusiness.com.au> on 2001/08/02 17:37:04 UTC

File paths as properties

Hi,

I tried to build tomcat 4 today and it has some problems finding the
servlet API.

It defines in the top level build.xml file

  <property name="servletapi.home"  value="../jakarta-servletapi-4/dist"/>

It then calls a build file in catalina

    <ant dir="./catalina" target="all"/>

Now, in catalina, the property is also defined

  <property name="servletapi.home"
value="../../jakarta-servletapi-4/dist"/>

Now, obviously, that will not be overridden, and the build fails - at least
for me. I'm not sure if I have missed something, or whether I'm not
building it the right way but it suggested some ideas to me

1. inheritAll flag is a good thing

2. Perhaps, we should have a mode for the property task to resolve a path

<property name="servletapi.home"  path="../jakarta-servletapi-4/dist"/>

This would resolve the relative file to an absolute path, so it can be
passed to subbuilds and still work.

Thoughts?

Conor




RE: File paths as properties

Posted by Conor MacNeill <co...@cortexebusiness.com.au>.
> From: Peter Donald [mailto:donaldp@apache.org]
> > 2. Perhaps, we should have a mode for the property task to 
> resolve a path
> >
> > <property name="servletapi.home"  path="../jakarta-servletapi-4/dist"/>
> 
> sounds like location to me ;)
> 

D'Oh. You're right. OK, I'll have to submit a patch to tomcat to use that.

Thanks
Conor


Re: File paths as properties

Posted by Peter Donald <do...@apache.org>.
On Fri,  3 Aug 2001 01:37, Conor MacNeill wrote:
> Hi,
>
> I tried to build tomcat 4 today and it has some problems finding the
> servlet API.
>
> It defines in the top level build.xml file
>
>   <property name="servletapi.home"  value="../jakarta-servletapi-4/dist"/>
>
> It then calls a build file in catalina
>
>     <ant dir="./catalina" target="all"/>
>
> Now, in catalina, the property is also defined
>
>   <property name="servletapi.home"
> value="../../jakarta-servletapi-4/dist"/>
>
> Now, obviously, that will not be overridden, and the build fails - at least
> for me. I'm not sure if I have missed something, or whether I'm not
> building it the right way but it suggested some ideas to me
>
> 1. inheritAll flag is a good thing

you mean the ability to set it to false ? yes definetly ;)

> 2. Perhaps, we should have a mode for the property task to resolve a path
>
> <property name="servletapi.home"  path="../jakarta-servletapi-4/dist"/>

sounds like location to me ;)

Cheers,

Pete

*-----------------------------------------------------*
| "Faced with the choice between changing one's mind, |
| and proving that there is no need to do so - almost |
| everyone gets busy on the proof."                   |
|              - John Kenneth Galbraith               |
*-----------------------------------------------------*

Re: File paths as properties

Posted by Stefan Bodewig <bo...@apache.org>.
On Fri, 3 Aug 2001, Conor MacNeill <co...@cortexebusiness.com.au>
wrote:

> 2. Perhaps, we should have a mode for the property task to resolve a
> path
> 
> <property name="servletapi.home"
>           path="../jakarta-servletapi-4/dist"/>

Hmm, how about using location as the name for that attribute? ;-)

Stefan