karma-runner / maven-karma-plugin

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

Execution of 'karma start' fails #32

Open Yneth opened 7 years ago

Yneth commented 7 years ago

When building my project I get this error:

[INFO] 
[INFO] --- maven-karma-plugin:1.8:start (default) @ ui-js ---
[INFO] Executing Karma Test Suite ...
[INFO] cmd /C "E:\New folder\my-proj\ui-js\node_modules\.bin\karma" start E:\New folder\my-proj\ui-js\karma.conf.js --browsers PhantomJS --reporters dots --single-run
'E:\New' is not recognized as an internal or external command, 
operable program or batch file. 

...

[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1:29.608s
[INFO] Finished at: Mon Feb 27 19:00:05 EET 2017
[INFO] Final Memory: 28M/265M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.kelveden:maven-karma-plugin:1.8:start (default) on project ui-js: There were Karma test failures. -> [Help 1]
[ERROR] 

My config:

    <groupId>com.kelveden</groupId>
    <artifactId>maven-karma-plugin</artifactId>
    <version>1.8</version>
    <executions>
        <execution>
            <phase>test</phase>
            <goals>
                <goal>start</goal>
            </goals>
        </execution>
    </executions>
    <configuration>
        <karmaExecutable>"${basedir}/node_modules/.bin/karma"</karmaExecutable>
        <configFile>karma.conf.js</configFile>
        <browsers>PhantomJS</browsers>
        <reporters>dots</reporters>
    </configuration>

It is caused by the fact that configFile path is not quoted.

Yneth commented 7 years ago

Added a pull request for this issue.