<div dir="ltr">Chris,<div><br></div><div>Apologies for the delayed response, I'm currently working on another project. I also got your PMs on IRC, I'll message you back on there now. But in the meantime, are you running CentOS? This is more of a Jenkins and frontend-maven-plugin issue as opposed to an apiman-specific issue, but I can try my best to help.</div><div><br></div><div>I think this could possibly be an issue with the fact that your project has a space in the name, as I've had issues in the past related to spaces in the project name. Either way, it doesn't hurt to try building it without spaces! Also, don't forget to undo the changes you've made to node/npm as you don't want it to affect that.</div><div><br></div><div>1. It doesn't need to use a relative path because the local Node binary that is being used is responsible for calling `npm install` (locally). Having said that, if you don't have a Node path set, it's going to use the globally installed Node and you try this manually without the frontend-maven-plugin. If you are 100% sure you're not doing that, then there could be a bug in the plugin that handles that: <a href="https://github.com/eirslett/frontend-maven-plugin">https://github.com/eirslett/frontend-maven-plugin</a></div><div><br></div><div>2, 3. Try building manually as the Jenkins user, so that it's easier to debug. Btw, what error are you getting on the build as the Jenkins user?</div><div><br></div><div>- Download the jenkins-cli.jar file (http://<jenkins server>/jnlpJars/jenkins-cli.jar) and place this jar in the directory from which you are going to run the Jenkins build command.</div><div>- Switch to the Jenkins user with `sudo su -s /bin/bash jenkins` on the build server.</div><div>- cd into the `<span style="font-size:13px;color:rgb(51,51,51);font-family:Calibri,Arial,Helvetica,sans-serif;white-space:pre-wrap">/var/lib/jenkins/jobs/Upgrade APIMAN/workspace/manager/ui/</span><span style="font-size:13px;color:rgb(51,51,51);font-family:Calibri,Arial,Helvetica,sans-serif;white-space:pre-wrap">war</span>` directory, or wherever Jenkins is storing the workspace files.</div><div>- Use the Jenkins CLI to build it manually. You can view the CLI commands available at http://<jenkins server >/cli/ ( e.g <a href="http://localhost:8080/cli/">http://localhost:8080/cli/</a> ), but it will the build command will be something like this: java -jar jenkins-cli.jar -s http://<jenkins server>/ build build-name [-c] [-f] [-p] [-r N] [-s] [-v] [-w]</div><div><br></div><div>Some of the flags are very useful in this case:</div><div><div>-f : Follow the build progress. Like -s only interrupts are not passed through to the build.</div><div>-p : Specify the build parameters in the key=value format.</div><div>-v : Prints out the console output of the build. Use with -s</div></div><div><br></div><div>I would try adding build parameters to see if it's really an issue with the NODE_EXE var. Absolute worst case scenario, temporarily set the NODE_EXE var for that specific project either via an execute shell script on the Jenkins job configuration settings (can't remember if that's a separate plugin or not), or you can switch to the Jenkins user and set it that way. You shouldn't have to do this though, and if you do, I'd open up a PR in the frontend-maven-plugin repo.</div><div><br></div><div>Hope this helps!</div><div><br></div><div>Rachel</div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jun 15, 2016 at 2:47 PM, Christopher Stolte <span dir="ltr"><<a href="mailto:cstolte@ebsco.com" target="_blank">cstolte@ebsco.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<div style="font-size:12pt;color:#000000;background-color:#ffffff;font-family:Calibri,Arial,Helvetica,sans-serif">
<p>Hi Rachel,</p>
<p><br>
</p>
<p>Thanks for your response. There are a few things here which are confusing me:</p>
<p><br>
</p>
<p>1. the build log says <span style="color:rgb(51,51,51);font-size:13px;white-space:pre-wrap">"Running 'npm install --color=false' in /var/lib/jenkins/jobs/Upgrade APIMAN/workspace/manager/ui/war"</span></p>
<p><span style="font-family:Calibri,Arial,Helvetica,sans-serif,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols;font-size:16px">is that correct? (it seems like it's trying to run a globally installed
npm...) If it's trying to use a locally installed npm, why isn't is using a relative path to it?</span><br>
</p>
<p><br>
</p>
<p><span style="font-family:Calibri,Arial,Helvetica,sans-serif,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols;font-size:16px">2.
</span><span style="font-size:12pt">If I change manager/ui/war/node/npm so that NODE_EXE=./node/node (instead of "node") it succeeds.</span></p>
<p><span style="font-family:Calibri,Arial,Helvetica,sans-serif,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols;font-size:16px"><br>
</span></p>
<p><span style="font-family:Calibri,Arial,Helvetica,sans-serif,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols;font-size:16px">3. The failing job is being run by Jenkins, and the Jenkins user has
no node on it's path. But if I run the build as a different user who does, it works.</span></p>
<p><span style="font-family:Calibri,Arial,Helvetica,sans-serif,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols;font-size:16px"><br>
</span></p>
<p><span style="font-family:Calibri,Arial,Helvetica,sans-serif,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols;font-size:16px">It seems that the plugin which installs nodejs locally, or some subsequent
part of the build process, isn't referring to them correctly (and thus is dependent on a globally installed node in order to work). Any insight? For what it's worth I can build the exact same source, from the same repo, with the same command, on my mac, which
has node and npm installed globally.</span></p>
<p><span style="font-family:Calibri,Arial,Helvetica,sans-serif,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols;font-size:16px"><br>
</span></p>
<p><span style="font-family:Calibri,Arial,Helvetica,sans-serif,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols;font-size:16px">Thanks,</span></p>
<p><span style="font-family:Calibri,Arial,Helvetica,sans-serif,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols;font-size:16px">Chris</span></p>
</div>
<hr style="display:inline-block;width:98%">
<div dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Rachel Yordan <<a href="mailto:ryordan@redhat.com" target="_blank">ryordan@redhat.com</a>><br>
<b>Sent:</b> Wednesday, June 15, 2016 1:21:53 PM<br>
<b>To:</b> Christopher Stolte<br>
<b>Cc:</b> <a href="mailto:apiman-user@lists.jboss.org" target="_blank">apiman-user@lists.jboss.org</a><br>
<b>Subject:</b> Re: [Apiman-user] building apiman on Redhat</font>
<div> </div>
</div><div><div class="h5">
<div>
<div dir="ltr">
<div>Hey Chris,</div>
<div><br>
</div>
<div>When you run `$ npm install` or even `$ node -v` you are using the globally installed binary as opposed to the local one, even if you are within the directory, as you can see here:</div>
<div><br>
</div>
<div>npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "--color=false"<br>
</div>
<div><br>
</div>
<div>The deprecation warning at the end of the build log should not be enough to cause a build failure. To get a more detailed error regarding the build failure I'd try using the local binary from within the `war` directory you were in with `$ node/npm install
--color=false`. You can also test that it's using the correct binary with `$ node/npm -v` or `$ node/node -v`. What is causing the build to fail could be several things, but I always recommend starting with a clean slate before each test build -- try running
the following before triggering your build again:</div>
<div><br>
</div>
<div>$ rm -rf node_modules/<br>
</div>
<div>$ npm cache clean</div>
<div><br>
</div>
<div>Feel free to ping me on IRC if that doesn't help you get a better idea of what's going on. Hope it helps! :)</div>
<div><br>
</div>
Rachel Yordán
<div>IRC: ryordan<br>
<div>GH: <a href="https://github.com/kahboom" target="_blank">@kahboom</a></div>
</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Wed, Jun 15, 2016 at 10:59 AM, Christopher Stolte <span dir="ltr">
<<a href="mailto:cstolte@ebsco.com" target="_blank">cstolte@ebsco.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">
<div style="font-size:12pt;color:#000000;background-color:#ffffff;font-family:Calibri,Arial,Helvetica,sans-serif">
<p>Hello,</p>
<p><br>
</p>
<p>I am trying to build apiman-1.2.6.Final on Redhat. Server details:</p>
<p><br>
</p>
<p></p>
<p><span>$ uname -or</span></p>
<p><span>3.10.0-229.el7.x86_64 GNU/Linux</span></p>
<p><span><br>
</span></p>
<p><span>$ java -version</span></p>
<p><span>openjdk version "1.8.0_91"</span></p>
<p><span><br>
</span></p>
<p><span>The build fails at this point:</span></p>
<p><span><br>
</span></p>
<p><span></span></p>
<p><span style="font-size:10pt">[INFO] --- frontend-maven-plugin:0.0.27:install-node-and-npm (install node and npm) @ apiman-manager-ui-war ---</span></p>
<p></p>
<p><span></span></p>
<pre style="white-space:pre-wrap;word-wrap:break-word;margin-top:0px;margin-bottom:0px;color:rgb(51,51,51);font-size:13px"><p><span style="font-family:Calibri,Arial,Helvetica,sans-serif">[INFO] Found proxies: []</span></p><p><span style="font-family:Calibri,Arial,Helvetica,sans-serif">[INFO] Installing node version v5.6.0</span></p><p><span style="font-family:Calibri,Arial,Helvetica,sans-serif">[INFO] Creating temporary directory /home/cloud-user/apiman-build/manager/ui/war/node_tmp</span></p><p><span style="font-family:Calibri,Arial,Helvetica,sans-serif">[INFO] Downloading Node.js from <a href="https://nodejs.org/dist/v5.6.0/node-v5.6.0-linux-x64.tar.gz" target="_blank">https://nodejs.org/dist/v5.6.0/node-v5.6.0-linux-x64.tar.gz</a> to /home/cloud-user/apiman-build/manager/ui/war/node_tmp/node.tar.gz</span></p><p><span style="font-family:Calibri,Arial,Helvetica,sans-serif">[INFO] No proxies configured</span></p><p><span style="font-family:Calibri,Arial,Helvetica,sans-serif">[INFO] No proxy was configured, downloading directly</span></p><p><span style="font-family:Calibri,Arial,Helvetica,sans-serif">[INFO] Extracting Node.js files in node_tmp</span></p><p><span style="font-family:Calibri,Arial,Helvetica,sans-serif">[INFO] Unpacking /home/cloud-user/apiman-build/manager/ui/war/node_tmp/node.tar.gz into /home/cloud-user/apiman-build/manager/ui/war/node_tmp</span></p><p><span style="font-family:Calibri,Arial,Helvetica,sans-serif">[INFO] Moving node binary to /home/cloud-user/apiman-build/manager/ui/war/node/node</span></p><p><span style="font-family:Calibri,Arial,Helvetica,sans-serif">[INFO] Deleting temporary directory /home/cloud-user/apiman-build/manager/ui/war/node_tmp</span></p><p><span style="font-family:Calibri,Arial,Helvetica,sans-serif">[INFO] Installed node locally.</span></p><p><span style="font-family:Calibri,Arial,Helvetica,sans-serif">[INFO] Installing npm version 3.6.0</span></p><p><span style="font-family:Calibri,Arial,Helvetica,sans-serif">[INFO] Downloading NPM from <a href="http://registry.npmjs.org/npm/-/npm-3.6.0.tgz" target="_blank">http://registry.npmjs.org/npm/-/npm-3.6.0.tgz</a> to /home/cloud-user/apiman-build/manager/ui/war/npm.tar.gz</span></p><p><span style="font-family:Calibri,Arial,Helvetica,sans-serif">[INFO] No proxies configured</span></p><p><span style="font-family:Calibri,Arial,Helvetica,sans-serif">[INFO] No proxy was configured, downloading directly</span></p><p><span style="font-family:Calibri,Arial,Helvetica,sans-serif">[INFO] Extracting NPM files in node/</span></p><p><span style="font-family:Calibri,Arial,Helvetica,sans-serif">[INFO] Unpacking /home/cloud-user/apiman-build/manager/ui/war/npm.tar.gz into /home/cloud-user/apiman-build/manager/ui/war/node/node_modules</span></p><p><span style="font-family:Calibri,Arial,Helvetica,sans-serif">[INFO] Installed NPM locally.</span></p><p><span style="font-family:Calibri,Arial,Helvetica,sans-serif">[INFO] </span></p><p><span style="font-family:Calibri,Arial,Helvetica,sans-serif">[INFO] --- frontend-maven-plugin:0.0.27:npm (npm install) @ apiman-manager-ui-war ---</span></p><p><span style="font-family:Calibri,Arial,Helvetica,sans-serif">[INFO] Found proxies: []</span></p><p><span style="font-family:Calibri,Arial,Helvetica,sans-serif">[INFO] Running 'npm install --color=false' in /home/cloud-user/apiman-build/manager/ui/war</span></p><p><span style="font-family:Calibri,Arial,Helvetica,sans-serif">[ERROR] npm WARN deprecated graceful-fs@1.2.3: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.</span></p><span style="color:rgb(204,0,0);font-weight:bold"></span></pre>
<br>
<p></p>
<p><span>Node/npm appear to be globally installed:</span></p>
<p><span><br>
</span></p>
<p><span></span></p>
<p><span>$ npm -v</span></p>
<p><span>2.15.1</span></p>
<p><span>$ node -v</span></p>
<p><span>v4.4.3</span></p>
<p><span><br>
</span></p>
<p><span><span style="font-family:Calibri,Arial,Helvetica,sans-serif,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols;font-size:16px">I then tried to execute that npm command from the stated directory, and got
this:</span><br>
</span></p>
<p><span><span style="font-family:Calibri,Arial,Helvetica,sans-serif,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols;font-size:16px"><br>
</span></span></p>
<p><span>$ cd manager/ui/war</span></p>
<p><span>$ npm install --color=false</span></p>
<p><span>npm WARN peerDependencies The peer dependency marked@^0.3.3 included from marked-terminal will no</span></p>
<p><span>npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency </span></p>
<p><span>npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.</span></p>
<p><span>npm WARN prefer global marked@0.3.5 should be installed with -g</span></p>
<p><span>npm WARN deprecated graceful-fs@1.2.3: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.</span></p>
<p><span>npm WARN peerDependencies The peer dependency grunt@>=0.4.0 included from grunt-contrib-cssmin will no</span></p>
<p><span>npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency </span></p>
<p><span>npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.</span></p>
<p><span>npm WARN peerDependencies The peer dependency grunt@~0.4.1 included from grunt-jekyll will no</span></p>
<p><span>npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency </span></p>
<p><span>npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.</span></p>
<p><span>npm WARN peerDependencies The peer dependency grunt@~0.4.5 included from grunt-contrib-less will no</span></p>
<p><span>npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency </span></p>
<p><span>npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.</span></p>
<p><span>npm WARN peerDependencies The peer dependency grunt@~0.4.0 included from grunt-contrib-uglify will no</span></p>
<p><span>npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency </span></p>
<p><span>npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.</span></p>
<p><span>npm WARN peerDependencies The peer dependency grunt@~0.4.0 included from grunt-contrib-connect will no</span></p>
<p><span>npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency </span></p>
<p><span>npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.</span></p>
<p><span>npm WARN deprecated lodash@2.4.1: lodash@<3.0.0 is no longer maintained. Upgrade to lodash@^4.0.0.</span></p>
<p><span>npm WARN peerDependencies The peer dependency grunt@~0.4.0 included from grunt-contrib-watch will no</span></p>
<p><span>npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency </span></p>
<p><span>npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.</span></p>
<p><span>npm ERR! Linux 3.10.0-229.el7.x86_64</span></p>
<p><span>npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "--color=false"</span></p>
<p><span>npm ERR! node v4.4.3</span></p>
<p><span>npm ERR! npm v2.15.1</span></p>
<p><span>npm ERR! code EBADPLATFORM</span></p>
<p><span>npm ERR! notsup Unsupported</span></p>
<p><span>npm ERR! notsup Not compatible with your operating system or architecture: fsevents@1.0.8</span></p>
<p><span>npm ERR! notsup Valid OS: darwin</span></p>
<p><span>npm ERR! notsup Valid Arch: any</span></p>
<p><span>npm ERR! notsup Actual OS: linux</span></p>
<p><span>npm ERR! notsup Actual Arch: x64</span></p>
<p><span>npm ERR! Please include the following file with any support request:</span></p>
<p><span>npm ERR! /home/cloud-user/apiman-build/manager/ui/war/npm-debug.log</span></p>
<br>
<p></p>
<p>Does anyone have an idea as to what is going on here? I see some threads about the maven plugin that installs node/npm locally (<a href="https://issues.jboss.org/browse/APIMAN-771" target="_blank">https://issues.jboss.org/browse/APIMAN-771</a>), but it isn't
quite what's going on here. I'm especially confused about versions, since the plugin installed versions [5.6.0/3.6.0] locally but the above error message is referencing the globally installed versions [4.4.3/2.15.1].</p>
<p><br>
</p>
<p>Any help much appreciated!</p>
<p>Chris</p>
<p><span><br>
</span></p>
<br>
<p></p>
</div>
</div>
<br>
_______________________________________________<br>
Apiman-user mailing list<br>
<a href="mailto:Apiman-user@lists.jboss.org" target="_blank">Apiman-user@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/apiman-user" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/apiman-user</a><br>
<br>
</blockquote>
</div>
<br>
</div>
</div>
</div></div></div>
</blockquote></div><br></div>