开发者

Run unbound groovy script in gmaven

开发者 https://www.devze.com 2023-03-12 03:20 出处:网络
According to documentation, it is possible to bind a groovy script to a phase of maven lifecycle, but how do I run it \"unbound\" ?

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

精彩评论

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