我正在使用eirslett frontend-maven-plugin构建war文件,但出现以下错误:
[ERROR]错误发生意外错误: “ http://registry.npmjs.org/calendar-utils/-/calendar-utils-0.1.2.tgz: 请求失败\“ 403禁止访问\”“。
下面是我如何使用插件的pom.xml
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<version>${frontend-maven-plugin.version}</version>
<executions>
<execution>
<id>install node and yarn</id>
<goals>
<goal>install-node-and-yarn</goal>
</goals>
<configuration>
<nodeVersion>${node.version}</nodeVersion>
<yarnVersion>${yarn.version}</yarnVersion>
<nodeDownloadRoot>https://nodejs.org/dist/</nodeDownloadRoot>
<npmDownloadRoot>http://registry.npmjs.org/npm/-/</npmDownloadRoot>
</configuration>
</execution>
<execution>
<id>yarn install</id>
<goals>
<goal>yarn</goal>
</goals>
<configuration>
<arguments>install --force</arguments>
</configuration>
</execution>
<execution>
<id>webpack build test</id>
<goals>
<goal>yarn</goal>
</goals>
<phase>test</phase>
<configuration>
<arguments>run webpack:test</arguments>
<yarnInheritsProxyConfigFromMaven>true</yarnInheritsProxyConfigFromMaven>
</configuration>
</execution>
<execution>
<id>webpack build prod</id>
<goals>
<goal>yarn</goal>
</goals>
<phase>generate-resources</phase>
<configuration>
<arguments>run webpack:prod</arguments>
<yarnInheritsProxyConfigFromMaven>true</yarnInheritsProxyConfigFromMaven>
</configuration>
</execution>
</executions>
</plugin>
我仅在产品资料中遇到此问题
./mvnw -Pprod package -DskipTests
欢迎使用任何指针。