Regarding build.xml display in command prompt
hi, When i ran a build.xml using Ant i do not want to display the ant task in the output screen(command pormpt).Is any method or a way to do this... if so let me inform... Regards, Lokesh
ant run command piping and get out put to value
Hi, I need Ant to run some commands and save out put to a property value. how can i achive that. For example command: svn info | grep version I need to put output of the above command to property called 'svninfo'. And also how can i pipe commands using Ants exec. Thanks, Raju Now that's room service! Choose from over 150,000 hotels in 45,000 destinations on Yahoo! Travel to find your fit. http://farechase.yahoo.com/promo-generic-14795097 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
test, please ignore
I appear to be missing emails... >:( Yahoo! Music Unlimited Access over 1 million songs. http://music.yahoo.com/unlimited - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ant run command piping and get out put to value
Hello, The task allows you execute any abritary commandline (including pipes) string. The task also has a 'outputproperty' attribute that allows you define the name of a property whose value will be the output the commandline execution Good Luck, Ninju - Original Message From: Mr raju varghese <[EMAIL PROTECTED]> To: user@ant.apache.org Sent: Saturday, February 10, 2007 3:42:07 AM Subject: ant run command piping and get out put to value Hi, I need Ant to run some commands and save out put to a property value. how can i achive that. For example command: svn info | grep version I need to put output of the above command to property called 'svninfo'. And also how can i pipe commands using Ants exec. Thanks, Raju Now that's room service! Choose from over 150,000 hotels in 45,000 destinations on Yahoo! Travel to find your fit. http://farechase.yahoo.com/promo-generic-14795097 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] No need to miss a message. Get email on-the-go with Yahoo! Mail for Mobile. Get started. http://mobile.yahoo.com/mail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Ant 1.7.0 can't find Junit in ${user.home}/.ant/lib
At 02:00 PM 2/9/2007, you wrote: >On 2/9/07, Burgess, Benjamin <[EMAIL PROTECTED]> wrote: >> Sounds like something I have seen before: >> >> http://sourceforge.net/tracker/index.php?func=detail&aid=1468822&group_i >> d=130558&atid=720017 >> >> Basically, java.net.URL.getFile() had a bug that would return an >> incorrect String if the file is not on the same windows drive letter as >> the working directory. >> >> Ben >> >> -Original Message- >> From: Jacob Kjome [mailto:[EMAIL PROTECTED] >> Sent: Friday, February 09, 2007 11:36 AM >> To: Ant Users List >> Subject: Re: Ant 1.7.0 can't find Junit in ${user.home}/.ant/lib >> >> >> I am using Windows. And it works just fine with Ant-1.6.5 no matter the >> JDK. >> But under JDK1.3.1 with Ant-1.7.0, it fails (but works with JDK1.6). My >> user >> home is like any normal windows machine >> >> C:\Documents and Settings\jkjome\.ant\lib >> >> And when I copy junit.jar from my .ant/lib to ${ant.home}/lib, it works >> just >> fine. Here's my ant.home >> >> D:\java\apache-ant-1.7.0 >> >> >> Can someone with a Windows machine try this? Really, I'm not making >> this up. > >Can you file a bug with the information - it is >most likely a bug in the jdk like that described by Benjamin. >Ant may be able to work around it. > >As a work-around with Ant 1.7.0, one can place >the junit.jar file in the classpath element of the >junit task - so perhaps > > > > > >May work? > I've reported it: http://issues.apache.org/bugzilla/show_bug.cgi?id=41587 The work around is easier than that. Just put it in ${ant.home}/lib and it works fine no matter the JDK, no matter the Ant version. Remember Ant-1.6.5 **always** works no matter where junit.jar is and no matter the JDK. It tried putting the build file on my C:\ drive, the same drive as ${user.home}/.ant/lib and it didn't make any difference. Of course, Ant itself is on my E:\ drive, so I don't know if that makes a difference, but it doesn't matter for Ant-1.6.5, so I don't know why it should for Ant-1.7.0? Seems to me it's a bug in the Ant-1.7.0 task, but it only shows its ugly head under certain conditions, such as under JDK1.3.1 on a WinXP box. Jake >Peter > > >> >> Jake >> >> Quoting Peter Reilly <[EMAIL PROTECTED]>: >> >> > I have tested with JDK 1.3 and it works: >> > ~/learning/a/junit> ant -debug >> > Apache Ant version 1.7.0 compiled on December 13 2006 >> > Buildfile: build.xml >> > Adding reference: ant.PropertyHelper >> > Detected Java version: 1.3 in: /usr/java/jdk1.3.1_18/jre >> > Detected OS: Linux >> > Adding reference: ant.ComponentHelper >> > Setting ro project property: ant.file -> >> > /home/reilly/learning/a/junit/build.xml >> > Adding reference: ant.projectHelper >> > Adding reference: ant.parsing.context >> > Adding reference: ant.targets >> > parsing buildfile /home/reilly/learning/a/junit/build.xml with URI = >> > file:///home/reilly/learning/a/junit/build.xml >> > Project base dir set to: /home/reilly/learning/a/junit >> > +Target: >> > +Target: -check.junit.exists >> > +Target: -check.junit >> > +Target: build.something >> > Attempting to create object of type >> > org.apache.tools.ant.helper.DefaultExecutor >> > Adding reference: ant.executor >> > Build sequence for target(s) `build.something' is >> > [-check.junit.exists, -check.junit, build.something] >> > Complete build sequence is [-check.junit.exists, -check.junit, >> > build.something, ] >> > >> > -check.junit.exists: >> > [antlib:org.apache.tools.ant] Could not load definitions from resource >> > org/apache/tools/ant/antlib.xml. It could not be found. >> > Setting project property: junit.exists -> true >> > >> > -check.junit: >> > Skipped because property 'junit.exists' set. >> > >> > build.something: >> > >> > BUILD SUCCESSFUL >> > Total time: 0 seconds >> > >> > >> > Are you running on windows? >> > If so there may be the usual problems with spaces and >> > perhaps the location of user.home. >> > >> > Peter >> > >> > On 2/9/07, Jacob Kjome <[EMAIL PROTECTED]> wrote: >> > > >> > > Hi Peter, >> > > >> > > Can you take another look at this? I apologize that I did not point >> > > it out in the original email, but the problem is specifically with >> > > older JVM's such as JDK1.3.1. I happened to be using it for >> building >> > > the project where I found the problem. I just didn't realize it was >> > > specific to JDK1.3.1 until I tried with JDK1.6. I only tried JDK1.6 >> > > after you failed to reproduce the behavior and I saw you were using >> JDK1.5. >> > > >> > > I think this got lost in the shuffle of the current religious debate >> > > over whether XML is a scripting language. How about we fix this >> > > issue first and then move on to that never-ending debate. BTW, >> > > everyone realizes that the Gant project exists, right? >> > > >> > > http://groovy.codehaus.org/Gant >> > > >> > > >> > > Jake >> > > >> > > At 10:27 AM 2/7/2007, you wrote: >> > > > >> > > >Hi Peter, >> > > > >>
Re: Ant 1.7.0 can't find Junit in ${user.home}/.ant/lib
Hello Jake, I remember that the code concerning translating File to URL has been kind of 90% rewritten between 1.6.5 and 1.7.0, and delegates more to the JDK than before. I should have a look at your bug report on my computer in the office which has XP. I just need to download JDK 1.3. Regards, Antoine On Feb 10, 2007, at 12:45 PM, Jacob Kjome wrote: At 02:00 PM 2/9/2007, you wrote: >On 2/9/07, Burgess, Benjamin <[EMAIL PROTECTED]> wrote: >> Sounds like something I have seen before: >> >> http://sourceforge.net/tracker/index.php? func=detail&aid=1468822&group_i >> d=130558&atid=720017 >> >> Basically, java.net.URL.getFile() had a bug that would return an >> incorrect String if the file is not on the same windows drive letter as >> the working directory. >> >> Ben >> >> -Original Message- >> From: Jacob Kjome [mailto:[EMAIL PROTECTED] >> Sent: Friday, February 09, 2007 11:36 AM >> To: Ant Users List >> Subject: Re: Ant 1.7.0 can't find Junit in ${user.home}/.ant/lib >> >> >> I am using Windows. And it works just fine with Ant-1.6.5 no matter the >> JDK. >> But under JDK1.3.1 with Ant-1.7.0, it fails (but works with JDK1.6). My >> user >> home is like any normal windows machine >> >> C:\Documents and Settings\jkjome\.ant\lib >> >> And when I copy junit.jar from my .ant/lib to ${ant.home}/lib, it works >> just >> fine. Here's my ant.home >> >> D:\java\apache-ant-1.7.0 >> >> >> Can someone with a Windows machine try this? Really, I'm not making >> this up. > >Can you file a bug with the information - it is >most likely a bug in the jdk like that described by Benjamin. >Ant may be able to work around it. > >As a work-around with Ant 1.7.0, one can place >the junit.jar file in the classpath element of the >junit task - so perhaps > > > > > >May work? > I've reported it: http://issues.apache.org/bugzilla/show_bug.cgi?id=41587 The work around is easier than that. Just put it in ${ant.home}/ lib and it works fine no matter the JDK, no matter the Ant version. Remember Ant-1.6.5 **always** works no matter where junit.jar is and no matter the JDK. It tried putting the build file on my C:\ drive, the same drive as ${user.home}/.ant/lib and it didn't make any difference. Of course, Ant itself is on my E:\ drive, so I don't know if that makes a difference, but it doesn't matter for Ant-1.6.5, so I don't know why it should for Ant-1.7.0? Seems to me it's a bug in the Ant-1.7.0 task, but it only shows its ugly head under certain conditions, such as under JDK1.3.1 on a WinXP box. Jake >Peter > > >> >> Jake >> >> Quoting Peter Reilly <[EMAIL PROTECTED]>: >> >> > I have tested with JDK 1.3 and it works: >> > ~/learning/a/junit> ant -debug >> > Apache Ant version 1.7.0 compiled on December 13 2006 >> > Buildfile: build.xml >> > Adding reference: ant.PropertyHelper >> > Detected Java version: 1.3 in: /usr/java/jdk1.3.1_18/jre >> > Detected OS: Linux >> > Adding reference: ant.ComponentHelper >> > Setting ro project property: ant.file -> >> > /home/reilly/learning/a/junit/build.xml >> > Adding reference: ant.projectHelper >> > Adding reference: ant.parsing.context >> > Adding reference: ant.targets >> > parsing buildfile /home/reilly/learning/a/junit/build.xml with URI = >> > file:///home/reilly/learning/a/junit/build.xml >> > Project base dir set to: /home/reilly/learning/a/junit >> > +Target: >> > +Target: -check.junit.exists >> > +Target: -check.junit >> > +Target: build.something >> > Attempting to create object of type >> > org.apache.tools.ant.helper.DefaultExecutor >> > Adding reference: ant.executor >> > Build sequence for target(s) `build.something' is >> > [-check.junit.exists, -check.junit, build.something] >> > Complete build sequence is [-check.junit.exists, -check.junit, >> > build.something, ] >> > >> > -check.junit.exists: >> > [antlib:org.apache.tools.ant] Could not load definitions from resource >> > org/apache/tools/ant/antlib.xml. It could not be found. >> > Setting project property: junit.exists -> true >> > >> > -check.junit: >> > Skipped because property 'junit.exists' set. >> > >> > build.something: >> > >> > BUILD SUCCESSFUL >> > Total time: 0 seconds >> > >> > >> > Are you running on windows? >> > If so there may be the usual problems with spaces and >> > perhaps the location of user.home. >> > >> > Peter >> > >> > On 2/9/07, Jacob Kjome <[EMAIL PROTECTED]> wrote: >> > > >> > > Hi Peter, >> > > >> > > Can you take another look at this? I apologize that I did not point >> > > it out in the original email, but the problem is specifically with >> > > older JVM's such as JDK1.3.1. I happened to be using it for >> building >> > > the project where I found the problem. I just didn't realize it was >> > > specific to JDK1.3.1 until I tried with JDK1.6. I only tried JDK1.6 >> > > after you failed to reproduce the behavior and I saw you were using >> JDK1.5. >> > > >> > > I think this got lost
Re: Regarding build.xml display in command prompt
Hello Lokesh, try ant -quiet (do not know whether this will do what you want). you can also write your own logger class if you want to program in Java. see the running ant part of the documentation. http://ant.apache.org/ manual/running.html#options Antoine On Feb 10, 2007, at 4:40 AM, Lokesh Jayaraman wrote: hi, When i ran a build.xml using Ant i do not want to display the ant task in the output screen(command pormpt).Is any method or a way to do this... if so let me inform... Regards, Lokesh - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: FTP for Japanese file names
Hello Sann, On Feb 9, 2007, at 10:54 PM, Sann Maung wrote: I am using FTP task to transfer the files using ant. Under normal circumstances, it is working fine. However, if the filenames are in Japanese characters, (eg. Kanji) then it becomes an error and the file transfer cannot continue. do you mean that your build.xml file contains really some kanjis, for instance in the remotedir attribute ? or have some of the files which are under somedir and which match download/**/** japanese names ? It would be interesting if you could download both the sources of ant and the sources of commons-net and debug that to find out what is going wrong. In theory everything Java supports all languages, but between theory and practice ... I thought that kanji needs UTF-16, so I tried to change the encoding to UTF-16. It causes another error. Looks like I am not allowed to define in build.xml file as encoding UTF-16. I do not think that the encoding of your build file is the problem, and the encoding of the build file does not affect how ant and the libraries used by ant such as commons-net work. So you can stick to UTF-8. I am not sure. Can anybody suggest a way to do it? Best regards, Antoine - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]