API文档: | EclipseWtpFacet |
---|
启用 Eclipse 插件的 wtp 方面详细信息的微调
高级配置闭包 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 构面文件内容与 gradle 构建信息合并的方式 |
void
file
(行动)Action
<? super XmlFileContentMerger
>
Action
<? super XmlFileContentMerger
>启用高级配置,例如修改输出 XML 或影响现有 wtp 构面文件内容与 gradle 构建信息合并的方式。
例如,请参阅文档EclipseWtpFacet
启用高级配置,例如修改输出 XML 或影响现有 wtp 构面文件内容与 gradle 构建信息合并的方式
传递给whenMerged{}和beforeMerged{}闭包的对象是类型WtpFacet
例如,请参阅文档EclipseWtpFacet