首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >执行目标com.github.eirslett:frontend-maven-plugin:1.6:install-node-and-npm失败(安装节点和npm)

执行目标com.github.eirslett:frontend-maven-plugin:1.6:install-node-and-npm失败(安装节点和npm)
EN

Stack Overflow用户
提问于 2018-08-01 06:53:17
回答 1查看 6.5K关注 0票数 4

我对maven有个小问题-

[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.6:install-node-and-npm (install node and npm) on project xxx-frontend: Could not download Node.js: Could not download https://nodejs.org/dist/v8.11.2/node-v8.11.2-linux-x64.tar.gz: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty -> [Help 1]

我使用的是Ubuntu 18.04,在windows上运行良好。我能用这个做什么呢?链接到nodejs就可以了。

我尝试过:-删除~/m2/repository/com/github/eirslett,但没有帮助,-使用global和intellij maven,分别为3.5.2和3.3.9 -多个mvn全新安装

这可能是防火墙的问题吗?如果是,那么为什么以及如何修复它?或者至少如果有人能给出一个线索,这是怎么回事:/

这是我的pom.xml:

代码语言:javascript
复制
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>

<artifactId>xxx-frontend</artifactId>
<version>0.0.4</version>
<packaging>pom</packaging>
<name>xxx::Frontend</name>
<description>frontend</description>

<parent>
    <groupId>xx.xxx</groupId>
    <artifactId>xxx</artifactId>
    <version>0.0.1</version>
    <relativePath>..</relativePath>
</parent>

<profiles>
    <profile>
        <id>build-with-front</id>
        <activation>
            <activeByDefault>true</activeByDefault>
        </activation>
        <build>
            <plugins>
                <plugin>
                    <groupId>com.github.eirslett</groupId>
                    <artifactId>frontend-maven-plugin</artifactId>
                    <version>1.6</version>
                    <configuration>
                        <nodeVersion>v8.11.2</nodeVersion>
                        <npmVersion>6.1.0</npmVersion>
                        <installDirectory>node</installDirectory>
                    </configuration>

                    <executions>
                        <execution>
                            <id>install node and npm</id>
                            <goals>
                                <goal>install-node-and-npm</goal>
                            </goals>
                            <phase>generate-resources</phase>
                        </execution>

                        <execution>
                            <id>npm install</id>
                            <goals>
                                <goal>npm</goal>
                            </goals>
                            <phase>generate-resources</phase>
                            <configuration>
                                <arguments>install</arguments>
                            </configuration>
                        </execution>

                        <execution>
                            <id>npm build</id>
                            <goals>
                                <goal>npm</goal>
                            </goals>
                            <phase>generate-resources</phase>
                            <configuration>
                                <arguments>run maven:build</arguments>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <artifactId>maven-clean-plugin</artifactId>
                    <version>3.0.0</version>
                    <configuration>
                        <filesets>
                            <fileset>
                                <directory>dist</directory>
                            </fileset>
                        </filesets>
                    </configuration>
                </plugin>
            </plugins>
        </build>
    </profile>
</profiles>

EN

回答 1

Stack Overflow用户

发布于 2021-06-01 00:18:53

因为这是谷歌搜索这个错误时的首选答案,如果你遇到这个问题,在安装了新的M1芯片的Mac上,你至少需要升级到1.11.0版本才能让这个插件工作。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/51623180

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档