【问题标题】:Build with frontend-maven-plugin fails on mac M1在 mac M1 上使用 frontend-maven-plugin 构建失败
【发布时间】:2022-09-28 21:50:39
【问题描述】:

frontend-maven-plugin 尝试下载一个不存在的节点文件。

当我查看https://nodejs.org/dist/v10.15.3 时,我只能看到一个名为node-v10.15.3-darwin-x64.tar.gz 的文件

[INFO] --- frontend-maven-plugin:1.7.5:install-node-and-npm (install node and npm) @ oauth-ui-authorization-code-angular-zuul ---
[INFO] Installing node version v10.15.3
[INFO] Downloading https://nodejs.org/dist/v10.15.3/node-v10.15.3-darwin-arm64.tar.gz to /Users/me/.m2/repository/com/github/eirslett/node/10.15.3/node-10.15.3-darwin-arm64.tar.gz
[INFO] No proxies configured
[INFO] No proxy was configured, downloading directly
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] mymodule 2.2.6.RELEASE FAILURE [  4.536 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  36.930 s
[INFO] Finished at: 2022-09-28T14:28:09+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.7.5:install-node-and-npm (install node and npm) on project mymodule: Could not download Node.js: Got error code 404 from the server. -> [Help 1]

[错误]

    标签: maven frontend-maven-plugin


    【解决方案1】:

    这是frontend-maven-plugin 中的一个错误。 升级到当前版本应该有助于:

    <plugin>
        <groupId>com.github.eirslett</groupId>
        <artifactId>frontend-maven-plugin</artifactId>
        <version>1.12.1</version>
        ...
    

    【讨论】: