You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by JohnA <jo...@arrizza.com> on 2001/09/10 11:08:12 UTC

properties

I've searched the doc for information about properties in the doc but I can't seem to find a clear answer to:

1) what are the built-in properties, if any?
    in other words, if I don't define any <property .../> are there still some values I can get to using ${}?

 I know that
     <project name="xx">
     <jar jarfile="${project.name}.jar""/>
doesn't work because I tried it...

2) what are the scoping rules for properties?
It seems that if a property is defined

<project>
  <property name="x" value="val"/>
  ...
</project>

then it is visible to all targets. But if it is defined in a target, it is visible in that target and then to all subsequent
targets. But I'm only guessing.

what are the rules around overrides?
e.g. if a property is defined in the <project> </project> and also defined in a target, what value is used in subsequent targets?

John



Re: FTP-based "mirror/file synch" task

Posted by JohnA <jo...@arrizza.com>.
----- Original Message ----- 
From: "John Arrizza" <jo...@arrizza.com>
> Does anyone know of an available ant task to mirror a directory tree to a website? i.e. I set up a directory on my hard drive the
> way I want my website to look, I call mirror (or synch or whatever) and it copies new or modified files up to the web site, also
> propogates deletes to the web site as well (i.e. the hard drive is the master copy, the web is the slave).
> 
> I've tried to get to  http://www.savarese.org with no luck. I was hoping for something a little higher level in any case.
> 
> If there one available, I'll write it and post it... (where?)

Having read the doc (again) and downloaded optional.jar and netcomponents.jar (on an apache cvs site), and found that :

    <ftp action="send"  server="${url}" userid="${uid}" password="${pwd}" remotedir="${rootdir}" depends="yes">
        <fileset dir="." >
           <include name="**/*"/>
        </fileset>
    </ftp>

was close to what I wanted, (assuming the remote directory tree is in place and no files are being deleted)...

all I can say is:  never mind.

John


FTP-based "mirror/file synch" task

Posted by John Arrizza <jo...@arrizza.com>.
Does anyone know of an available ant task to mirror a directory tree to a website? i.e. I set up a directory on my hard drive the
way I want my website to look, I call mirror (or synch or whatever) and it copies new or modified files up to the web site, also
propogates deletes to the web site as well (i.e. the hard drive is the master copy, the web is the slave).

I've tried to get to  http://www.savarese.org with no luck. I was hoping for something a little higher level in any case.

If there one available, I'll write it and post it... (where?)

John


Re: properties

Posted by Diane Holt <ho...@yahoo.com>.
--- Peter Donald <do...@apache.org> wrote:
> > what are the rules around overrides?
> 
> you can't overide in the same project. You can "fake" it using antcall
> or ant and specifying property parameters to it however in same project
> properties are immutable.

I don't think I'd call overriding using <antcall>/<ant> "faking" it, since
that capability was provided on purpose, and the override is only in
effect during the <antcall>/<ant> -- but (as someone pointed out awhile
back), you actually can "fake" it using the <available> task (just check
for something that's always guaranteed to be found).

Diane

=====
(holtdl@yahoo.com)



__________________________________________________
Do You Yahoo!?
Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger
http://im.yahoo.com

Re: properties

Posted by Peter Donald <do...@apache.org>.
On Mon, 10 Sep 2001 19:08, JohnA wrote:
> I've searched the doc for information about properties in the doc but I
> can't seem to find a clear answer to:
>
> 1) what are the built-in properties, if any?
>     in other words, if I don't define any <property .../> are there still
> some values I can get to using ${}?
>
>  I know that
>      <project name="xx">
>      <jar jarfile="${project.name}.jar""/>
> doesn't work because I tried it...

Check out the ant manual for that.

> 2) what are the scoping rules for properties?
> It seems that if a property is defined
>
> <project>
>   <property name="x" value="val"/>
>   ...
> </project>
>
> then it is visible to all targets. But if it is defined in a target, it is
> visible in that target and then to all subsequent targets. But I'm only
> guessing.

yep. 

> what are the rules around overrides?

you can't overide in the same project. You can "fake" it using antcall or ant 
and specifying property parameters to it however in same project properties 
are immutable.

> e.g. if a property is defined in the <project> </project> and also defined
> in a target, what value is used in subsequent targets?

The first one that gets defined.

-- 
Cheers,

Pete

---------------------------------------------------------
Clarke's Third Law: "Any technology distinguishable from 
magic is insufficiently advanced".
---------------------------------------------------------

Re: properties

Posted by Herry <he...@yahoo.com>.
Hi,
I think you can find some docs on built-in properties
in the 'Using ANT' under the table of content in the
ANT manual.
And the property name for the project name is
'ant.project.name' and not 'project.name'

Cheers
Herry

 --- JohnA <jo...@arrizza.com> wrote: > I've
searched the doc for information about
> properties in the doc but I can't seem to find a
> clear answer to:
> 
> 1) what are the built-in properties, if any?
>     in other words, if I don't define any <property
> .../> are there still some values I can get to using
> ${}?
> 
>  I know that
>      <project name="xx">
>      <jar jarfile="${project.name}.jar""/>
> doesn't work because I tried it...
> 
> 2) what are the scoping rules for properties?
> It seems that if a property is defined
> 
> <project>
>   <property name="x" value="val"/>
>   ...
> </project>
> 
> then it is visible to all targets. But if it is
> defined in a target, it is visible in that target
> and then to all subsequent
> targets. But I'm only guessing.
> 
> what are the rules around overrides?
> e.g. if a property is defined in the <project>
> </project> and also defined in a target, what value
> is used in subsequent targets?
> 
> John
> 
>  

__________________________________________________
Do You Yahoo!?
Yahoo! Y! Pages - Search or browse for business listings.
http://yp.yahoo.com.sg/