无法执行goal com.github.eirslett:frontend-maven-plugin:0.0.22:install-node-and-npm:服务器错误代码503

t9eec4r0  于 2023-04-05  发布在  Maven
关注(0)|答案(1)|浏览(275)

在尝试构建项目时,我得到以下错误:

Failed to execute goal com.github.eirslett:frontend-maven-plugin:0.0.22:install-node-and-npm (install node and npm) on project ProjectName: Could not download Node.js from: http://nodejs.org/dist/v0.10.40/x64/node.exe: Got error code 503 from the server.

这是我的com.github.eirslett:frontend-maven-plugin的pom.xml实现。
一切似乎都很好,没有编译错误,但在尝试构建时,上面的错误出现了。

<?xml version="1.0" encoding="UTF-8"?>
<plugin>
    <groupId>com.github.eirslett</groupId>
    <artifactId>frontend-maven-plugin</artifactId>
    <!-- NB! Set <version> to the latest released version of frontend-maven-plugin, like in README.md -->
    <version>0.0.22</version>
    <executions>
        <execution>
            <id>install node and npm</id>
            <phase>initialize</phase>
            <goals>
                <goal>install-node-and-npm</goal>
            </goals>
            <configuration>
                <nodeVersion>v0.10.40</nodeVersion>
                <npmVersion>2.5.1</npmVersion>
            </configuration>
        </execution>
        <execution>
            <id>npm install</id>
            <phase>initialize</phase>
            <goals>
                <goal>npm</goal>
            </goals>
            <!-- Optional configuration which provides for running any npm command -->
            <configuration>
                <arguments>install</arguments>
            </configuration>
        </execution>
        <execution>
            <id>grunt build</id>
            <goals>
                <goal>grunt</goal>
            </goals>
            <configuration>
                <arguments>build --no-color</arguments>
            </configuration>
        </execution>
    </executions>
</plugin>
gojuced7

gojuced71#

我猜你是通过代理服务器使用它的
此版本的插件于2015年2月发布。并且有一个reported issue与此问题有关。

<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<!-- NB! Set <version> to the latest released version of frontend-maven-plugin, like in README.md -->
<version>0.0.22</version>

答案就在问题中:
设置为frontend-maven-plugin的最新发布版本

相关问题