Maven에서 gmaven-plugin하에 실행되는 Groovy 스크립트에서 사용할 수있는 전체 변수 목록을 어디에서 얻을 수 있습니까? 게다가, 누군가가 Gmaven 설명서를 찾을 수있는 곳을 알고 있습니까?gmaven-plugin에서 미리 정의 된 변수의 전체 목록은 어디서 구할 수 있습니까?
나는 project
과 settings
에 대해 알고 있습니다. 다른 사람들이 있다고 가정합니다.
Maven에서 gmaven-plugin하에 실행되는 Groovy 스크립트에서 사용할 수있는 전체 변수 목록을 어디에서 얻을 수 있습니까? 게다가, 누군가가 Gmaven 설명서를 찾을 수있는 곳을 알고 있습니까?gmaven-plugin에서 미리 정의 된 변수의 전체 목록은 어디서 구할 수 있습니까?
나는 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
이 스 니펫은 스크립트를 실행하는 동안 사용할 수있는 정보를 제공합니다. 흥미로운 비트의 대부분은 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>
이것은 내가 (질문 참조) 이미 알고 있어요 것입니다. 현재 플러그인의 종속성 목록을 어떻게 얻을 수 있는지 알고 있습니까? – yegor256
MavenProject의 인스턴스 인 스크립트에서 'project'개체 (http://maven.apache.org/ref/2.0.4/maven-project/apidocs/org/apache/maven/project/MavenProject)를 검사하십시오. HTML – TheKaptain