def jack = new Person().with {
name = "jack"
age = 12
//不return自己,就会返回age,最后jack会变成12
return it
}
each {
it.each {
println it
}
}
// 可以
def s = (1..10000).sum()
println s
//不红,会报错
println (1..10000).sum()
//可以,等于第一个
println((1..10000).sum())
//可以,不会报错,但是不太红,不是我们想要的
1..10000.each {
println it
}
//可以
(1..10000).each {
println it
}
//索引0开始,用值需谨慎
10000.times {
}
]]>AbstractMojo
@Parameter(defaultValue = "${project}", readonly = true)
@Parameter(property = "config.name")
execute()
<plugin>
<groupId>xxx</groupId>
<artifactId>xxx</artifactId>
<!--注意使用最新版本-->
<version>1.1</version>
<configuration>
<name>xxxx.xxxx.xxx</name>
</configuration>
<executions>
<execution>
<phase>process-resources</phase>
<goals>
<goal>xxx</goal>
</goals>
</execution>
</executions>
</plugin>
]]>