Re: why is my withArgName argument being overwritten
sagun shakya wrote at Donnerstag, 26. März 2009 02:38: Hi, I have an Option created as: Option fooOption = OptionBuilder.withDescription(add foo) .withLongOpt(add_foo) .hasArgs(2) .withArgName(foo) .withArgName(bar) .create(baz); Because the OptionBuilder builds always only one option at a time. http://commons.apache.org/cli/usage.html - Jörg - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
Re: [VFS] problem on runtime connection to SFTp server
It seems that the problem comes from release function, when I call It after copying files, the second SFTP connection fail. lmk wrote: I have commons-net-2.0 commons-vfs-1.0 jsch-0.1.40 the first call works..but the second one does not. Jörg Schaible-2 wrote: lmk wrote at Dienstag, 24. März 2009 14:58: Hi Sergey, here the exception trace org.apache.commons.vfs.FileSystemException: Unknown scheme sftp in URI sftp://login:passw...@host/path/;. This is an error message, but not a stack trace. However, it seems that you do not have commons-net and jsch in your deps ... - Jörg - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org -- View this message in context: http://www.nabble.com/-VFS--problem-on-runtime-connection-to-SFTp-server-tp22664327p22718714.html Sent from the Commons - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
Re: Commons XMLConfiguration Issue --XPath query with /root
Thanks Oliver for clarifying this Oliver Heger-3 wrote: bnreddy schrieb: Hi christian, From my understanding (correct me if I am wrong)... The root element is ignored when constructing keys. but this is when XMLConfiguration is using DefaultExpressionEngine Is root element ignored even when the XPathExpressionEngine is being used by XMLConfig... The problem is ...there are preexisting XPaths and we need to fit this in that... as per shouldn't the XMLConfiguration be able to support all legal XPath's instead of trimming root elements... XMLConfiguration used to ignore the root element from the very beginning. Expression engines were introduces later, but when the refactoring was done this behavior was not changed to remain backwards compatible. When XPathExpressionEngine was implemented it seems only natural to mimic the behavior of DefaultExpressionEngine to be consistent. Oliver this is noted in the user guide: XPathExpressionEngine expressions ignore the root element - so just leave it away. What problems could arise from this? christian! - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org -- View this message in context: http://www.nabble.com/Commons-XMLConfiguration-Issue---XPath-query-with--root-tp22704510p22723428.html Sent from the Commons - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
Re: [ANN] commons-exec 1.0 released
Great job seeing this through, Siegfried! -Matt --- On Thu, 3/26/09, Siegfried Goeschl siegfried.goes...@it20one.at wrote: From: Siegfried Goeschl siegfried.goes...@it20one.at Subject: [ANN] commons-exec 1.0 released To: Jakarta Commons Developers List d...@commons.apache.org, Jakarta Commons Users List user@commons.apache.org Date: Thursday, March 26, 2009, 1:34 PM The commons-exec-team is pleased to announce the commons-exec-1.0 release! A library to reliably execute external processes from within the JVM Changes in this version include: New features: - o Added one additional test : DefaultExecutorTest.testExecuteWithFancyArg Issue: EXEC-26. Thanks to Benjamin Bentmann. o Added convinience method to add two parameters to the CommandLine using one method invocation. o Added test scripts for OpenVMS - he seems to be the last human having access to an OpenVMS box ... :-) o With the help of the Apache Commons community I added the first results of cross-OS testing. Thanks to Simone Gianni, Bindul Bhowmik, Niall Pemberton, Sebastian Bazley. o The regression tests now also works on Windows - so it should work now on Linux, Windows and Mac OS X o Added DebugUtils to improve cross-platform testing. o Made DefaultExecutor.launch() protected to enable mocking. Issue: SANDBOX-62. Thanks to Jeremy Lacoste. o Made ProcessDestroyer optional and pluggable when using Executor. Issue: SANDBOX-107. Thanks to Niklas Gustavsson. o CommandLine can now expand the given command line by a user-suppied map. This allows to execute something like ${JAVA_HOME}/bin/java -jar ${myapp} o Added methods to provide pre-quoted arguments. Issue: SANDBOX-192. Thanks to Reinhold Fuereder. o Exposing a ExecuteWatchdog.destroy() to kill an asynchrounous process manually. This formalizes a workaround described in the JIRA Issue: SANDBOX-193. Thanks to Reinhold Fuereder. o Extending exit value handling to support applications returning an error code. Issue: SANDBOX-203. o Added a few regression tests for the watchdog since they were missing. Issue: SANDBOX-204. Fixed Bugs: - o Removed useless synchronized statement in OpenVmsProcessingEnvironment.createProcEnvironment Issue: EXEC-37. Thanks to Sebastien Bazley. o Using System.in for child process will actually hang your application - see JIRA for more details. Since there is no easy fix an IllegalRuntimeException is thrown when System.in is passed. Issue: EXEC-33. o Fixing a few findbugs issues. Issue: EXEC-35. Thanks to Luc Maisonobe. o Handle null streams consistently. Issue: EXEC-32. Thanks to Marco Ferrante. o After a long discussion we decided to stick to following groupId org.apache.commons instead of commons-exec. o The Ant build now works even when junit is not on the classpath Thanks to Kevin Jackson. o Fixed broken groupId from org.apache.commons to commons-exec o Renamed EnvironmentUtil to EnvironmentUtils to align with other classes in this project and commons in general. Please note that this change could break existing clients (but would be rather unlikely). Issue: EXEC-27. Thanks to Benjamin Bentmann. o Make environment variables respect casing rules of platforms. Under Windows PATH, Path and path would access the same environment variable whereas the real name is Path. Issue: EXEC-30. Thanks to Benjamin Bentmann. o Invoking DefaultExecutor.execute(CommandLine command, Map environment) using a 'null' Map results in inheriting all environment variables of the current process while passing an empty map implies starting the new process with no environment variables. In short 'null' is not the same as an empty map. Issue: EXEC-31. Thanks to Benjamin Bentmann. o Using variable substitution within CommandLine broke the regression tests under Windows. Found also another bug when calling CommandLine.getExecutable() the result was not substituted at all. As a general rule we do variable substitution and file separator fixing on the command line executable and variable substitution but NO file separator fixing for the command line arguments. Issue: EXEC-25. o Implemented better regression test for OpenVMS affecting also the Executor and CommandLauncher interface. o Cleaned up the source code to get rid of javadoc errors and unused imports. Issue: SANDBOX-204. Removed: o Removed commons-logging integration Have fun! -commons-exec-team - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
Re: [SCXML] Log output?
Please post in plain text or internet style as some email clients like to call it ... On Wed, Mar 25, 2009 at 9:39 AM, Anna Södling anna.sodl...@passagen.se wrote: Hi, I want to use some logging in my scxml-file, for example upon entering and exiting a state. Unfortunately, I can't seem to get the hang of how it works. I've got this line in my scxml-file: And the log output I get (in a console window in Eclipse) looks like this: 2009-mar-24 11:39:08 org.apache.comm ons.scxml.model.Log execute INFO: 'Renegade': Entering state: A 2009-mar-24 11:39:08 org.apache.commons.scxml.model.Log execute INFO: 'Renegade': Entering state: A That seems OK to me (other than the fact it appeared twice, probably a cut-n-paste error?). snip/ No, it was supposed to enter state A twice during the running of the state machine...though I guess I didn't really have to paste both outputs :) However, I'm wondering if there is some way to clean up the output? If possible, I would like to remove the org.apache.commons.scxml.model.Log execute and put the date and info on the same row. snap/ You'll have to look into a formatter / layout for the logging library you are using (or introduce one so you can do more than the commons-logging SimpleLog). Also, I'm doing some ordinary printed outputs (in Java) while I'm running my state machine, and the log info is not placed on the right place among these outputs either, but before all of them (so it doesn't show up when I'm actually entering the state). And that's not really what I wanted. I would simply like to have an output that says 'Renegade': Entering state: A (or something similar) when I'm actually entering state A. Is this possible? Or have I missunderstood how the -tag works? Please say more about the Java code which contains these print statements. Are you using an AbstractStateMachine subclass, an SCXMLListener or something else? ( content in the SCXML document executes before code in both those specific cases). snip/ We're using an AbstractStateMachine...we haven't extended it (since this didn't work for some reason), but rather copied it and added some parts. But it's a kind of ASM very similar to the original. We have a little problem with this line of code in the onentry-listener though: invoke(entered.getId()); Without it, we only get the original output, but when we add it, we get a whole lot of error messages. We're not sure what it is doing, or invoking? snap/ As the class Javadoc says, it calls the namesake method in the class for each state that has been entered. If you want more fine-grained control about the timing of your procedural code within state changes (or sequencing even within a particular or ), that kind of thing can be achieved by using custom actions [1] to call your code from the appropriate place(s) in SCXML executable content. snip/ We've tried with several log expressions, some in onentry-tags, and some not. Even though they're not shown exactly where we want to, they seem to be shown in the right order. But, is this maybe a coincidence? snap/ I don't think so, but its hard to say anything without knowing the code. -Rahul /Anna . - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org