I’ve searched the web and finally failed in what seems to be a trivial task.
What I want to achive:
I need the following:
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/EclipseLink 2.5.2">
<attributes>
<attribute name="owner.project.facets" value="jpt.jaxb"/>
</attributes>
</classpathentry>
I did this:
eclipse {
classpath {
file {
whenMerged { classpath ->
withXml { classpathXml ->
def classpathXmlNode = classpathXml.asNode()
classpathXmlNode.appendNode('classpathentry', [kind: 'con', path: 'org.eclipse.jdt.USER_LIBRARY/EclipseLink 2.5.2'])
.appendNode('attributes').appendNode('attribute', [name: 'owner.project.facets', value: 'jpt.jaxb'])
}
}
}
}
}
But the desired classpath entry does not appear, what I am doing wrong here.