Uploaded image for project: 'Nuxeo ECM Build/Test Environment'
  1. Nuxeo ECM Build/Test Environment
  2. NXBT-3019

Correctly resolve Maven binary on Windows

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: CODEGEN-3.0
    • Component/s: Nuxeo CLI

      Description

      When running nuxeo studio export from Windows, this error occured:

      Tue, 24 Sep 2019 14:25:53 GMT nuxeo:generator:maven 'mvn' n'est pas reconnu en tant que commande interne
      ou externe, un programme ex�cutable ou un fichier de commandes.
      events.js:174
            throw er; // Unhandled 'error' event
            ^
      Error: spawn mvn ENOENT
          at notFoundError (C:\Users\tcasanova\AppData\Roaming\npm\node_modules\nuxeo-cli\node_modules\cross-spawn\lib\enoent.js:11:11)
          at verifyENOENT (C:\Users\tcasanova\AppData\Roaming\npm\node_modules\nuxeo-cli\node_modules\cross-spawn\lib\enoent.js:46:16)
          at ChildProcess.cp.emit (C:\Users\tcasanova\AppData\Roaming\npm\node_modules\nuxeo-cli\node_modules\cross-spawn\lib\enoent.js:33:19)
          at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
      Emitted 'error' event at:
          at ChildProcess.cp.emit (C:\Users\tcasanova\AppData\Roaming\npm\node_modules\nuxeo-cli\node_modules\cross-spawn\lib\enoent.js:36:37)
          at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
      

      Maven is spawned using mvn which is different from Windows executable which is mvn.cmd.

      One approach could be to change the spawn process depending of the

      const bin = process.platform === "win32" ? 'mvn.cmd' : 'mvn';

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                1 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 30 minutes
                  30m