|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | PROPERTY | CONSTR | METHOD | DETAIL: FIELD | PROPERTY | CONSTR | METHOD |
java.lang.Object org.gradle.plugins.ide.eclipse.model.EclipseWtpFacet
class EclipseWtpFacet extends java.lang.Object
Enables fine-tuning wtp facet details of the Eclipse plugin
Advanced configuration closures beforeMerged and whenMerged receive WtpFacet object as parameter.
apply plugin: 'java' apply plugin: 'war' apply plugin: 'eclipse-wtp' eclipse { wtp { facet { //you can add some extra wtp facets; 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 } } } } }@author: Szczepan Faber, created at: 4/20/11
Property Summary | |
---|---|
java.util.List |
facets
The facets to be added as elements. |
XmlFileContentMerger |
file
See file(Closure) |
Constructor Summary | |
EclipseWtpFacet(XmlFileContentMerger file)
|
Method Summary | |
---|---|
void
|
facet(java.util.Map args)
Adds a facet. |
void
|
file(groovy.lang.Closure closure)
Enables advanced configuration like tinkering with the output xml or affecting the way existing wtp facet file content is merged with gradle build information |
void
|
mergeXmlFacet(WtpFacet xmlFacet)
|
Methods inherited from class java.lang.Object | |
---|---|
java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Property Detail |
---|
java.util.List facets
For examples see docs for EclipseWtpFacet
final XmlFileContentMerger file
Constructor Detail |
---|
EclipseWtpFacet(XmlFileContentMerger file)
Method Detail |
---|
void facet(java.util.Map args)
For examples see docs for EclipseWtpFacet
args
- A map that must contain a 'name' and 'version' key with corresponding values.
void file(groovy.lang.Closure closure)
The object passed to whenMerged{} and beforeMerged{} closures is of type WtpFacet
For example see docs for EclipseWtpFacet
void mergeXmlFacet(WtpFacet xmlFacet)
Groovy Documentation