title: Extra directory layer added to path with Maven compile
body: <p>I am trying to use maven to compile my first JHipster basic app. I have <code>node</code> as an exe &amp; <code>npm</code> as a symbolic link locally at the path <code>/home/myuser/.nvm/versions/node/v16.17.0/bin</code> (see <code>ll</code> below), and <em>I want to use my local node &amp; npm</em>, not have maven install them both. The problem is that when I run <code>mvn clean compile</code>, I get the error at bottom.</p>
  <p>To me, the error shows that somewhere in the pom <code>/node/node</code> is being appended to the path, when I only (I think) need <code>/node</code> appended.</p>
  <p>Where am I getting the extra <code>/node</code> from?</p>
  <p>The pom is large, but here is my <code>frontend-maven-plugin</code> (<a href="https://github.com/eirslett/frontend-maven-plugin/blob/master/README.md#installation-directory" rel="nofollow noreferrer">this</a> is source for adding <code>&lt;installDirectory&gt;</code>):</p>
  <pre><code>&lt;plugin&gt;
      &lt;groupId&gt;com.github.eirslett&lt;/groupId&gt;
      &lt;artifactId&gt;frontend-maven-plugin&lt;/artifactId&gt;
      &lt;executions&gt;
          &lt;execution&gt;
              &lt;id&gt;webapp build dev&lt;/id&gt;
              &lt;goals&gt;
                  &lt;goal&gt;npm&lt;/goal&gt;
              &lt;/goals&gt;
              &lt;phase&gt;generate-resources&lt;/phase&gt;
              &lt;configuration&gt;
                  &lt;arguments&gt;run webapp:build&lt;/arguments&gt;
                  &lt;environmentVariables&gt;
                      &lt;APP_VERSION&gt;${project.version}&lt;/APP_VERSION&gt;
                  &lt;/environmentVariables&gt;
                  &lt;npmInheritsProxyConfigFromMaven&gt;false&lt;/npmInheritsProxyConfigFromMaven&gt;
                  &lt;installDirectory&gt;/home/myuser/.nvm/versions/node/v16.17.0/bin&lt;/installDirectory&gt;
              &lt;/configuration&gt;
          &lt;/execution&gt;
      &lt;/executions&gt;
  &lt;/plugin&gt;
  </code></pre>
  <p>I commented out these executions due to having node/npm locally installed (listed here in brief):</p>
  <pre><code>        &lt;id&gt;install-node-and-npm&lt;/id&gt;
          &lt;goals&gt;&lt;goal&gt;install-node-and-npm&lt;/goal&gt;&lt;/goals&gt;
  
          &lt;id&gt;npm install&lt;/id&gt;
          &lt;goals&gt;&lt;goal&gt;npm&lt;/goal&gt;&lt;/goals&gt;
  </code></pre>
  <p>Node location</p>
  <pre><code>&gt; ll /home/myuser/.nvm/versions/node/v16.17.0/bin
  ...
  drwxr-xr-x. 2 myuser mygroup     4096 Aug 16 02:36 .
  drwxr-xr-x. 6 myuser mygroup     4096 Sep 12 17:39 ..
  -rwxr-xr-x. 1 myuser mygroup 82214176 Aug 16 02:36 node
  ...
  </code></pre>
  <p>Error</p>
  <pre><code>Cannot run program &quot;/home/myuser/.nvm/versions/node/v16.17.0/bin/node/node&quot; (in directory &quot;/home/myuser/Documents/projects/jhipster/firstApp&quot;): error=20, Not a directory
  </code></pre>
  <p>I can paste the 1300 line pom.xml if needed.</p>
  <p>I tried adding the exec-maven-plugin based on <a href="https://stackoverflow.com/questions/37329708/can-frontend-maven-plugin-use-node-npm-already-installed">this</a>, but the error persisted.</p>
  <p><strong>UPDATE</strong><br />
  For reasons beyond this scope, using node/npm locally is currently my only option, so I do not need maven to install them.</p>