Multiple conditions satisfying in an ant target
Hi All, I have two separate conditions using equals operator. There is an ant call to a target. This target has a check for unless with one of the conditions. How do I include another unless such tat the second condition is also included in this single ant target. eg: Start something new Here how do i inclue isbad also as an unless condition to the same target antcall? -- View this message in context: http://www.nabble.com/Multiple-conditions-satisfying-in-an-ant-target-tp20261337p20261337.html Sent from the Ant - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Multiple conditions satisfying in an ant target
-Original Message- From: sukanya [mailto:[EMAIL PROTECTED] Sent: Friday, October 31, 2008 8:48 AM To: user@ant.apache.org Subject: Multiple conditions satisfying in an ant target /* [...] Start something new Here how do i inclue isbad also as an unless condition to the same target antcall? */ The unless/if attributes from target takes only only one value, so you have to combine your conditions like that = Start something new Regards, Gilbert - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Multiple conditions satisfying in an ant target
Hi Gilbert, It works!. I forgot to mention tat either one of these these conditions may be false and still should work. I replaced with and that also works :) thanks so much for your timely help. Rebhan, Gilbert wrote: > > > -Original Message- > From: sukanya [mailto:[EMAIL PROTECTED] > Sent: Friday, October 31, 2008 8:48 AM > To: user@ant.apache.org > Subject: Multiple conditions satisfying in an ant target > > /* > [...] > > > > > > > > > > > > > > Start something new > > > > Here how do i inclue isbad also as an unless condition to the same target > antcall? > */ > > The unless/if attributes from target takes only only one value, so you > have > to combine your conditions like that = > > > > > > > > > > > Start something new > > > > Regards, Gilbert > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/Multiple-conditions-satisfying-in-an-ant-target-tp20261337p20261787.html Sent from the Ant - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Problem with executing aliases
Hi I've several aliases defind in ~/.cshrc file when I'am trying to execute dem from sshexec it allways returns a message then my command was not found i'am trying to do something like this : what should be done to execute this ? -- View this message in context: http://www.nabble.com/Problem-with-executing-aliases-tp20261855p20261855.html Sent from the Ant - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
ANT_OPTS programatically
Hi, Before, I was using the ANT_OPTS environment variable to give more memory to ant for the build to be done. Now, I am calling ant programmatically this way: File buildFile = new File("build.xml"); Project p = new Project(); DefaultLogger consoleLogger = new DefaultLogger(); consoleLogger.setErrorPrintStream(System.err); consoleLogger.setOutputPrintStream(System.out); consoleLogger.setMessageOutputLevel(Project.MSG_VERBOSE); p.addBuildListener(consoleLogger); p.setUserProperty("ant.file", buildFile.getAbsolutePath()); p.setProperty("repos.url", model.getReposUrl()); p.setProperty("repos.username", model.getReposUsername()); p.setProperty("repos.password", model.getReposPassword()); p.setProperty("repos.revision", model.getReposRevision()); p.init(); ProjectHelper helper = ProjectHelper.getProjectHelper(); p.addReference("ant.projectHelper", helper); helper.parse(p, buildFile); p.executeTarget(task); I am still setting this variable, but looks like it's now not considered and the build fails with an Java Heap Space exception. But if I run the build directly with ant in the console, the build passes, I tried giving more memory to my java application using the -Xmx argument, but doesn't change anything. Any advice ? Pascal Lalonde Technicien de service / Développeur logiciel / Test [EMAIL PROTECTED] COMACT Équipements Comact Inc. 3675 boul. de la Grande-Allée, Boisbriand (Québec) J7H 1H5 Tél: 450 435 2121 x 296 Fax: 450 430 3407
RE: ANT_OPTS programatically
Was this the right place to ask this ? - Pascal -Original Message- From: Pascal Lalonde [mailto:[EMAIL PROTECTED] Sent: October 31, 2008 9:45 AM To: user@ant.apache.org Subject: ANT_OPTS programatically Hi, Before, I was using the ANT_OPTS environment variable to give more memory to ant for the build to be done. Now, I am calling ant programmatically this way: File buildFile = new File("build.xml"); Project p = new Project(); DefaultLogger consoleLogger = new DefaultLogger(); consoleLogger.setErrorPrintStream(System.err); consoleLogger.setOutputPrintStream(System.out); consoleLogger.setMessageOutputLevel(Project.MSG_VERBOSE); p.addBuildListener(consoleLogger); p.setUserProperty("ant.file", buildFile.getAbsolutePath()); p.setProperty("repos.url", model.getReposUrl()); p.setProperty("repos.username", model.getReposUsername()); p.setProperty("repos.password", model.getReposPassword()); p.setProperty("repos.revision", model.getReposRevision()); p.init(); ProjectHelper helper = ProjectHelper.getProjectHelper(); p.addReference("ant.projectHelper", helper); helper.parse(p, buildFile); p.executeTarget(task); I am still setting this variable, but looks like it's now not considered and the build fails with an Java Heap Space exception. But if I run the build directly with ant in the console, the build passes, I tried giving more memory to my java application using the -Xmx argument, but doesn't change anything. Any advice ? Pascal Lalonde Technicien de service / Développeur logiciel / Test [EMAIL PROTECTED] COMACT Équipements Comact Inc. 3675 boul. de la Grande-Allée, Boisbriand (Québec) J7H 1H5 Tél: 450 435 2121 x 296 Fax: 450 430 3407 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem with executing aliases
On Fri, Oct 31, 2008 at 01:40:56AM -0700, azajac wrote: > I've several aliases defind in ~/.cshrc file > > when I'am trying to execute dem from sshexec it allways returns a message > then my command was not found i'am trying to do something like this : > > > > trust="true" > command="source ~/.cshrc; myAlias"/> > I don't know if it's possible to do it this way since aliases behave a little strangely, especially in a non-interactive context. I think a better way would be to move the functionality of your alias into a proper script and to call that script from ant: $ cat foo.csh #!/bin/csh ls | grep foo | process_foo hth, tyler - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Conditional depends clause
Hi, I have this in my build.xml file What I would like, however, is to only have one depends option depending on what a variable "env" is, which is passed to my script. So, for example, if env = "dev", I would like to execute only the "copyDevConf" option above. How do I configure this in ANT? Thanks, - Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Conditional depends clause
I think you'll need to define an unless attribute on each of the depends targets. So, for example: depends="copyDevConf,copyIntConf,copyQaConf,copyProdConf" /> ... On Fri, 31 Oct 2008, [EMAIL PROTECTED] wrote: Hi, I have this in my build.xml file What I would like, however, is to only have one depends option depending on what a variable "env" is, which is passed to my script. So, for example, if env = "dev", I would like to execute only the "copyDevConf" option above. How do I configure this in ANT? Thanks, - Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Scot P. Floess 27 Lake Royale Louisburg, NC 27549 252-478-8087 (Home) 919-754-4592 (Work) Chief Architect JPlate http://sourceforge.net/projects/jplate Chief Architect JavaPIM http://sourceforge.net/projects/javapim Architect Keros http://sourceforge.net/projects/keros - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How to pass a file to an Ant build.xml process from command line?
Normally I use Ant by clicking on a pre-defined build.xml process inside e.g. Eclipse. However sometimes I would appreciate to have the chance to call Ant and an Ant build.xml script from command line and pass e.g. a file to it. Something like: java org.apache.ant.executescript D:\myproj\tbuild.xml D:\myproj\test222\somefile.java Can I do this somehow? If yes: how exactly would the command lokk like and how would I refer to the passed file (=parameter) from inside build.xml? Ben - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to pass a file to an Ant build.xml process from command line?
Oops. Never mind.. I missed the eclipse part of your question. Morgan From: Morgan Kinne/Raleigh/IBM To: "Ant Users List" Date: 10/31/2008 03:43 PM Subject: Re: How to pass a file to an Ant build.xml process from command line? First on the command line try: ant -help This will show you the command line options. You will notice: ant -buildfile myfavoritebuildfile.xml is the option you are looking for. Morgan From: "Ben Stover" <[EMAIL PROTECTED]> To: "Ant Users List" Date: 10/31/2008 02:55 PM Subject: How to pass a file to an Ant build.xml process from command line? Normally I use Ant by clicking on a pre-defined build.xml process inside e.g. Eclipse. However sometimes I would appreciate to have the chance to call Ant and an Ant build.xml script from command line and pass e.g. a file to it. Something like: java org.apache.ant.executescript D:\myproj\tbuild.xml D:\myproj\test222\somefile.java Can I do this somehow? If yes: how exactly would the command lokk like and how would I refer to the passed file (=parameter) from inside build.xml? Ben - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to pass a file to an Ant build.xml process from command line?
First on the command line try: ant -help This will show you the command line options. You will notice: ant -buildfile myfavoritebuildfile.xml is the option you are looking for. Morgan From: "Ben Stover" <[EMAIL PROTECTED]> To: "Ant Users List" Date: 10/31/2008 02:55 PM Subject: How to pass a file to an Ant build.xml process from command line? Normally I use Ant by clicking on a pre-defined build.xml process inside e.g. Eclipse. However sometimes I would appreciate to have the chance to call Ant and an Ant build.xml script from command line and pass e.g. a file to it. Something like: java org.apache.ant.executescript D:\myproj\tbuild.xml D:\myproj\test222\somefile.java Can I do this somehow? If yes: how exactly would the command lokk like and how would I refer to the passed file (=parameter) from inside build.xml? Ben - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to pass a file to an Ant build.xml process from command line?
You can use your tbuild.xml with -f $ ant -f tbuild.xml For parameter you can write inside your build file eg. ...="${yourFile}" ... $ ant -f tbuild.xml -DyourFile=someFile.java rgds, --- On Sat, 11/1/08, Ben Stover <[EMAIL PROTECTED]> wrote: > From: Ben Stover <[EMAIL PROTECTED]> > Subject: How to pass a file to an Ant build.xml process from command line? > To: "Ant Users List" > Date: Saturday, November 1, 2008, 2:52 AM > Normally I use Ant by clicking on a pre-defined build.xml > process inside e.g. Eclipse. > > However sometimes I would appreciate to have the chance to > call Ant and an Ant build.xml script > from command line and pass e.g. a file to it. Something > like: > > java org.apache.ant.executescript > D:\myproj\tbuild.xml > D:\myproj\test222\somefile.java > > Can I do this somehow? > > If yes: how exactly would the command lokk like and how > would I refer > to the passed file (=parameter) from inside build.xml? > > Ben > > > > > > > > - > 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]