Hi ,
I want to set the PATH variable during setup() of BuildWrapper. and use the tools for which i am setting path directly on command line during my build step (Builder class). I am trying to set the env variable using below in setup() method of Build Wrapper
initialEnvironment.put("mytoolRoot", getMytoolRoot + nodeSpecificFileSep + "bin");
initialEnvironment.override("PATH+mytoolRoot",initialEnvironment.get("mytoolRoot") );
and then just to test i am calling my tool through command line directly using Launcher in same setup() method like below
launcher.launch().cmdAsSingleString("mytool -batch -ver").env(initialEnvironment).stdout(listener).join();
above command fails to pick up the tool directly through the command line. and the build fails with error Cannot run program "mytool" no such file or directory.
what can i do to set the env variable . the other option i am trying is to write batch and shell script file and execute it. but i am not sure if i should do that.
Thanks & Regards
Nikhil