在我们的项目中,我们使用前端maven插件 这是我的pom.xml:
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<version>1.0</version>
<configuration>
<workingDirectory>src/main/webapp/ui</workingDirectory>
<installDirectory>src/main/webapp/ui/node_modules</installDirectory>
</configuration>
<executions>
<execution>
<!--Needed To run Grunt Tasks-->
<id>install node and npm</id>
<goals>
<goal>install-node-and-npm</goal>
</goals>
<configuration>
<nodeVersion>v5.3.0</nodeVersion>
<npmVersion>3.3.12</npmVersion>
</configuration>
</execution>
<execution>
<id>grunt build</id>
<goals>
<goal>grunt</goal>
</goals>
</execution>
</executions>
</plugin>
当我清理安装项目时,我收到了这个错误:
led to execute goal com.github.eirslett:frontend-maven-plugin:1.0:install-node-and-npm (install node and npm) on project web: The plugin com.github.eirslett:frontend-maven-plugin:1.0 requires Maven version 3.1.0 -> [Help 1]
My Maven的版本是3.3.3我也尝试使用版本3.1.0并且它得到了相同的错误,所以我在settings.xml中使用了代理但是它得到了同样的错误。