karma-runner / maven-karma-plugin

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

Karma cannot be executed when running Maven on Cygwin #24

Closed tapioko closed 10 years ago

tapioko commented 10 years ago

I have installed Karma on Cygwin and I also run Maven on Cygwin. This plugin detects I'm using windows and prefixes command with "cmd /c". However, Windows shell cannot execute Karma (executable is on PATH).

Would it be possible to execute the command without "cmd /c" if user is using Cygwin?

Here is Maven's output: [INFO] cmd /C karma start ....karma.config.js --browsers PhantomJS --single-run 'karma' is not recognized as an internal or external command, operable program or batch file.

sajanchandran commented 10 years ago

Even i use Cygwin and run test via Maven, I dont have any problem while running karma test. Make sure you added karma executable correctly on your PATH. This is my maven output:

cmd /C karma start C:\workspace-sts-2.3.2.RELEASE\eu.europa.ema.esubmission.psur.ui\psur-ui\src\test\resources\karma.conf.js --browsers PhantomJS --reporters dots,junit --single-run --no-auto-watch --colors true
WARN [reporter]: Can not load "junit", it is not registered!
  Perhaps you are missing some plugin?
INFO [karma]: Karma v0.10.9 server started at http://localhost:9876/
INFO [launcher]: Starting browser PhantomJS
INFO [PhantomJS 1.9.7 (Windows 7)]: Connected on socket 5CD9g_9eXtAQGc3jvKA1
kelveden commented 10 years ago

Have you any reason to assume that executing without the cmd /C will work? The shell will just be looking for karma on the path either way.

It doesn't sound like a problem that should be solved by the plugin in any case - indeed, I'm not sure if it'd be even possible to detect that it was running in cygwin even if it wanted to. So closing.

As I side-note, I'm guessing that you're already aware but you don't need cygwin to run karma or maven on Windows - native solutions exist.