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 构建信息的合并方式 |
void
file
(Action
<? super XmlFileContentMerger
>
action)
Action
<? super XmlFileContentMerger
>允许进行高级配置,例如修改输出 XML 或影响现有 WTP facet 文件内容与 Gradle 构建信息的合并方式。
示例请参阅 EclipseWtpFacet
的文档
允许进行高级配置,例如修改输出 XML 或影响现有 WTP facet 文件内容与 Gradle 构建信息的合并方式
传递给 whenMerged{} 和 beforeMerged{} 闭包的对象类型为 WtpFacet
示例请参阅 EclipseWtpFacet
的文档
- 委托给
- 来自
file
的XmlFileContentMerger