[英]Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.6:install-node-and-npm (install node and npm)
I've got this little problem with maven -我遇到了 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]
I'm using Ubuntu 18.04, on windows it works fine.我在 windows 上使用 Ubuntu 18.04,它工作正常。 What can I possibly do with this?
我能用这个做什么? Link to nodejs is fine.
链接到 nodejs 很好。
I've tried: - removing ~/m2/repository/com/github/eirslett, but it didn't help, - using global and intellij maven, 3.5.2 and 3.3.9 respectively, - multiple mvn clean install我试过: - 删除 ~/m2/repository/com/github/eirslett,但没有帮助, - 分别使用 global 和 intellij maven,3.5.2 和 3.3.9, - 多个 mvn 全新安装
Could it be a problem with firewall?会不会是防火墙的问题? If yes, then why and how to fix it?
如果是,那么为什么以及如何解决它? Or at least if somebody could give a clue as to what's going on with this crap:/
或者至少如果有人可以提供关于这个废话发生了什么的线索:/
Here is my pom.xml:这是我的 pom.xml:
<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>
Since this is a top answer when googling this error, if you're facing this issue and on a Mac with the new M1 chip you need to upgrade to at least version 1.11.0
for this plugin to work.由于这是搜索此错误时的最佳答案,因此如果您遇到此问题并且在使用新 M1 芯片的 Mac 上,您需要至少升级到
1.11.0
版本才能使此插件正常工作。
@maxshuty response actually worked for me, I was having the same issue while using m1 Mac. @maxshuty 响应实际上对我有用,我在使用 m1 Mac 时遇到了同样的问题。
Thanks!谢谢!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.