Re: Property vs. user property - what's the difference?
Thanks a lot for this very useful and clear information. I am surprised to read that can override properties. Is there a reason for it? Patrick M. On 2/16/06, Stefan Bodewig <[EMAIL PROTECTED]> wrote: > On Wed, 15 Feb 2006, Patrick Martin <[EMAIL PROTECTED]> wrote: > > > Could you explain the "even more immutable" part of your mail ? > > Sure. > > Properties are not immutable at all if you use Ant's Java API. It's > just that (almost[1]) all of the built-in Ant tasks refuse to change > the value of an existing property. But it is trivial to write a task > that changes the value of a property and in fact a lot of people and > projects have done so. > > There are five property setting methods in Ant's Project class: > > setNewProperty- sets a property, will never override an > existing one - user property or not. > Used by almost all built-in Ant tasks. > setProperty - sets or overrides a property, will never override > a user property. Used by . > setPropertyInternal - same as setProperty but without any warning if > it overrides a property. > setUserProperty - sets or overrides a user property. Used when > parsing the command line. > setInheritedProperty - sets or overrides a user property. Used for > nested in Ant. > > So both "plain properties" and "user properties" are in fact mutable > if you use the Ant API. Only one of the five setter methods will not > overwrite an existing property, only two of them will overwrite an > existing user property - which makes user properties "more immutable". > > Stefan > > Footnotes: > [1] Since I know I'll have to explain the "almost", will > happily overwrite existing properties. > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Classpath problem
Hi all, I’m having a very odd problem concerning the used classpath in ant targets. I have target1 and target2 like this: Basically, target1 is running a set of JUnit and Mock tests, and target2 is starting WebLogic. If I try to run both targets separately everything goes fine. The problem is if I create a third target that runs both target1 and target2 in sequence. Target1 runs fine and then target2 fails with an exception related with Mock objects. Therefore, it seems that the classpath that I define for target1 is available to target2 as well. I would expect that the classpath that I define is just local to the target I’m running. Is this assumption correct? Is there any way that I can run both targets in sequence, without “inheriting” the classpath from target1 at target2 level? Thanks! Paulo - To make communications with Clearstream easier, Clearstream has recently changed the email address format to conform with industry standards. The new format is '[EMAIL PROTECTED]'. Visit us at http://www.clearstream.com IMPORTANT MESSAGE Internet communications are not secure and therefore Clearstream International does not accept legal responsibility for the contents of this message. The information contained in this e-mail is confidential and may be legally privileged. It is intended solely for the addressee. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful. Any views expressed in this e-mail are those of the individual sender, except where the sender specifically states them to be the views of Clearstream International or of any of its affiliates or subsidiaries. END OF DISCLAIMER
Ant task equivalent to the "ln" unix command
Hi all, Does anybody know if there is an equivalent to the "ln" Unix command in Ant or others projects built over Ant ? My goal is to get a directory referenced through 2 different names. Regards -- A. ROY - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
File Copy issue
Hi All, I want to copy a directory into another one.And I want to omit certain folders in my source directory.How can I do this task Src dir: ABC MyFolder YourFolder MyFile And in the destination dir I want this structure Dest dir ABC MyFolder MyFile Here I'm omitting "YourFolder" Can anybody give me some idea With Thanks & Regards, Bejoy This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information. If you are not the intended recipient or received it in error, please contact the sender by reply e-mail and destroy all copies of the original message. Please do not copy it for any purpose or disclose its contents. Copyright Tarang Software Technologies Pvt. Ltd. 2004. All rights Reserved
RE: File Copy issue
Here Bejoy Go like this and there is task from Ant Using this you can include or exclude certain files. You will get it on net. Hope this helps you - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: File Copy issue
Yup it is possible And use exclude ant tag All the best.. Dinesh -Original Message- From: bejoy [mailto:[EMAIL PROTECTED] Sent: Thursday, February 16, 2006 5:41 PM To: user@ant.apache.org Subject: File Copy issue Hi All, I want to copy a directory into another one.And I want to omit certain folders in my source directory.How can I do this task Src dir: ABC MyFolder YourFolder MyFile And in the destination dir I want this structure Dest dir ABC MyFolder MyFile Here I'm omitting "YourFolder" Can anybody give me some idea With Thanks & Regards, Bejoy This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information. If you are not the intended recipient or received it in error, please contact the sender by reply e-mail and destroy all copies of the original message. Please do not copy it for any purpose or disclose its contents. Copyright Tarang Software Technologies Pvt. Ltd. 2004. All rights Reserved - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: test for directory existence
Stefan- I guess Im confused why doesnt mkdir show 2 success messages instead of the just the first success message? Martin- - Original Message - From: "Stefan Bodewig" <[EMAIL PROTECTED]> To: Sent: Thursday, February 16, 2006 12:18 AM Subject: Re: test for directory existence > On Wed, 15 Feb 2006, Martin Gainty <[EMAIL PROTECTED]> wrote: > >> *Not sure about delete* > > it will fail if you tell it to delete something that isn't there - > unless you set the quite attribute to true in which case it will > simply do nothing. > >> but I know mkdir will fail if the folder is already in place > > No it won't. > > , > | > | > | > | > ` > > leads to > > , > | [mkdir] Created dir: /tmp/foo > | > | BUILD SUCCESSFUL > | Total time: 1 second > ` > > The task doesn't even issue a warning message. > > Stefan > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Filesets
Hi, Please give some examples on fileset and nested fileset. Thanks & Regards, Bejoy This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information. If you are not the intended recipient or received it in error, please contact the sender by reply e-mail and destroy all copies of the original message. Please do not copy it for any purpose or disclose its contents. Copyright Tarang Software Technologies Pvt. Ltd. 2004. All rights Reserved
AW: test for directory existence
Why should? is responsible that the dir is present after its run. The first has to create it - so it sais that. The second not. Why printing? I tried with -v and -d. I think with -d we could print the skipping ... >-Ursprüngliche Nachricht- >Von: Martin Gainty [mailto:[EMAIL PROTECTED] >Gesendet: Donnerstag, 16. Februar 2006 14:24 >An: Ant Users List >Betreff: Re: test for directory existence > >Stefan- >I guess Im confused >why doesnt mkdir show 2 success messages instead of the just >the first success message? >Martin- >- Original Message - >From: "Stefan Bodewig" <[EMAIL PROTECTED]> >To: >Sent: Thursday, February 16, 2006 12:18 AM >Subject: Re: test for directory existence > > >> On Wed, 15 Feb 2006, Martin Gainty <[EMAIL PROTECTED]> wrote: >> >>> *Not sure about delete* >> >> it will fail if you tell it to delete something that isn't there - >> unless you set the quite attribute to true in which case it will >> simply do nothing. >> >>> but I know mkdir will fail if the folder is already in place >> >> No it won't. >> >> , >> | >> | >> | >> | >> ` >> >> leads to >> >> , >> | [mkdir] Created dir: /tmp/foo >> | >> | BUILD SUCCESSFUL >> | Total time: 1 second >> ` >> >> The task doesn't even issue a warning message. >> >> Stefan >> >> - >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Filesets
Hello, You can have a look at http://ant.apache.org/manual/CoreTypes/fileset.html Rgds, Patrick M. On 2/16/06, bejoy <[EMAIL PROTECTED]> wrote: > > Hi, > > > Please give some examples on fileset and nested fileset. > > Thanks & Regards, > Bejoy > > > > This e-mail and any files transmitted with it are for the sole use of the > intended recipient(s) and may contain confidential and privileged > information. If you are not the intended recipient or received it in error, > please contact the sender by reply e-mail and destroy all copies of the > original message. Please do not copy it for any purpose or disclose its > contents. > > Copyright Tarang Software Technologies Pvt. Ltd. 2004. All rights Reserved - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: Filesets
manual? Jan >-Ursprüngliche Nachricht- >Von: bejoy [mailto:[EMAIL PROTECTED] >Gesendet: Donnerstag, 16. Februar 2006 14:22 >An: user@ant.apache.org >Betreff: Filesets > > >Hi, > > >Please give some examples on fileset and nested fileset. > >Thanks & Regards, >Bejoy > > > >This e-mail and any files transmitted with it are for the sole >use of the intended recipient(s) and may contain confidential >and privileged information. If you are not the intended >recipient or received it in error, please contact the sender >by reply e-mail and destroy all copies of the original >message. Please do not copy it for any purpose or disclose its >contents. > >Copyright Tarang Software Technologies Pvt. Ltd. 2004. All >rights Reserved > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: test for directory existence
> Stefan- > I guess Im confused > why doesnt mkdir show 2 success messages instead of the just the first > success message? > Martin- > - Original Message - > From: "Stefan Bodewig" <[EMAIL PROTECTED]> > To: > Sent: Thursday, February 16, 2006 12:18 AM > Subject: Re: test for directory existence > > >> On Wed, 15 Feb 2006, Martin Gainty <[EMAIL PROTECTED]> wrote: >> >>> *Not sure about delete* >> >> it will fail if you tell it to delete something that isn't there - >> unless you set the quite attribute to true in which case it will >> simply do nothing. >> >>> but I know mkdir will fail if the folder is already in place >> >> No it won't. >> >> , >> | >> | >> | >> | >> ` >> >> leads to >> >> , >> | [mkdir] Created dir: /tmp/foo >> | >> | BUILD SUCCESSFUL >> | Total time: 1 second >> ` >> >> The task doesn't even issue a warning message. >> >> Stefan >> >> - >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > as well as prints a message only in case it creates or deletes something. When there's nothing to create (the directory already exists) or delete (there's no such directory) it prints no message. You may try do run ant with parameter -d to see more output. Best regards Ondrej Svetlik - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: AW: Broken Junit targets
> -Original Message- > From: Taemin Cim [mailto:[EMAIL PROTECTED] > Sent: Thursday, 16 February 2006 1:22 PM > To: user@ant.apache.org > Subject: RE: AW: Broken Junit targets > > Hi All, > > Thanks so much for your help so far! But the saga continues... > I tried Jans approach, as well as some others. > Steve suggested the -v option, so I'm going to lay it all out here. The suggestion to run ant with the verbose switch (-v) was to get *you* to look at what *your* build is doing on *your* system. Based on your earlier comments it appears to me that something has changed on your system which is resulting in the unexpected failure of the build and basically you'll need to figure out what that problem is. Rather than trying to debug a build as is - I suggest you focus on the immediate issue of resolving the problem you have with the junit task execution. You can do this reasonably easily by creating a simple testcase and a minimal build file. For example: 1. create a new directory somewhere 2. create the following java source file in that directory // DemoTestCase.java import junit.framework.TestCase; public class DemoTestCase extends TestCase { public void testSomething() throws Exception { System.out.println( "Hello" ); } } 3. create a build file that will execute this testcase 4. run the build $ ant 5. check the output (should be something like the following) | Buildfile: build.xml | | build: | [javac] Compiling 1 source file to C:\dev\test\sample | | test: | [junit] Running DemoTestCase | [junit] Hello | [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.015 sec | | BUILD SUCCESSFUL | Total time: 2 seconds 6. if the build does not complete successfully then run ant again with the verbose option and try and figure out the reason (which should be clear given the simplicity of the project definition) 7. if the build is ok then compare what is happening in the sample build with your project (possibly by modifying the test project to use similar path definitions, test task parameterization, and so forth). Good luck! Cheers, Steve. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Troubles with Ant's configuration
Hi!!! My name is Deyner López Fernández, i´m new in this list and i´m new using Ant too. I download Ant(binary version) from it´s home page and read the manual. I follow all the steps to configure Ant as the Manual said but Ant sometimes works and sometimes not works in the same computersometimes the computer has been restartedthen Ant works. What should i do..?? Thanks. Deyner
RE: Filesets
Bejoy this is what I could try but its difficult to omit certain dir's if the same you apply on file it works and on dir's its not working Still I 'll try to find out. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: test for directory existence
If I understand correctly The objective (in this case the directory) was created by the first mkdir task but the 2nd mkdir task did not complete its task as the condition that the folder had already existed even though the 2nd mkdir task would be doing the same thing as the first task essentially the 2nd mkdir did not complete? Is this correct ? Diky/Vielen Danke, Martin- - Original Message - From: "Ondřej Světlík" <[EMAIL PROTECTED]> To: "Ant Users List" Sent: Thursday, February 16, 2006 8:31 AM Subject: Re: test for directory existence >> Stefan- >> I guess Im confused >> why doesnt mkdir show 2 success messages instead of the just the first >> success message? >> Martin- >> - Original Message - >> From: "Stefan Bodewig" <[EMAIL PROTECTED]> >> To: >> Sent: Thursday, February 16, 2006 12:18 AM >> Subject: Re: test for directory existence >> >> >>> On Wed, 15 Feb 2006, Martin Gainty <[EMAIL PROTECTED]> wrote: >>> *Not sure about delete* >>> >>> it will fail if you tell it to delete something that isn't there - >>> unless you set the quite attribute to true in which case it will >>> simply do nothing. >>> but I know mkdir will fail if the folder is already in place >>> >>> No it won't. >>> >>> , >>> | >>> | >>> | >>> | >>> ` >>> >>> leads to >>> >>> , >>> | [mkdir] Created dir: /tmp/foo >>> | >>> | BUILD SUCCESSFUL >>> | Total time: 1 second >>> ` >>> >>> The task doesn't even issue a warning message. >>> >>> Stefan >>> >>> - >>> To unsubscribe, e-mail: [EMAIL PROTECTED] >>> For additional commands, e-mail: [EMAIL PROTECTED] >>> >>> >> > > as well as prints a message only in case it creates or > deletes something. When there's nothing to create (the directory already > exists) or delete (there's no such directory) it prints no message. You > may try do run ant with parameter -d to see more output. > > Best regards > > Ondrej Svetlik > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Re: Troubles with Ant's configuration
Welcome Deyner, Please read http://www.catb.org/~esr/faqs/smart-questions.html on how to ask questions on a mailing list...at the top of the page (after the Table of Contents) it offers links for translated versions of the file (in case you are not fluent in English) Please provide some basic information...such as: What exception/error message are you getting when you are unable to run ANT on the computer? What operating system are you using? What is your %PATH%, %JAVA_HOME%, %ANT_HOME% (if set) environments variables set to? What version of ANT are you using (what does ant -version return) Help us help you , Ninju - Original Message From: KoloSSo <[EMAIL PROTECTED]> To: user@ant.apache.org Sent: Thursday, February 16, 2006 11:40:52 AM Subject: Troubles with Ant's configuration Hi!!! My name is Deyner López Fernández, i´m new in this list and i´m new using Ant too. I download Ant(binary version) from it´s home page and read the manual. I follow all the steps to configure Ant as the Manual said but Ant sometimes works and sometimes not works in the same computersometimes the computer has been restartedthen Ant works. What should i do..?? Thanks. Deyner
Re: Ant task equivalent to the "ln" unix command
I would use the exec task Executes a system command. When the os attribute is specified, the command is only executed when Ant is run on one of the specified operating systems. http://ant.apache.org/manual/CoreTasks/exec.html On 2/16/06, ar <[EMAIL PROTECTED]> wrote: > > Hi all, > > Does anybody know if there is an equivalent to the "ln" Unix command in > Ant or others projects built over Ant ? > My goal is to get a directory referenced through 2 different names. > > Regards > > -- > A. ROY > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- glenn - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Ant task equivalent to the "ln" unix command
There is the task, which only works on Unix systems (IIRC it works to a slight degree on Cygwin but I wouldn't recommend it). calls the ln executable, but be sure to read the manual and experiment thoroughly if you choose to use this task as its behavior is a little special and seems to give users fits at times. YMMV. -Matt --- glenn opdycke-hansen <[EMAIL PROTECTED]> wrote: > I would use the exec task > > > Executes a system command. When the os attribute is > specified, the > command is only executed when Ant is run on one of > the specified > operating systems. > > > http://ant.apache.org/manual/CoreTasks/exec.html > > On 2/16/06, ar <[EMAIL PROTECTED]> wrote: > > > > Hi all, > > > > Does anybody know if there is an equivalent to the > "ln" Unix command in > > Ant or others projects built over Ant ? > > My goal is to get a directory referenced through 2 > different names. > > > > Regards > > > > -- > > A. ROY > > > > > - > > To unsubscribe, e-mail: > [EMAIL PROTECTED] > > For additional commands, e-mail: > [EMAIL PROTECTED] > > > > > > > -- > glenn > > - > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Ant task equivalent to the "ln" unix command
Thanks, I would prefer a solution working on all operating systems like "copy" or "delete" do. Le Thu, 16 Feb 2006 15:48:48 +0100, glenn opdycke-hansen <[EMAIL PROTECTED]> a écrit: I would use the exec task Executes a system command. When the os attribute is specified, the command is only executed when Ant is run on one of the specified operating systems. http://ant.apache.org/manual/CoreTasks/exec.html On 2/16/06, ar <[EMAIL PROTECTED]> wrote: Hi all, Does anybody know if there is an equivalent to the "ln" Unix command in Ant or others projects built over Ant ? My goal is to get a directory referenced through 2 different names. Regards -- A. ROY - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- glenn - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- A. ROY - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: test for directory existence
IMHO. I don't think it is a matter of whether the second mkdir "completed" or not here. As Jan said, mkdir has the responsibility to make sure the directory exists when it ends. In the case of the first mkdir, the directory had to be created so mkdir said it did it. In the case of the second mkdir, the directory was already there so mkdir had nothing to do so it said nothing. In both cases mkdir "completed" its responsibility successfully. This is essentially what I would expect to see. It would probably be better if the -d output said that the directory was already there and the create was skipped but I would not want that much info in the standard message. Bill -Original Message- From: Martin Gainty [mailto:[EMAIL PROTECTED] Sent: Thursday, February 16, 2006 6:23 AM To: Ant Users List Subject: Re: test for directory existence If I understand correctly The objective (in this case the directory) was created by the first mkdir task but the 2nd mkdir task did not complete its task as the condition that the folder had already existed even though the 2nd mkdir task would be doing the same thing as the first task essentially the 2nd mkdir did not complete? Is this correct ? Diky/Vielen Danke, Martin- - Original Message - From: "Ondřej Světlík" <[EMAIL PROTECTED]> To: "Ant Users List" Sent: Thursday, February 16, 2006 8:31 AM Subject: Re: test for directory existence >> Stefan- >> I guess Im confused >> why doesnt mkdir show 2 success messages instead of the just the first >> success message? >> Martin- >> - Original Message - >> From: "Stefan Bodewig" <[EMAIL PROTECTED]> >> To: >> Sent: Thursday, February 16, 2006 12:18 AM >> Subject: Re: test for directory existence >> >> >>> On Wed, 15 Feb 2006, Martin Gainty <[EMAIL PROTECTED]> wrote: >>> *Not sure about delete* >>> >>> it will fail if you tell it to delete something that isn't there - >>> unless you set the quite attribute to true in which case it will >>> simply do nothing. >>> but I know mkdir will fail if the folder is already in place >>> >>> No it won't. >>> >>> , >>> | >>> | >>> | >>> | >>> ` >>> >>> leads to >>> >>> , >>> | [mkdir] Created dir: /tmp/foo >>> | >>> | BUILD SUCCESSFUL >>> | Total time: 1 second >>> ` >>> >>> The task doesn't even issue a warning message. >>> >>> Stefan >>> >>> - >>> To unsubscribe, e-mail: [EMAIL PROTECTED] >>> For additional commands, e-mail: [EMAIL PROTECTED] >>> >>> >> > > as well as prints a message only in case it creates or > deletes something. When there's nothing to create (the directory already > exists) or delete (there's no such directory) it prints no message. You > may try do run ant with parameter -d to see more output. > > Best regards > > Ondrej Svetlik > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Ant task equivalent to the "ln" unix command
If I were going to do this (and I probably wouldn't), I would DL www.sysinternals.com's JUNCTION utility and conditionally create a macro to call or based on the OS. That takes care of Windows and Unix-compatible environments... can't say about the rest. But I would expect this approach to necessitate numerous tweaks and so cannot truly recommend it. -Matt --- ar <[EMAIL PROTECTED]> wrote: > > Thanks, I would prefer a solution working on all > operating systems like > "copy" or "delete" do. > > Le Thu, 16 Feb 2006 15:48:48 +0100, glenn > opdycke-hansen > <[EMAIL PROTECTED]> a écrit: > > > I would use the exec task > > > > > > Executes a system command. When the os attribute > is specified, the > > command is only executed when Ant is run on one of > the specified > > operating systems. > > > > > > http://ant.apache.org/manual/CoreTasks/exec.html > > > > On 2/16/06, ar <[EMAIL PROTECTED]> wrote: > >> > >> Hi all, > >> > >> Does anybody know if there is an equivalent to > the "ln" Unix command in > >> Ant or others projects built over Ant ? > >> My goal is to get a directory referenced through > 2 different names. > >> > >> Regards > >> > >> -- > >> A. ROY > >> > >> > - > >> To unsubscribe, e-mail: > [EMAIL PROTECTED] > >> For additional commands, e-mail: > [EMAIL PROTECTED] > >> > >> > > > > > > -- > > glenn > > > > > - > > To unsubscribe, e-mail: > [EMAIL PROTECTED] > > For additional commands, e-mail: > [EMAIL PROTECTED] > > > > > > > > -- > A. ROY > > - > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Property vs. user property - what's the difference?
I once researched this... I think what happened was just that the author of used the wrong method call. I can say this without sounding too terrible because I did it once myself in Ant's code, except that my mistake was discovered soon enough to avoid compromising the API. Regarding , backward compatibility being taken as seriously as it is in Ant, the decision was made to let the error stand rather than break builds in the wild which depended on this behavior. If I have told this story incorrectly I'm sure one of the older hands will correct me. :) -Matt --- Patrick Martin <[EMAIL PROTECTED]> wrote: > Thanks a lot for this very useful and clear > information. > I am surprised to read that can override > properties. Is > there a reason for it? > Patrick M. > > On 2/16/06, Stefan Bodewig <[EMAIL PROTECTED]> > wrote: > > On Wed, 15 Feb 2006, Patrick Martin > <[EMAIL PROTECTED]> wrote: > > > > > Could you explain the "even more immutable" part > of your mail ? > > > > Sure. > > > > Properties are not immutable at all if you use > Ant's Java API. It's > > just that (almost[1]) all of the built-in Ant > tasks refuse to change > > the value of an existing property. But it is > trivial to write a task > > that changes the value of a property and in fact a > lot of people and > > projects have done so. > > > > There are five property setting methods in Ant's > Project class: > > > > setNewProperty- sets a property, will > never override an > > existing one - user > property or not. > > Used by almost all > built-in Ant tasks. > > setProperty - sets or overrides a > property, will never override > > a user property. Used by > . > > setPropertyInternal - same as setProperty but > without any warning if > > it overrides a property. > > setUserProperty - sets or overrides a user > property. Used when > > parsing the command line. > > setInheritedProperty - sets or overrides a user > property. Used for > > nested in Ant. > > > > So both "plain properties" and "user properties" > are in fact mutable > > if you use the Ant API. Only one of the five > setter methods will not > > overwrite an existing property, only two of them > will overwrite an > > existing user property - which makes user > properties "more immutable". > > > > Stefan > > > > Footnotes: > > [1] Since I know I'll have to explain the > "almost", will > > happily overwrite existing properties. > > > > > > > > > - > > To unsubscribe, e-mail: > [EMAIL PROTECTED] > > For additional commands, e-mail: > [EMAIL PROTECTED] > > > > > > - > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Real meaning of javac target/source attributes
It was my understanding that the target/source attributes in the javac task forced the compiled classes to be compatible with old versions. What I also assumed was that it wouldn't let me compile something if I was using an API that was newer than the 'target' attribute. For example, my task compiles code that contains the java.lang.Boolean.parseBoolean(String s) method just fine -- even though that method was introduced in Java 1.5 and I have my target and source set to 1.2. Is there any task or utility out there that will actually check to see if I am using an incompatible API -- without me having to download and install really old JDKs and compile with them? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Real meaning of javac target/source attributes
Your assumptions are incorrect; @target & @source have to do with language features and class file formats, not APIs. The only 100% safe way I know of to make sure you aren't using improper APIs is to make sure you are compiling against the class library from the *lowest common denominator* JDK version you need to support. There are other ways to accomplish this (and Ant itself makes use of some of those techniques) but you can't rely on those being 100% safe. -- Jeffrey E. (Jeff) Care ([EMAIL PROTECTED]) IBM WebSphere Application Server Development Matthew Hughes <[EMAIL PROTECTED]> wrote on 02/16/2006 03:30:50 PM: > It was my understanding that the target/source attributes in the javac > task forced the compiled classes to be compatible with old versions. > What I also assumed was that it wouldn't let me compile something if I > was using an API that was newer than the 'target' attribute. For > example, my task compiles code that contains the > java.lang.Boolean.parseBoolean(String s) method just fine -- even though > that method was introduced in Java 1.5 and I have my target and source > set to 1.2. > > Is there any task or utility out there that will actually check to see > if I am using an incompatible API -- without me having to download and > install really old JDKs and compile with them? > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] >
Calling one build file with another - please respond
My goal is do a checkout of each project and then do a build. For my first project when I run individually,I call ant so it works but for my 2nd project ...I had to ant -lib .\lib . it works too. How to pass this information to the 2nd build...using the ant task. The below mentioned doesn't work..suggestions...How to pass options .. If you have specifics , you need to clarify please do so.
Re: Troubles with Ant's configuration
Hi Deyner, KoloSSo wrote: > Hi!!! > > My name is Deyner López Fernández, i´m new in this list and i´m new using Ant > too. I download Ant(binary version) from it´s home page and read the manual. > I follow all the steps to configure Ant as the Manual said but Ant sometimes > works and sometimes not works in the same computersometimes the computer > has been restartedthen Ant works. > > What should i do..?? > The first thing you should do is give us more information about how Ant sometimes does not work. What is not working? How do you know it is not working? Is there an error message? What is it? > Thanks. > > Deyner - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Troubles with Ant's configuration
The word "sometimes" hints on a third party software that breaks the system. There are few candidates to look for - antiviruses and software firewalls. I have seen them affecting Java application (and only them!) in very strange ways. Personally I always disable them and for a long time I have had viruses only with newly reinstalled computers (even though they came with antiviruses installed), but you will need a broadband router to protect your computer at home. Or maybe it is an opposite - a worm intercepting system events affects ANT on your computer. Please check that other running applications do not deplete system resources - for example, memory and windows handles. Also hardware failures (memory, overheating, not enough power, etc.) can result in an unexplainable behaviour. Finally, your disk directory structure can be broken and you may need to run disk doctor to fix it. - Alexey. KoloSSo wrote: Hi!!! My name is Deyner López Fernández, i´m new in this list and i´m new using Ant too. I download Ant(binary version) from it´s home page and read the manual. I follow all the steps to configure Ant as the Manual said but Ant sometimes works and sometimes not works in the same computersometimes the computer has been restartedthen Ant works. What should i do..?? Thanks. Deyner - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: AW: Broken Junit targets
Hi again, Somehow my build is running tests again. I don't know what I did. I was asking questions on ##java, and a flame war started and then somehow everything worked. There is no moral or antidote, but I just wanted to thank you for your help. Peter, Jan, and especially Steve, thank you for reading my e-mails and especially for taking the time to respond. MY girlfriend knows about ant. She enjoys typing ant at the prompt and imagining tiny ants swarming around inside the computer. I try to tell her it's just one ant, but that it moves so fast it looks like a whole bunch of ants. But I guess I don't know what's really going on either. I just use the tools. So I guess I'll be back next year when my build breaks in some mysterious way. Iĺl be back. Until next time, keep up the good work. YOu guys do are doing a great thing. Tim. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Troubles with Ant's configuration
Thank you Alexey... I will chek immediately everything what you say to me in this mail Deyner - Original Message - From: "Alexey N. Solofnenko" <[EMAIL PROTECTED]> To: "Ant Users List" Sent: Thursday, February 16, 2006 4:49 PM Subject: Re: Troubles with Ant's configuration > The word "sometimes" hints on a third party software that breaks the > system. There are few candidates to look for - antiviruses and software > firewalls. I have seen them affecting Java application (and only them!) > in very strange ways. Personally I always disable them and for a long > time I have had viruses only with newly reinstalled computers (even > though they came with antiviruses installed), but you will need a > broadband router to protect your computer at home. Or maybe it is an > opposite - a worm intercepting system events affects ANT on your computer. > > Please check that other running applications do not deplete system > resources - for example, memory and windows handles. > > Also hardware failures (memory, overheating, not enough power, etc.) > can result in an unexplainable behaviour. Finally, your disk directory > structure can be broken and you may need to run disk doctor to fix it. > > - Alexey. > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Problems when initiating Ant
Hello again!!! When I tried to initiate Ant, he does not recognize the build.xml file who is located in %ANT_HOME%\bin directory. Instead, I receive the following output when i tried to initiate Ant: C:\ant\bin>ant Usage: java [-options] class [args...] (to execute a class) or java [-options] -jar jarfile [args...] (to execute a jar file) where options include: -client to select the "client" VM -server to select the "server" VM -hotspot is a synonym for the "client" VM [deprecated] The default VM is client. -cp . . . -esa | -enablesystemassertions enable system assertions -dsa | -disablesystemassertions disable system assertions The same output is launched every time I want to execute: C:\ant\bin>ant -diagnostics C:\ant\bin>ant -version .. I'm using Windows XP Professional Version 2002, Ant 1.6.5 (binary version), jdk1.4.2. I formed the Environment Variables of the following form: ANT_HOME=c:\ant\ JAVA_HOME=C:\Program Files\JBuilderX\jdk1.4\ PATH=C:\Program Files\JBuilderX\jdk1.4\bin\ ; C:\ant\bin\ Do I miss something?? Thanks, Deyner
Re: Property vs. user property - what's the difference?
On Thu, 16 Feb 2006, Patrick Martin <[EMAIL PROTECTED]> wrote: > I am surprised to read that can override properties. Is > there a reason for it? Matt got it almost right. Up to Ant 1.3 (I think) the check whether a property existed was inside of the task and not inside the setProperty method. This left task writers who wanted to keep properties immutable with implementing this check themselves ( for example). Then setProperty was "fixed" and we broke . I don't recall whether we broke any Gump[1] builds. In any case at that point had been known as a workaround if you really wanted to modify properties. This had been mentioned on the user list multiple times so we knew we'd break a lot of build files with the next release. setNewProperty was introduced and available used that. Stefan Footnotes: [1] http://gump.apache.org/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: test for directory existence
On Thu, 16 Feb 2006, Martin Gainty <[EMAIL PROTECTED]> wrote: > I guess Im confused why doesnt mkdir show 2 success messages instead > of the just the first success message? because the second task doesn't do anything. It does print something like "not creating foo since it already exists" in verbose mode. Stefan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: test for directory existence
On Thu, 16 Feb 2006, Jan Materne <[EMAIL PROTECTED]> wrote: > I tried with -v and -d. I think with -d we could print the skipping Oops, I assumed Ant did without checking the source. +1 Stefan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Real meaning of javac target/source attributes
On Thu, 16 Feb 2006, Jeffrey E. Care <[EMAIL PROTECTED]> wrote: > The only 100% safe way I know of to make sure you aren't using > improper APIs is to make sure you are compiling against the class > library from the *lowest common denominator* JDK version you need to > support. This is what happens in Ant as well. During development from time to time a committer will build and test Ant against a JDK 1.2. And doing so is part of the release process. Actually it is even worse than that, you have to compile the binary you publish using the lowest common denominator JDK, otherwise you may end up with binaries that don't work on the "lower" VM even though the source would compile fine. Say we have class A with a method public void doSomething(Object o) in version 1.2 and you invoke this in your code via doSomething(""). In version 1.3 an overload doSomething(String s) gets introduced. If you compile on JDK 1.2 everything is fine and if you do so on JDK 1.3 it is as well. But by compiling it on JDK 1.3 your class will be looking for the String signature at runtime and your code will fail with a NoSuchMethodError in a 1.2 VM. There are several examples of this in the Java class library. > There are other ways to accomplish this (and Ant itself makes use of > some of those techniques) but you can't rely on those being 100% > safe. Such as? I'm really curious. Stefan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problems when initiating Ant
On Fri, 17 Feb 2006, KoloSSo <[EMAIL PROTECTED]> wrote: > When I tried to initiate Ant, he does not recognize the build.xml > file who is located in %ANT_HOME%\bin directory. Instead, I receive > the following output when i tried to initiate Ant: > > C:\ant\bin>ant > Usage: java [-options] class [args...] [SNIP] What does your CLASSPATH environment variable look like? I vaguely recall that a CLASSPATH with a trailing backslash can corrupt the command line created in ant.bat. Same for CLASSPATH values containing quotes. Stefan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: Troubles with Ant's configuration
>What should i do..?? Provide more information :-) What do "ant -v" and "ant -diagnostics" say? What are your environment variables PATH, CLASSPATH, ANT_HOME, JAVA_HOME? What is the error message? Jan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]