2
我正在嘗試構建/編譯使用前端maven插件的maven項目。然而,當引人注目的項目中,我得到的IntelliJ IDEA中此錯誤:由於frontent-maven-plugin構建maven項目出錯
Failed to execute goal com.github.eirslett:frontend-maven-plugin:0.0.26:install-node-and-npm (install node and npm) on project PROJECT-NAME: The plugin com.github.eirslett:frontend-maven-plugin:0.0.26 requires Maven version 3.1.0
我的Maven 3.3.3安裝,以便在降級太3.1.1但我仍然收到了同樣的錯誤。
這是我的pom.xml文件,該文件詳細介紹了插件的部分:
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<version>0.0.26</version>
<configuration>
<workingDirectory>src/web</workingDirectory>
</configuration>
<executions>
<execution>
<id>install node and npm</id>
<goals>
<goal>install-node-and-npm</goal>
</goals>
<phase>validate</phase>
<configuration>
<nodeVersion>v0.12.7</nodeVersion>
<npmVersion>2.11.3</npmVersion>
</configuration>
</execution>
<execution>
<id>npm install</id>
<goals>
<goal>npm</goal>
</goals>
<phase>generate-sources</phase>
<configuration>
<arguments>install</arguments>
</configuration>
</execution>
<execution>
<id>gulp dev build</id>
<goals>
<goal>gulp</goal>
</goals>
<phase>generate-resources</phase>
<configuration>
<arguments>dev-once</arguments>
</configuration>
</execution>
</executions>
</plugin>
當運行在終端mvn clean install --debug
我得到的錯誤;
[DEBUG] -- end configuration --
[INFO] Found proxies: []
[INFO] Installing node version v0.12.7
[INFO] Creating temporary directory /Users/folder/Development/BSD/eng-bsd-bigted-server-ice-tea/src/web/node_tmp
[INFO] Downloading Node.js from http://nodejs.org/dist/v0.12.7/node-v0.12.7-darwin-x64.tar.gz to /Users/folder/Development/BSD/eng-bsd-bigted-server-ice-tea/src/web/node_tmp/node.tar.gz
[INFO] No proxies configured
[INFO] No proxy was configured, downloading directly
Nov 03, 2015 1:41:30 PM org.apache.http.impl.execchain.RetryExec execute
INFO: I/O exception (java.net.NoRouteToHostException) caught when processing request: No route to host
Nov 03, 2015 1:41:30 PM org.apache.http.impl.execchain.RetryExec execute
INFO: Retrying request
錯誤很明顯:「插件com.github.eirslett:frontend-maven-plugin:0.0.26需要Maven版本3.1.0」。你在使用Maven 3.1.0嗎? – Tunaki
嗯我假定它的工作版本3.1.1 – chinds
如果你在命令行上運行Maven會發生同樣的情況嗎?你可以添加 - 調試到Maven選項併發布輸出? –