-1

I currently running the following commands on a hudson slave deployed on a windows machine.

dir
cmd
mvn clean install

I get the following return on the build.

mvn' is not recognized as an internal or external command,
operable program or batch file.

I have set the correct path on the node which points to the hudson installation on the windows machine.

I have also set the correct Path for JAVA and M2_HOME on the windows slave machine.

I was hoping for the correct way to call maven and maybe another *.bat file if need be in the future.

Please and thank you

Mahdi Yusuf
  • 19,931
  • 26
  • 72
  • 101
  • Can you start `mvn` when you open the command line? If not, make sure the `bin` folder is in your `PATH`. – ZeissS Jul 21 '10 at 21:47
  • yes, i can when i do it on the cmd on slave windows machine. I already placed it in my PATH. I was wondering why it isn't working with hudson. – Mahdi Yusuf Jul 21 '10 at 21:50
  • Have you re-started hudson after changing the default path settings? – Anders Lindahl Jul 21 '10 at 21:59
  • 2
    Did you do the setting in Hudson or on the slave machine directly? If you set it directly, you have to restart the whole machine (I assume that the client runs as a service). A good way to diagnose the problem is to run the `set` command without any parameters in your job. It will print you all the variables on the slave, the way hudson sees them. – Peter Schuetze Jul 22 '10 at 12:17
  • I managed to figure it out by passing the windows command my pull path to mvn, even though I set it on the path on the slave machine. – Mahdi Yusuf Jul 22 '10 at 13:12

1 Answers1

0

I still haven't figured this out. A good work around is to use the full path to mvn to run it. Which worked for me.

Mahdi Yusuf
  • 19,931
  • 26
  • 72
  • 101
  • 1
    You also haven't delivered much feedback on the comments to your question. Please be more specific about your setup, what you tried and what not. Did you run the 'set' command from within the Hudson job? You can also use the script console of the node to figure out what the content of the variables are from the Hudson point of view. – Peter Schuetze Jul 23 '10 at 17:45
  • yeah the set command you suggested was helpful in debugging the issue. that is why i upped it. Thanks. – Mahdi Yusuf Jul 23 '10 at 18:16