2014-03-05 68 views
0

我堅持使用maven進行構建和編譯,但現在引入JavaScript構建和自動化提供了一個有趣的挑戰,那我們可以使用maven來安裝Grunt嗎?使用maven安裝grunt

我已經搜查,發現了大量的pom.xml examplesexample的運行呻吟yoeman等,但沒有安裝咕嚕

類似:

<plugin> 
    <groupId>org.codehaus.mojo</groupId> 
    <artifactId>exec-maven-plugin</artifactId> 
    <version>1.2.1</version> 
    <executions> 
     <execution> 
      <id>Install Grunt</id> 
      <phase>prepare-package</phase> 
      <goals> 
       <goal>exec</goal> 
      </goals> 
      <configuration> 
       <executable>grunt</executable> 
       <arguments> 
        <argument>install</argument> 
       </arguments> 
      </configuration> 
     </execution> 
    </executions> 
</plugin> 

回答

0

對不起,這是一個非常晚回答...通過使用前端maven插件,您可以通過將其安裝在package.json中來「安裝」Grunt。然後,npm會爲你下載它。 (如在示例項目中)