Is it possible to compile grunt project from maven?

后端 未结 9 1560
滥情空心
滥情空心 2021-01-30 16:55

I\'m trying to execute grunt tasks from within maven without needing to install Node.js or anything. This is because I wan\'t my artifact to be packaged by Jenkins and I can\'t

9条回答
  •  忘了有多久
    2021-01-30 17:07

    Finally I ended up with this (which is close enough but doesn't solve the problem):

    
    org.mule.tools.javascript
    npm-maven-plugin
    1.0
    
        
            generate-resources
                
                    fetch-modules
                
                
                    
                        grunt-cli:0.1.6
                    
                
            
        
    
    

    that installs locally the grunt-cli, but if I don't have installed node.js it's worthless. Although I try to install node.js locally there's the need to have installed python, g++ and make. So I'll go with the KISS solution: install grunt in the build server.

    References:
    https://github.com/mulesoft/npm-maven-plugin
    https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager
    https://github.com/mcheely/requirejs-maven-plugin

提交回复
热议问题