karma-runner / maven-karma-plugin

Maven plugin for running tests using Karma.
Apache License 2.0
45 stars 26 forks source link

Can't specify nodejs binary executable path #13

Closed ryoungancestry closed 10 years ago

ryoungancestry commented 11 years ago

I am using nodejs-maven-plugin to install the nodejs binaries, so it isn't on the path or in the env. There should be a parameter to specify the node binary location just like the karma binary location setting. It would also be nice to be able to specify the PhantomJS binary.

kelveden commented 11 years ago

I'm unclear with the scenario you're describing here. I understand that you're installing nodejs on the fly using the nodejs-maven-plugin (not something I've used myself). How are you installing Karma though? And how does adding a parameter to specify the nodejs binary location help you? - it's the path to the Karma executable itself that's important to the plugin.

Or are you saying that because of the way you're installing nodejs/Karma on the fly that the #!/usr/bin/env node directive in the Karma executable doesn't work because node isn't on the path? Which would mean you'd expect the plugin to shell out to something like path/to/node/bin/node path/to/karma/node/module/bin/karma start, right? In which case I can see your reasoning.

Have I understood that right?

ryoungancestry commented 11 years ago

Yes, you are correct. since node isn't on the path, your plugin doesn't know how to execute node. By using the nodejs-maven-plugin it only drops the node binaries in a directory and then I currently and using the exec-maven-plugin to specify the node binary location to run karma. I am also using the npm-maven-plugin to install all npm node modules.

I'm also guessing that since PhantomJS is expected to be on the path that you will also need to have a setting for that as well since I also use a maven plugin to install the PhantomJS binaries (nom-maven-plugin doesn't install the phantomjs binaries, only a binary that is used to download the real binary). I am using arquillian-phantom-binary maven plugin to install phantomjs.

kelveden commented 10 years ago

@ryoungancestry - just doing some housekeeping and I noticed that I've let this one go stale - sorry about that. Do you still want it looked into or can I close it?

kelveden commented 10 years ago

Closing as there's no activity. Will re-open if required.