Mavenのgmaven-pluginで実行されるGroovyスクリプトで使用可能な変数の完全なリストはどこで入手できますか?それに加えて、Gmavenのドキュメントがどこにあるか知っている人がいるかもしれません。
私はとについて知っていproject
ますsettings
。他にもあると思います。
Mavenのgmaven-pluginで実行されるGroovyスクリプトで使用可能な変数の完全なリストはどこで入手できますか?それに加えて、Gmavenのドキュメントがどこにあるか知っている人がいるかもしれません。
私はとについて知っていproject
ますsettings
。他にもあると思います。
ページhttp://docs.codehaus.org/display/GMAVEN/Executing+Groovy+Codeリスト:
Default Variables
By default a few variables are bound into the scripts environment:
project The maven project, with auto-resolving properties
pom Alias for project
session The executing MavenSession
settings The executing Settings
log A SLF4J Logger instance
ant An AntBuilder instance for easy access to Ant tasks
fail() A helper to throw MojoExecutionException
pom のこのスニペットは、スクリプトの実行中に何が利用できるかをよりよく理解できるはずです。興味深い部分のほとんどは、おそらく MavenProject のインスタンスである binding.project にあります。
<build>
<plugins>
<plugin>
<groupId>org.codehaus.groovy.maven</groupId>
<artifactId>gmaven-plugin</artifactId>
<executions>
<execution>
<phase>generate-resources</phase>
<goals>
<goal>execute</goal>
</goals>
<configuration>
<properties>
<hello>world</hello>
</properties>
<source>
println this.binding.variables
println project.properties
println settings.properties
</source>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>