API 文件 | EclipseWtpFacet |
---|
啟用微調 Eclipse 外掛的 wtp facet 詳細資訊
在 beforeMerged 和 whenMerged 之前的高階組態閉包接收 WtpFacet
物件作為參數。
plugins { id 'war' // or 'ear' or 'java' id 'eclipse-wtp' } eclipse { wtp { facet { //you can add some extra wtp facets or update existing ones; mandatory keys: 'name', 'version': facet name: 'someCoolFacet', version: '1.3' file { //if you want to mess with the resulting XML in whatever way you fancy withXml { def node = it.asNode() node.appendNode('xml', 'is what I love') } //beforeMerged and whenMerged closures are the highest voodoo for the tricky edge cases. //the type passed to the closures is WtpFacet //closure executed after wtp facet file content is loaded from existing file //but before gradle build information is merged beforeMerged { wtpFacet -> //tinker with WtpFacet here } //closure executed after wtp facet file content is loaded from existing file //and after gradle build information is merged whenMerged { wtpFacet -> //you can tinker with the WtpFacet here } } } } }
區塊 | 描述 |
file | 啟用高階組態,例如修改輸出 XML 或影響現有的 wtp facet 檔案內容與 gradle 建置資訊合併的方式 |
新增一個 facet。
如果具有給定名稱的 facet 已存在,則其版本將會更新。
若是 "jst.ejb" facet,它也會被新增為固定的 facet。
範例請參閱 EclipseWtpFacet
的文件
void
file
(Action
<? super XmlFileContentMerger
>
action)
Action
<? super XmlFileContentMerger
>啟用高階組態,例如修改輸出 XML 或影響現有的 wtp facet 檔案內容與 gradle 建置資訊合併的方式。
範例請參閱 EclipseWtpFacet
的文件
啟用高階組態,例如修改輸出 XML 或影響現有的 wtp facet 檔案內容與 gradle 建置資訊合併的方式
傳遞給 whenMerged{} 和 beforeMerged{} 閉包的物件類型為 WtpFacet
範例請參閱 EclipseWtpFacet
的文件
- 委派至
XmlFileContentMerger
從file