Re: Using Ivy launcher, passing arguments to launched class.
Looking at the code, it does appear that this case hasn't been handled. I am not part of the Ivy dev team so I can't say whether this is a bug or whether this was never thought of as a usecase. Perhaps you could wait for someone from the dev team to respond or maybe file an enhancement. -Jaikiran On Thursday 23 July 2015 05:50 PM, Krzysztof Harpula wrote: Yes I tried in double and single quotes. The effect is that theses quotes are passed as part of command line arguments to launched class so without modification of launched class to strip off theses quotes it still does not work. I think it is a common case that applications have parameters starting with - and not expecting quotes in values of command line arguments. It looks to be a bug in Ivy. So far I have no work around to it. Regards. On 2015-07-23 14:14, Jaikiran Pai wrote: Have you tried to enclose those parameters in double quotes: java -jar ivy.jar -main com.my.MainClass -args -param1:val1 -param2:val2 -Jaikiran On Wednesday 22 July 2015 07:17 PM, Krzysztof Harpula wrote: Hello, I have the following problem: I want to launch my main class using Ivy launcher as documented in Ivy manuals: java -jar ivy.jar -main com.my.MainClass My main class expects parameters from command line in the format: -paramName:paramValue I try using Ivy launcher with -args option which is documented as follows: -args args the arguments to give to the launched process java -jar ivy.jar -main com.my.MainClass -args -param1:val1 However Ivy is not able to pass such a parameter into my class as it interprets it as Ivy parameter which is not recognized printing: Unrecognized option: -param1:val1. (message from Ivy launcher) So if I try what follows (remove - from my parameter): java -jar ivy.jar -main com.my.MainClass -args param1:val1 Ivy passes param1:val1 as argument to my main however my application does not recognize it as it expects its all parameters to start with - just as Ivy launcher does. I think this is either a *BUG* or I am missing something. It seems Ivy launcher interprets values after -args beginning with - as another Ivy parameters. Is any way to pass parameters starting with - to the launched class? Please help. Best regards.
Ivy features questionnaire
Hi, I voluntarily maintain a free community knowledge base project to help people understand and choose among the many different web development technologies. I'd appreciate a hand capturing the unique aspects of Ivy. If you know Ivy, please go to the following link to answer a questionnaire about it. This will be a big help to anyone trying to decide which package manager to use and which features can be provided by a package manager. When you're finished just reply to this message so people know that you have. It would be nice to get 2-3 replies but I shouldn't need more than that. Click here http://www.dancancro.com/technology-questionnaires/ and choose the Package Managers questionnaire. Thanks, Dan
Re: Using Ivy launcher, passing arguments to launched class.
Yes I tried in double and single quotes. The effect is that theses quotes are passed as part of command line arguments to launched class so without modification of launched class to strip off theses quotes it still does not work. I think it is a common case that applications have parameters starting with - and not expecting quotes in values of command line arguments. It looks to be a bug in Ivy. So far I have no work around to it. Regards. On 2015-07-23 14:14, Jaikiran Pai wrote: Have you tried to enclose those parameters in double quotes: java -jar ivy.jar -main com.my.MainClass -args -param1:val1 -param2:val2 -Jaikiran On Wednesday 22 July 2015 07:17 PM, Krzysztof Harpula wrote: Hello, I have the following problem: I want to launch my main class using Ivy launcher as documented in Ivy manuals: java -jar ivy.jar -main com.my.MainClass My main class expects parameters from command line in the format: -paramName:paramValue I try using Ivy launcher with -args option which is documented as follows: -args args the arguments to give to the launched process java -jar ivy.jar -main com.my.MainClass -args -param1:val1 However Ivy is not able to pass such a parameter into my class as it interprets it as Ivy parameter which is not recognized printing: Unrecognized option: -param1:val1. (message from Ivy launcher) So if I try what follows (remove - from my parameter): java -jar ivy.jar -main com.my.MainClass -args param1:val1 Ivy passes param1:val1 as argument to my main however my application does not recognize it as it expects its all parameters to start with - just as Ivy launcher does. I think this is either a *BUG* or I am missing something. It seems Ivy launcher interprets values after -args beginning with - as another Ivy parameters. Is any way to pass parameters starting with - to the launched class? Please help. Best regards.