eirslett / frontend-maven-plugin

"Maven-node-grunt-gulp-npm-node-plugin to end all maven-node-grunt-gulp-npm-plugins." A Maven plugin that downloads/installs Node and NPM locally, runs NPM install, Grunt, Gulp and/or Karma.
Apache License 2.0
4.25k stars 870 forks source link

Angular JS unit tests using Karma & Jasmine on Java Web App #529

Open onkarojha77 opened 7 years ago

onkarojha77 commented 7 years ago

We are attempting to build a java web application that has an Angular.js front end. The angular JS front end has Karma for running unit tests and there is a maven plugin (https://github.com/eirslett/frontend-maven-plugin) for executing these. And this is working locally, however when i try to build through jenkins, the following error occurs when it attempts to download node (required by karma).


[INFO] --- frontend-maven-plugin:1.3:install-node-and-npm (install node and npm) @ MonocleDemo --- [INFO] Installing node version v4.6.0 [INFO] Downloading https://nodejs.org/dist/v4.6.0/node-v4.6.0-linux-x64.tar.gz to /build-nas/jenkins/jenkins025/.m2/repository/com/github/eirslett/node/4.6.0/node-4.6.0-linux-x64.tar.gz [INFO] No proxies configured [INFO] No proxy was configured, downloading directly Dec 01, 2016 3:44:27 AM org.apache.http.impl.execchain.RetryExec execute INFO: I/O exception (java.net.SocketException) caught when processing request to {s}->https://nodejs.org:443: Network is unreachable Dec 01, 2016 3:44:27 AM org.apache.http.impl.execchain.RetryExec execute INFO: Retrying request to {s}->https://nodejs.org:443 Dec 01, 2016 3:44:33 AM org.apache.http.impl.execchain.RetryExec execute INFO: I/O exception (java.net.SocketException) caught when processing request to {s}->https://nodejs.org:443: Network is unreachable Dec 01, 2016 3:44:33 AM org.apache.http.impl.execchain.RetryExec execute INFO: Retrying request to {s}->https://nodejs.org:443 Dec 01, 2016 3:44:37 AM org.apache.http.impl.execchain.RetryExec execute INFO: I/O exception (java.net.SocketException) caught when processing request to {s}->https://nodejs.org:443: Network is unreachable Dec 01, 2016 3:44:37 AM org.apache.http.impl.execchain.RetryExec execute INFO: Retrying request to {s}->https://nodejs.org:443 [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 17.483s [INFO] Finished at: Thu Dec 01 03:44:39 PST 2016 [INFO] Final Memory: 13M/212M

Please advise.

eirslett commented 7 years ago

You probably have a firewall in jenkins that blocks access to nodejs.org.