AntClassLoader2 broken ? (Reported as bug id: 36838)
Hi, My JVM (Sun 1.5.0_04) shows that the Jboss class org.jnp.interfaces.NamingContextFactory is loaded from ant.jar. Here's the output when I start ant with plain 'ant' call (without any -lib parameter and ANT_OPTS is set to -verbose:class) [FalezDeployRMI] FalezDeployRMI is running [FalezDeployRMI] 0 [Loaded com.sun.naming.internal.ResourceManager from c:\dev\java\jdk\jre\lib\rt.jar] [Loaded com.sun.naming.internal.VersionHelper from c:\dev\java\jdk\jre\lib\rt.jar] [Loaded com.sun.naming.internal.VersionHelper12 from c:\dev\java\jdk\jre\lib\rt.jar] [Loaded java.util.WeakHashMap from shared objects file] [Loaded java.util.WeakHashMap$Entry from shared objects file] [Loaded com.sun.naming.internal.VersionHelper12$2 from c:\dev\java\jdk\jre\lib\rt.jar] [Loaded com.sun.naming.internal.VersionHelper12$6 from c:\dev\java\jdk\jre\lib\rt.jar] [Loaded com.sun.naming.internal.VersionHelper12$5 from c:\dev\java\jdk\jre\lib\rt.jar] [Loaded javax.naming.NamingEnumeration from c:\dev\java\jdk\jre\lib\rt.jar] [Loaded com.sun.naming.internal.VersionHelper12$InputStreamEnumeration from c:\dev\java\jdk\jre\lib\rt.jar] [Loaded com.sun.naming.internal.VersionHelper12$InputStreamEnumeration$1 from c:\dev\java\jdk\jre\lib\rt.jar] [Loaded com.sun.naming.internal.VersionHelper12$4 from c:\dev\java\jdk\jre\lib\rt.jar] [FalezDeployRMI] 1 [Loaded javax.naming.spi.InitialContextFactory from c:\dev\java\jdk\jre\lib\rt.jar] [Loaded javax.naming.spi.ObjectFactory from c:\dev\java\jdk\jre\lib\rt.jar] [Loaded org.jnp.interfaces.NamingContextFactory from file:/C:/dev/tools/ant/lib/ant.jar] [Loaded javax.naming.Name from c:\dev\java\jdk\jre\lib\rt.jar] [FalezDeployRMI] 2 [Loaded org.apache.tools.ant.util.DateUtils from file:/C:/dev/tools/ant/lib/ant.jar] [Loaded java.text.ChoiceFormat from c:\dev\java\jdk\jre\lib\rt.jar] [Loaded java.text.MessageFormat from shared objects file] [Loaded java.text.MessageFormat$Field from shared objects file] Note: FalezDeployRMI is a custom Ant task. However, the class is in fact stored in Jboss jars. Indeed, when I start ant as 'ant -ant -lib c:\dev\tools\zzjboss\client\jbossall-client.jar', the output is now correct: [FalezDeployRMI] FalezDeployRMI is running [FalezDeployRMI] 0 [Loaded com.sun.naming.internal.ResourceManager from c:\dev\java\jdk\jre\lib\rt.jar] [Loaded com.sun.naming.internal.VersionHelper from c:\dev\java\jdk\jre\lib\rt.jar] [Loaded com.sun.naming.internal.VersionHelper12 from c:\dev\java\jdk\jre\lib\rt.jar] [Loaded java.util.WeakHashMap from shared objects file] [Loaded java.util.WeakHashMap$Entry from shared objects file] [Loaded com.sun.naming.internal.VersionHelper12$2 from c:\dev\java\jdk\jre\lib\rt.jar] [Loaded com.sun.naming.internal.VersionHelper12$6 from c:\dev\java\jdk\jre\lib\rt.jar] [Loaded com.sun.naming.internal.VersionHelper12$5 from c:\dev\java\jdk\jre\lib\rt.jar] [Loaded javax.naming.NamingEnumeration from c:\dev\java\jdk\jre\lib\rt.jar] [Loaded com.sun.naming.internal.VersionHelper12$InputStreamEnumeration from c:\dev\java\jdk\jre\lib\rt.jar] [Loaded com.sun.naming.internal.VersionHelper12$InputStreamEnumeration$1 from c:\dev\java\jdk\jre\lib\rt.jar] [Loaded com.sun.naming.internal.VersionHelper12$4 from c:\dev\java\jdk\jre\lib\rt.jar] [FalezDeployRMI] 1 [Loaded javax.naming.spi.InitialContextFactory from c:\dev\java\jdk\jre\lib\rt.jar] [Loaded javax.naming.spi.ObjectFactory from c:\dev\java\jdk\jre\lib\rt.jar] [Loaded org.jnp.interfaces.NamingContextFactory from file:/c:/dev/tools/zzjboss/client/jbossall-client.jar] [Loaded javax.naming.Name from c:\dev\java\jdk\jre\lib\rt.jar] [FalezDeployRMI] 2 [Loaded org.apache.tools.ant.util.DateUtils from file:/C:/dev/tools/ant/lib/ant.jar] Don't understand why Ant classloader (maybe delegating to parent classloader) reports that it loads a nonexisting class from the ant.jar library. Here's the excerpt from the build.xml file: And the task only performs the following (stripped down version): @Override public void execute() throws BuildException { try { log("0"); InitialContext context = new InitialContext(); log("1"); NamingContextFactory factory = new NamingContextFactory(); log("2"); } catch (Exception e) { e.printStackTrace(); } Thanks for your time, Bulent Erdemir Bu mesaj ve onunla iletilen tum ekler gonderildigi kisi ya da kuruma ozel ve Bankalar Kanunu geregince, gizlilik yukumlulugu tasiyor olabilir. Bu mesaj, hicbir sekilde, herhangi bir amac icin cogaltilamaz, yayinlanamaz ve para karsiligi satilamaz; mesajin yetkili alicisi veya alicisina iletmekten sorumlu kisi degilseniz, mesaj icerigini ya da eklerini kopyalamayiniz, ya
AW: Problems with optional tasks
Your output of java.class.path is /usr/local/ant/lib/ant-launcher.jar:/usr/local/ant/lib/ant-jdepend.jar:/usr/local/ant/lib/ant-trax.jar:/usr/local/ant/lib/ant.jar:/usr/local/ant/lib/ant-starteam.jar:/usr/local/ant/lib/ant-launcher.jar:/usr/local/ant/lib/ant-stylebook.jar:/usr/local/ant/lib/ant-jai.jar:/usr/local/ant/lib/ant-swing.jar:/usr/local/ant/lib/ant-weblogic.jar:/usr/local/ant/lib/ant-netrexx.jar:/usr/local/ant/lib/ant-xalan1.jar:/usr/local/ant/lib/ant-jsch.jar:/usr/local/ant/lib/ant-antlr.jar:/usr/local/ant/lib/ant-xslp.jar:/usr/local/ant/lib/ant-junit.jar:/usr/local/ant/lib/ant-vaj.jar:/usr/local/ant/lib/ant-apache-bcel.jar:/usr/local/ant/lib/ant-apache-bsf.jar:/usr/local/ant/lib/ant-apache-resolver.jar:/usr/local/ant/lib/ant-icontract.jar:/usr/local/ant/lib/ant-apache-oro.jar:/usr/local/ant/lib/ant-javamail.jar:/usr/local/ant/lib/ant-nodeps.jar:/usr/local/ant/lib/ant-commons-net.jar:/usr/local/ant/lib/ant-apache-log4j.jar:/usr/local/ant/lib/ant-jmf.jar:/usr/local/ant/lib/ant-apache-regexp.jar:/usr/local/ant/lib/ant-commons-logging.jar:/usr/local/ant/lib/xml-apis.jar:/usr/local/ant/lib/xercesImpl.jar:/usr/local/j2sdk1.4.2_02/lib/tools.jar Searching for "sch" gives me only - /usr/local/ant/lib/ant-jsch.jar That jar contains the task itself, but not the required external lib. So you have to install that. Jan >-Ursprüngliche Nachricht- >Von: Pete Cain [mailto:[EMAIL PROTECTED] >Gesendet: Dienstag, 20. September 2005 08:02 >An: user@ant.apache.org >Betreff: Problems with optional tasks > >Hi, > >I've written an ant script that successfully uses scp. >However I'm finding that script does not work on all the boxes >I needed it to. > >I've successfully used the scp task with ant-1.6.2 installed >from jpackage.org on 2 different machines (RH9 and FC3). > >However installing the binary version from the web site >ant-1.6.5 setting ANT_HOME, JAVA_HOME and PATH accordingly >always results in failure. The error message states that it >can't find the 'scp' task and list a bunch of things to check. > >Looking at the ant diagnostic output it lists the jsch jar but >indicates that the scp task isn't available, this follows for >other jars which are list with out associated tasks being present. > >I've been over the documentation tried copying the ant.conf >and ant.d/ from jpackage installations, downgrading to >ant-1.6.2 amongst a raft of other things and I have been >unable get anywhere. > >Is anyone able to give me some idea on what might be going on here ? > >Thanks in advance > >Pete. > > ># ant -diagnostics >--- Ant diagnostics report --- >Apache Ant version 1.6.5 compiled on September 20 2005 > >--- > Implementation Version (JDK1.2+ only) >--- >core tasks : 1.6.5 >optional tasks : 1.6.5 > >--- > ANT_HOME/lib jar listing >--- >ant.home: /usr/local/ant >ant-jdepend.jar (473 bytes) >ant-trax.jar (66589 bytes) >ant.jar (1021517 bytes) >ant-starteam.jar (473 bytes) >ant-launcher.jar (9162 bytes) >ant-stylebook.jar (473 bytes) >ant-jai.jar (473 bytes) >ant-swing.jar (6726 bytes) >ant-weblogic.jar (473 bytes) >ant-netrexx.jar (473 bytes) >ant-xalan1.jar (473 bytes) >ant-jsch.jar (473 bytes) >ant-antlr.jar (473 bytes) >ant-xslp.jar (473 bytes) >ant-junit.jar (11614 bytes) >ant-vaj.jar (473 bytes) >ant-apache-bcel.jar (473 bytes) >ant-apache-bsf.jar (473 bytes) >ant-apache-resolver.jar (473 bytes) >ant-icontract.jar (473 bytes) >ant-apache-oro.jar (473 bytes) >ant-javamail.jar (473 bytes) >ant-nodeps.jar (417008 bytes) >ant-commons-net.jar (473 bytes) >ant-apache-log4j.jar (473 bytes) >ant-jmf.jar (6590 bytes) >ant-apache-regexp.jar (473 bytes) >ant-commons-logging.jar (473 bytes) >xml-apis.jar (124724 bytes) >xercesImpl.jar (1010675 bytes) > >--- > Tasks availability >--- >p4reopen : Not Available >image : Not Available >sshexec : Not Available >wlrun : Not Available >p4label : Not Available >p4revert : Not Available >icontract : Not Available >p4submit : Not Available >scp : Not Available >p4change : Not Available >p4delete : Not Available >p4integrate : Not Available >vajload : Not Available >rexec : Not Available >stlist : Not Available >telnet : Not Available >p4sync : Not Available >p4edit : Not Available >maudit : Not Available >antlr : Not Available >netrexxc : Not Available >ftp : Not Available >p4resolve : Not Available >starteam : Not Available >stylebook : Not Available >stlabel : Not Available >p4have : Not Available >jdepend : Not Available >script : Not Available >junit : Not Available >stcheckin : Not Available >vajexport : Not Available >stcheckout : Not Available >p4labelsync : Not Available >ejbc : Not Available >junitreport : Not Available >vajimport : Not Available >p4fstat : Not Available >wlstop : Not Available >
AW: Getting Javascript working with ANT
What means "ant -diagnostics" ? Especially the part printing "java.class.path" - are your script libraries there? Jan >-Ursprüngliche Nachricht- >Von: Vo, David (Mission Systems) [mailto:[EMAIL PROTECTED] >Gesendet: Samstag, 24. September 2005 00:40 >An: user@ant.apache.org >Betreff: Getting Javascript working with ANT > >Hi > >I am having trouble getting javascript working with ANT >version 1.6.5. I have /usr/local/ant/lib in the path. I also >downloaded bsf.jar and rhino.jar (renamed to js.jar) in the >same folder. I keep getting the same error messages: > >BUILD FAILED >file:/home/builds/build/si3-cc-build-nightly-notag.xml:74: >Could not create task or type of type: script. > >Ant could not find the task or a class this task relies upon. > >This is common and has a number of causes; the usual solutions >are to read the manual pages then download and install needed >JAR files, or fix the build file: > - You have misspelt 'script'. > Fix: check your spelling. > - The task needs an external JAR file to execute > and this is not found at the right place in the classpath. > Fix: check the documentation for dependencies. > Fix: declare the task. > - The task is an Ant optional task and optional.jar is absent > Fix: look for optional.jar in ANT_HOME/lib, download if needed > - The task was not built into optional.jar as dependent > libraries were not found at build time. > Fix: look in the JAR to verify, then rebuild with the needed > libraries, or download a release version from apache.org > - The build file was written for a later version of Ant > Fix: upgrade to at least the latest release version of Ant > - The task is not an Ant core or optional task > and needs to be declared using . > >This is my javascript (code not mine): > > > > > importClass(java.text.SimpleDateFormat); > cc_formatter = new SimpleDateFormat("MMddHHmmss"); > cvs_formatter = new SimpleDateFormat("-MM-dd HH:mm:ss"); > > date = >cc_formatter.parse(project.getProperty("cctimestamp")); > project.setProperty("cvstimestamp", >cvs_formatter.format(date)); > date = >cc_formatter.parse(project.getProperty("cclastgoodbuildtimestamp")); > project.setProperty("cvslastgoodbuildtimestamp", >cvs_formatter.format(date)); > ]]> > > > >I am using a pre-compiled version. I did not build Ant. Any >help would be appreciated. > >Thanks, >David > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Problem with Environment Variables on Win2000
It works on XP. --- rant.bat setlocal set foo=bar call ant echo on Endlocal --- build.xml env.foo is ${env.foo} --- output C:\Projects\My Tools>rant C:\Projects\My Tools>setlocal C:\Projects\My Tools>set foo=bar C:\Projects\My Tools>call ant Buildfile: build.xml [echo] env.foo is bar BUILD SUCCESSFUL Total time: 0 seconds C:\Projects\My Tools>endlocal C:\Projects\My Tools> -Original Message- From: Jason [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 27, 2005 2:34 PM To: user@ant.apache.org Subject: Problem with Environment Variables on Win2000 Hello, I've written an ant script on Linux and I'm now in the process of trying to run it on windows and I've hit a snag. My general strategy is to launch ant on linux from a shell script in which I set several environment variables like so: export MY_VAR=foo I than access these values through ant using the mechanism. On linux things work fine but when I port my shell script to a bat file there are problems. I am unable to access the value of (for example) MY_VAR even though I've set it in the bat file like so: SET MY_VAR=foo. I've noticed that I am able to access 'standard' environment variables (eg, Path) but the ones I set explicity in the bat file which launches ant aren't recongised. Should this work? Is there some work around? If anyone could set me straight, I'd appreciate it. -jason __ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com - 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: Problem with Environment Variables on Win2000
Thanks for testing it. After I posted, it started working on my Win2000 box as well so it's strange. Actually, this is not a new problem for me; I've run into it several times over the last couple of years. On windows, sometimes it works and sometimes it doesn't. I thought that this time it was finally reproducable but no dice. Oh well, it remains a mystery. Thanks again. -jason --- "Dick, Brian E." <[EMAIL PROTECTED]> wrote: > It works on XP. > > --- rant.bat > > setlocal > set foo=bar > call ant > echo on > Endlocal > > --- build.xml > > > >env.foo is ${env.foo} > > > --- output > > C:\Projects\My Tools>rant > > C:\Projects\My Tools>setlocal > > C:\Projects\My Tools>set foo=bar > > C:\Projects\My Tools>call ant > Buildfile: build.xml > [echo] env.foo is bar > > BUILD SUCCESSFUL > Total time: 0 seconds > > C:\Projects\My Tools>endlocal > > C:\Projects\My Tools> > > > > -Original Message- > From: Jason [mailto:[EMAIL PROTECTED] > Sent: Tuesday, September 27, 2005 2:34 PM > To: user@ant.apache.org > Subject: Problem with Environment Variables on > Win2000 > > > Hello, > > I've written an ant script on Linux and I'm now in > the > process of trying to run it on windows and I've hit > a > snag. My general strategy is to launch ant on linux > from a shell script in which I set several > environment > variables like so: > > export MY_VAR=foo > > I than access these values through ant using the > mechanism. On linux > things work fine but when I port my shell script to > a > bat file there are problems. I am unable to access > the value of (for example) MY_VAR even though I've > set > it in the bat file like so: SET MY_VAR=foo. I've > noticed that I am able to access 'standard' > environment variables (eg, Path) but the ones I set > explicity in the bat file which launches ant aren't > recongised. Should this work? Is there some work > around? If anyone could set me straight, I'd > appreciate it. > > -jason > > > > __ > Yahoo! Mail - PC Magazine Editors' Choice 2005 > http://mail.yahoo.com > > - > 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] > > __ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Umlauts in ANT home
Hi, I tried to execute ANT from a path that contains umlauts (means ant.home contains umlauts). The result was: C:\java\apache-Änt-1.6.5>bin\ant java.lang.ClassNotFoundException: org.apache.tools.ant.Main at java.net.URLClassLoader$1.run(URLClassLoader.java:199) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:187) at java.lang.ClassLoader.loadClass(ClassLoader.java:289) at java.lang.ClassLoader.loadClass(ClassLoader.java:235) at org.apache.tools.ant.launch.Launcher.run(Launcher.java:244) at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67) Is there a chance to get ANT running from a directory containing umlauts? Ullrich. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Problem with Environment Variables on Win2000
If you set the environment var using MyComputer, did you restart the command window before using it? This is a common issue with windows in that the env vars do not affect the open command windows. HTH Bill -Original Message- From: Jason [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 28, 2005 6:16 AM To: Ant Users List Subject: RE: Problem with Environment Variables on Win2000 Thanks for testing it. After I posted, it started working on my Win2000 box as well so it's strange. Actually, this is not a new problem for me; I've run into it several times over the last couple of years. On windows, sometimes it works and sometimes it doesn't. I thought that this time it was finally reproducable but no dice. Oh well, it remains a mystery. Thanks again. -jason --- "Dick, Brian E." <[EMAIL PROTECTED]> wrote: > It works on XP. > > --- rant.bat > > setlocal > set foo=bar > call ant > echo on > Endlocal > > --- build.xml > > > >env.foo is ${env.foo} > > > --- output > > C:\Projects\My Tools>rant > > C:\Projects\My Tools>setlocal > > C:\Projects\My Tools>set foo=bar > > C:\Projects\My Tools>call ant > Buildfile: build.xml > [echo] env.foo is bar > > BUILD SUCCESSFUL > Total time: 0 seconds > > C:\Projects\My Tools>endlocal > > C:\Projects\My Tools> > > > > -Original Message- > From: Jason [mailto:[EMAIL PROTECTED] > Sent: Tuesday, September 27, 2005 2:34 PM > To: user@ant.apache.org > Subject: Problem with Environment Variables on Win2000 > > > Hello, > > I've written an ant script on Linux and I'm now in > the > process of trying to run it on windows and I've hit > a > snag. My general strategy is to launch ant on linux > from a shell script in which I set several > environment > variables like so: > > export MY_VAR=foo > > I than access these values through ant using the > mechanism. On linux > things work fine but when I port my shell script to > a > bat file there are problems. I am unable to access > the value of (for example) MY_VAR even though I've > set > it in the bat file like so: SET MY_VAR=foo. I've > noticed that I am able to access 'standard' > environment variables (eg, Path) but the ones I set > explicity in the bat file which launches ant aren't > recongised. Should this work? Is there some work > around? If anyone could set me straight, I'd > appreciate it. > > -jason > > > > __ > Yahoo! Mail - PC Magazine Editors' Choice 2005 > http://mail.yahoo.com > > - > 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] > > __ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com - 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]
Executing DOS batch files
Hi All, Is there any ANT tasks for running DOS batch files, executing DOS command line tasks? >From what I understood from the user manual, the task executes only >windows .exe files. Thanks for your help, Zeituni
RE: Executing DOS batch files
Run cmd.exe and pass the bat as an arg. -Original Message- From: Uri Zeituni [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 28, 2005 11:29 AM To: user@ant.apache.org Subject: Executing DOS batch files Hi All, Is there any ANT tasks for running DOS batch files, executing DOS command line tasks? >From what I understood from the user manual, the task executes only windows .exe files. Thanks for your help, Zeituni - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Executing DOS batch files
There is a very clear example in the manual for using to run DOS batch files. http://ant.apache.org/manual/CoreTasks/exec.html -- Jeffrey E. Care ([EMAIL PROTECTED]) WebSphere v7 Release Engineer WebSphere Build Tooling Lead (Project Mantis) "Uri Zeituni" <[EMAIL PROTECTED]> wrote on 09/28/2005 11:28:54 AM: > Hi All, > Is there any ANT tasks for running DOS batch files, executing DOS > command line tasks? > From what I understood from the user manual, the task > executes only windows .exe files. > Thanks for your help, > Zeituni
Re: problem with apply task
Jakob--the "don't know how to handle it" indicates a problem with your mapper. Try changing your mapper to If that doesn't work, try HTH, Matt --- Jakob Fix <[EMAIL PROTECTED]> wrote: > Hello Brian, > > thanks for your answer. unfortunately, this doesn't > work either (same > result and debug messages). > > On 26/09/05, Dick, Brian E. <[EMAIL PROTECTED]> > wrote: > > Sometimes the commandline arguments are a bit > tricky. Try the following. > > > > dest="${out.dir}"> > > > > > > > > > > > > > > > > to="${out.dir}/*.png"/> > > > > > > I also tried the following apply which gave positive > results, but > obviously isn't what I'm after, I just tried it out > of desperation :-) > > > > > > > > > Using -verbose gives (among other things) the > commandline ant has > assembled and will execute: > > [apply] Executing 'attrib' with arguments: > [apply] '-R' > [apply] '/s' > [apply] '/d' > [apply] > 'C:\tools\_MYTOOLS\watermark\in\hsc-c0311e.png' > [apply] > [apply] The ' characters around the executable > and arguments are > [apply] not part of the command. > > I also tried another command (can't remember which > one), however, > which gave me the same "don't know how to handle > [filename] - > skipped". > > Hmm, anyone? > > thanks anyway, Brian. > > -- > cheers, > Jakob. > > - > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > __ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Apply task argument issues...
--- Nicolas Vervelle <[EMAIL PROTECTED]> wrote: [SNIP] > - try a to add a "+" before your filename, > set addsourcefile to > false, and use I would expect this to work; however by faking the target filename incremental builds won't work. At present it might be best to subclass apply to achieve this. Dev: We should probably add either a nested mapper or prepend/append attributes to srcfile and targetfile elements in apply for future versions of Ant. -Matt > > Hope this helps, > Nicolas > > Alan Moss wrote: > > >I have an issue WRT the apply task. I need it to be > much more flexible > >than the documentation states it is. Let's say I'm > using a tool that has > >odd command line options like this: > > > >util.exe [options] +|- > > > >where options is optional and you must specify > + > >or - > > > >Given the current way in which the apply task is > implemented, it seems > >impossible to do in ant 1.6.5: > > > > > > > > > > > > > > > >Wouldn't it make more sense to do the following: > > > > srcproperty="srcfile"> > > > > > > > > > >I can't understand why it was implemented as > separate tags rather than > >as properties. In my opinion, the latter example > would be more in-step > >with typical ANT thinking. > > > >Anyway, does anyone know of a way to do what I want > with the current > >version of ant? > > > >Thanks, > >-Alan > > > >- > >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] > > __ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: Executing DOS batch files
http://ant.apache.org/faq.html#batch-shell-execute Jan >-Ursprüngliche Nachricht- >Von: Jeffrey E Care [mailto:[EMAIL PROTECTED] >Gesendet: Mittwoch, 28. September 2005 17:47 >An: Ant Users List >Betreff: Re: Executing DOS batch files > >There is a very clear example in the manual for using >to run DOS batch files. > >http://ant.apache.org/manual/CoreTasks/exec.html > >-- >Jeffrey E. Care ([EMAIL PROTECTED]) >WebSphere v7 Release Engineer >WebSphere Build Tooling Lead (Project Mantis) > > >"Uri Zeituni" <[EMAIL PROTECTED]> wrote on 09/28/2005 >11:28:54 AM: > >> Hi All, >> Is there any ANT tasks for running DOS batch files, executing DOS >> command line tasks? >> From what I understood from the user manual, the task >> executes only windows .exe files. >> Thanks for your help, >> Zeituni > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How to set native OS variables?
Hi, I need to set the native OS classpath and them an application. I've been reading the ant docs and several usenet posts but didn't find a way to do it. It's quite simple to retrieve the OS properties but, is there any way to set them ? Thanks in advance, - Juan _ Don't just search. Find. Check out the new MSN Search! http://search.msn.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to set native OS variables?
Try looking at the sub-elements of the task, it allows you to define system properties that will be set on the process that is hosting the executable... Later, Ninju --- "Cels M." <[EMAIL PROTECTED]> wrote: > Hi, > > I need to set the native OS classpath and them > an application. > I've been reading the ant docs and several usenet > posts but didn't find a > way to do it. It's quite simple to retrieve the OS > properties but, is there > any way to set them ? > > Thanks in advance, > > - Juan > > _ > Don't just search. Find. Check out the new MSN > Search! > http://search.msn.com/ > > > - > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > __ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to set native OS variables?
On Wednesday September 28, 2005 12:57 pm, "Cels M." <[EMAIL PROTECTED]> wrote: > I need to set the native OS classpath and them an > application. I've been reading the ant docs and several usenet > posts but didn't find a way to do it. It's quite simple to retrieve > the OS properties but, is there any way to set them ? Its possible to set environment variables passed to 'ed processes with nested elements. The documentation for the task shows a couple of examples. Something like this should do the trick for you: - Rob - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Executing DOS batch files
Many thanks! I did not see that...sorry for the trouble Zeituni From: Jeffrey E Care [mailto:[EMAIL PROTECTED] Sent: Wed 9/28/2005 6:46 PM To: Ant Users List Subject: Re: Executing DOS batch files There is a very clear example in the manual for using to run DOS batch files. http://ant.apache.org/manual/CoreTasks/exec.html -- Jeffrey E. Care ([EMAIL PROTECTED]) WebSphere v7 Release Engineer WebSphere Build Tooling Lead (Project Mantis) "Uri Zeituni" <[EMAIL PROTECTED]> wrote on 09/28/2005 11:28:54 AM: > Hi All, > Is there any ANT tasks for running DOS batch files, executing DOS > command line tasks? > From what I understood from the user manual, the task > executes only windows .exe files. > Thanks for your help, > Zeituni - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Zipfileset problem. Help!
Hello, run your build with ant -debug to figure out exactly which directories are scanned by ant. the second zipfileset might be better rewritten meaning : I want all the files located under reports/daily/install what you wrote means : I want to have all the folders called install located under reports/daily/install, which does not sound likely. Cheers, Antoine S I wrote: > Hi > > I'm trying to create a zip file of a parent folder with many > subfolders with many different file types in each subfolder. However, > I'm only interested in the *.rdl files in each subfolder and one > subdir under the parent folder to be included in the final zip file. > I want the .rdl files to sit at the root of the zip file w/o exporting > their subfolder names. But I'm not successful. This is the way I > have written the Ant script now: > > > > > > > Where reports/ is the grand parent right on my drive C:, daily is the > parent folder, and there are about 50 subfolders under daily. I'm on > WinXP desktop by the way. > > Doesn't matter whether I set prefix to space or slash, the .rdl parent > folders under daily are still included but reports/daily itself is not > appended. And as for the 2nd zipfileset, **/install doesn't work. > > Thanks > > Steven > > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Umlauts in ANT home
Hello Ullrich, not sure, I think that current Windows JVM implementations from sun only understand ascii command line parameters, because they were coded using the -A APIs of Microsoft, instead of the -W APIs. I know that with JDK 1.4, it is not possible to run "java Shalom" if you write Shalom in Hebrew. it is probably also not possible to run "java Bär" (supposing you have written Bär.java and compiled it into Bär.class) Cheers, Antoine Pollähne. Ullrich wrote: >Hi, > >I tried to execute ANT from a path that contains umlauts (means ant.home >contains umlauts). >The result was: >C:\java\apache-Änt-1.6.5>bin\ant >java.lang.ClassNotFoundException: org.apache.tools.ant.Main >at java.net.URLClassLoader$1.run(URLClassLoader.java:199) >at java.security.AccessController.doPrivileged(Native Method) >at java.net.URLClassLoader.findClass(URLClassLoader.java:187) >at java.lang.ClassLoader.loadClass(ClassLoader.java:289) >at java.lang.ClassLoader.loadClass(ClassLoader.java:235) >at org.apache.tools.ant.launch.Launcher.run(Launcher.java:244) >at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67) > >Is there a chance to get ANT running from a directory containing umlauts? > >Ullrich. > > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to set native OS variables?
Oops, you are right... the element is for setting JVM system properties (during a task) The element of the is correct --- Robert Clark <[EMAIL PROTECTED]> wrote: > On Wednesday September 28, 2005 12:57 pm, "Cels M." > <[EMAIL PROTECTED]> wrote: > > I need to set the native OS classpath and them > an > > application. I've been reading the ant docs and > several usenet > > posts but didn't find a way to do it. It's quite > simple to retrieve > > the OS properties but, is there any way to set > them ? > > Its possible to set environment variables passed to > 'ed > processes with nested elements. The > documentation for the > task shows a couple of examples. > > Something like this should do the trick for you: > > > > > > - Rob > > - > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > __ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: How to set native OS variables?
Setting env cars AND RUNNING the application is no problem. Only setting the vars and quitting Ant - then the settings are lost. Jan >-Ursprüngliche Nachricht- >Von: Ninju Bohra [mailto:[EMAIL PROTECTED] >Gesendet: Mittwoch, 28. September 2005 22:58 >An: Ant Users List >Cc: Cels M. >Betreff: Re: How to set native OS variables? > > >Oops, you are right... the element is for >setting JVM system properties (during a >task) >The element of the is correct > >--- Robert Clark <[EMAIL PROTECTED]> wrote: > >> On Wednesday September 28, 2005 12:57 pm, "Cels M." >> <[EMAIL PROTECTED]> wrote: >> > I need to set the native OS classpath and them >> an >> > application. I've been reading the ant docs and >> several usenet >> > posts but didn't find a way to do it. It's quite >> simple to retrieve >> > the OS properties but, is there any way to set >> them ? >> >> Its possible to set environment variables passed to 'ed >> processes with nested elements. The documentation for >the >> task shows a couple of examples. >> >> Something like this should do the trick for you: >> >> >> >> >> - Rob >> >> >- >> To unsubscribe, e-mail: >> [EMAIL PROTECTED] >> For additional commands, e-mail: >> [EMAIL PROTECTED] >> >> > > > > > > > >__ >Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com > >- >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: Umlauts in ANT home
Hi Antoine, I have tried to define ant.home with OEM and with ANSI encoding with no effort. If I leave out the ant.home definition from ant.bat then the launcher succeeds in finding ant.home (by getting the parent dir of the jar containing the Launcher). But afterwards the UrlClassLoader fails. Maybe giving the path with \u sequences would help. Ullrich. > -Original Message- > From: Antoine Levy-Lambert [mailto:[EMAIL PROTECTED] > Sent: Wednesday, September 28, 2005 9:06 PM > To: Ant Users List > Subject: Re: Umlauts in ANT home > > > Hello Ullrich, > > not sure, > > I think that current Windows JVM implementations from sun only > understand ascii command line parameters, because they were > coded using > the -A APIs of Microsoft, > instead of the -W APIs. > > I know that with JDK 1.4, > it is not possible to run "java Shalom" if you write Shalom in Hebrew. > it is probably also not possible to run "java Bär" (supposing you have > written Bär.java and compiled it into Bär.class) > > Cheers, > Antoine - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
problem under Mac OS X + Eclipse
Hi, I will probably post this one on the Eclipse mailing list, but maybe someone in the Ant list can help. I am working on an open-source project (Jmol [1]). The build is made with Ant but some of the Jmol developers / users use it from Eclipse. The build works correctly under Windows (and probably Unix) but I have a problem under Mac OS X. It's not on my machine, it's been reported by an other user, so I can't test it on my own computer (no Mac). I am using a task to run xgettext (from the Gnu gettext tools). The situation is : - xgettext is in the path, - if Ant is run directly from the command line in the directory where the build file is, it works - if Ant is run from Eclipse, Ant doesn't find the executable Does anyone have already had this kind of problem ? I don't know what to look for, any help will be appreciated. Any idea ? Here is a test build file showing the problem: failifexecutionfails="false"> Here is the result of running the build with -debug : Apache Ant version 1.6.5 compiled on June 2 2005 Setting ro project property: ant.file -> /Users/rkanters/Projects/Eclipse/Jmol/build-text.xml Buildfile: /Users/rkanters/Projects/Eclipse/Jmol/build-text.xml Adding reference: ant.projectHelper Adding reference: ant.parsing.context Adding reference: ant.targets parsing buildfile /Users/rkanters/Projects/Eclipse/Jmol/build-text.xml with URI = file:///Users/rkanters/Projects/Eclipse/Jmol/build-text.xml Setting ro project property: ant.project.name -> test-exec Adding reference: test-exec Setting ro project property: ant.file.test-exec -> /Users/rkanters/Projects/Eclipse/Jmol/build-text.xml Project base dir set to: /Users/rkanters/Projects/Eclipse/Jmol +Target: +Target: test-exec Setting project property: src.dir -> src Adding reference: eclipse.ant.targetVector Build sequence for target(s) `test-exec' is [test-exec] Complete build sequence is [test-exec, ] test-exec: [echo] ..:/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:/Applications/eclipse/configuration/org.eclipse.osgi/bundles/63/1/.cp [exec] Current OS is Mac OS X [exec] Executing 'xgettext' with arguments: [exec] '--help' [exec] [exec] The ' characters around the executable and arguments are [exec] not part of the command. Execute:Java13CommandLauncher: Executing 'xgettext' with arguments: '--help' The ' characters around the executable and arguments are not part of the command. [exec] Execute failed: java.io.IOException: xgettext: not found BUILD SUCCESSFUL Total time: 548 milliseconds Thanks for any help, Nicolas [1] http://www.jmol.org/
AW: problem under Mac OS X + Eclipse
Let the MacOSX/Eclipse user print the path. Is xgettext in that? Maybe the path is not propagated. Jan >-Ursprüngliche Nachricht- >Von: Nicolas Vervelle [mailto:[EMAIL PROTECTED] >Gesendet: Donnerstag, 29. September 2005 08:42 >An: user@ant.apache.org >Betreff: problem under Mac OS X + Eclipse > >Hi, > >I will probably post this one on the Eclipse mailing list, but >maybe someone in the Ant list can help. > >I am working on an open-source project (Jmol [1]). >The build is made with Ant but some of the Jmol developers / >users use it from Eclipse. > >The build works correctly under Windows (and probably Unix) >but I have a problem under Mac OS X. >It's not on my machine, it's been reported by an other user, >so I can't test it on my own computer (no Mac). > >I am using a task to run xgettext (from the Gnu gettext tools). >The situation is : >- xgettext is in the path, >- if Ant is run directly from the command line in the >directory where the build file is, it works >- if Ant is run from Eclipse, Ant doesn't find the executable > >Does anyone have already had this kind of problem ? >I don't know what to look for, any help will be appreciated. Any idea ? > >Here is a test build file showing the problem: > > > > > failifexecutionfails="false"> > > > > > >Here is the result of running the build with -debug : >Apache Ant version 1.6.5 compiled on June 2 2005 Setting ro >project property: ant.file -> >/Users/rkanters/Projects/Eclipse/Jmol/build-text.xml >Buildfile: /Users/rkanters/Projects/Eclipse/Jmol/build-text.xml >Adding reference: ant.projectHelper >Adding reference: ant.parsing.context >Adding reference: ant.targets >parsing buildfile /Users/rkanters/Projects/Eclipse/Jmol/build-text.xml >with URI = file:///Users/rkanters/Projects/Eclipse/Jmol/build-text.xml >Setting ro project property: ant.project.name -> test-exec >Adding reference: test-exec Setting ro project property: >ant.file.test-exec -> >/Users/rkanters/Projects/Eclipse/Jmol/build-text.xml >Project base dir set to: /Users/rkanters/Projects/Eclipse/Jmol >+Target: >+Target: test-exec >Setting project property: src.dir -> src Adding reference: >eclipse.ant.targetVector Build sequence for target(s) >`test-exec' is [test-exec] Complete build sequence is [test-exec, ] >test-exec: > [echo] >..:/Library/Java/Extensions:/System/Library/Java/Extensions:/us >r/lib/java:/Applications/eclipse/configuration/org.eclipse.osgi >/bundles/63/1/.cp > [exec] Current OS is Mac OS X > [exec] Executing 'xgettext' with arguments: > [exec] '--help' > [exec] > [exec] The ' characters around the executable and arguments are > [exec] not part of the command. >Execute:Java13CommandLauncher: Executing 'xgettext' with arguments: >'--help' > >The ' characters around the executable and arguments are not >part of the command. > [exec] Execute failed: java.io.IOException: xgettext: not >found BUILD SUCCESSFUL Total time: 548 milliseconds > > >Thanks for any help, >Nicolas > >[1] http://www.jmol.org/ > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]