开发者

Run unbound groovy script in gmaven

According to documentation, it is possible to bind a groovy script to a phase of maven lifecycle, but how do I run it "unbound" ? In other words, I want to do the following thing

Declare my groovy script to use :

<plugin>
    <groupId>org.codehaus.groovy.maven</groupId>
    <artifactId>gmaven-plugin</artifactId>
    <configuration>
        <source>${pom.basedir}/src/main/script/myscript.groovy</开发者_运维技巧source>
    </configuration>
</plugin>

Then invoke it directly from command-line (outside of any lifecycle). But how do I achieve that ?


> mvn org.codehaus.gmaven:gmaven-plugin:execute

note that if you want to select different scripts from the commandline, you have to define different configurations each one in a profile and pick the profile instead.


It was extremely excruciating to fiddle with GMaven on eclipse I found a best ever solution here on my git hub using maven eclipse plug in https://github.com/mukadder/groovygmaven.git

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜