http://blog.csdn.net/chinrui/article/details/66472815
http://www.importnew.com/20348.html
定義Mojo參數(shù)
定義一個(gè)參數(shù)很簡單斑鸦,只需要在Mojo中創(chuàng)建一個(gè)實(shí)例變量并增加恰當(dāng)?shù)淖⒔獠ゼ摺R韵率菐?shù)的簡單Mojo示例:
1
2
3
4
5/**
* The greeting to display.
*/
@Parameter( property ="sayhi.greeting", defaultValue ="Hello World!")
privateString greeting;
注解之前的部分是參數(shù)說明崩泡。參數(shù)注解將變量聲明為Mojo參數(shù)罕容。注解的defaultValue參數(shù)定義了變量的默認(rèn)值。這個(gè)值可以包含引用項(xiàng)目變量的表達(dá)式迫皱,如”{project.version}”(在“Parameter Expressions” document能看到更多)摊腋。property參數(shù)支持引用用戶在命令行中通過-D指定的系統(tǒng)屬性。