Karma Not Found from Maven After Re-Install

Eclipse maven unable to locate karma executable

It appears in Mac OS X 10.8 (and possible earlier), GUI apps do not get the same path as the terminal. To add /usr/local/bin to the global path, you need to edit (and possibly create) /etc/launchd.conf to include setenv PATH /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin You must edit/create this file with admin privs so use sudo with vi or nano sudo nano /etc/launchd.conf You will need to reboot your Mac before this change can take effect. This information was found on ServerFault https://serverfault.com/questions/16355/how-to-set-global-path-on-os-x/277034#277034

Karma - Maven plugin fails

I figured out the problem. What was causing the build issue was the fact that the karma node_modules was interfering with the build. To get around this I had to remove the node_modules from the webapp folder and move it into the root directory of the project, as well as the karma.conf.js file.

That was the first part - the second part was to install karma globally using this command:

npm install -g karma && npm install -g karma-cli

By doing this you should beable to run karma from anywhere but that wasn't the case for me and I still don't know why (elaborate anyone?). The final part was in the actually maven pom.xml:

         <plugin>
<groupId>com.kelveden</groupId>
<artifactId>maven-karma-plugin</artifactId>
<version>1.6</version>
<executions>
<execution>
<phase>test</phase>
<goals>
<goal>start</goal>
</goals>
</execution>
</executions>
<configuration>
<configFile>karma.conf.js</configFile>
<browsers>Chrome</browsers>
<autoWatch>false</autoWatch>
<singleRun>true</singleRun>
<colors>true</colors>
<skipKarma>false</skipKarma>
<skipTests>false</skipTests>
<karmaFailureIgnore>false</karmaFailureIgnore>
</configuration>
</plugin>

The key point above is that I haven't included the <karmaExecutable> command here because if you include that then it will break - by keeping it out it will turn to the global karma install to run the tests in the Maven build. This worked for me - hope it works for you.

Unable to compile and install web karma using maven

Previously I was trying in Program Files folder in C drive so I could not install. I changed the folder I am able to install it now.

Cannot find plugin karma-jasmine

it seems to me that the solution was in

npm install -g karma-cli

Karma not found in NetBeans after upgrading to Yosemite

It seems to be related to Yosemite turning off /etc/launchd.conf, so NetBeans doesn't get the correct PATH variable - so not directly related to Karma.

I fixed it by setting PATH=${PATH}:/usr/local/bin in netbeans.conf (within the NetBeans app package). Then the karma part of the build script runs successfully within NetBeans.

problems in installing Karma integration tool for windows 8 64 bit machine

Create a file settings.xml in .m2 folder of your HOME directory. Add the following:

<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">
<proxies>
<proxy>
<id>myproxy</id>
<active>true</active>
<protocol>http</protocol>
<host>your.org</host>
<port>8080</port>
<username>proxyuser</username>
<password>somepassword</password>
<nonProxyHosts>*.your.org</nonProxyHosts>
</proxy>
</proxies>

</settings>

Remove <username> and <password> tags if your proxy server does not need authentication.
You can look for the values for these in your browser settings.

Also refer to proxies section of maven settings reference.



Related Topics



Leave a reply



Submit