I’m trying to configure an EAR-project with buildship but I fail to specify the version and some other settings.
The biggest headache for me at the moment is the file
.settings\org.eclipse.wst.common.project.facet.core.xml
I have the following at the moment (created by eclipse GUI):
<?xml version="1.0" encoding="UTF-8"?> <faceted-project> <runtime name="was.base.v9"/> <fixed facet="jst.ear"/> <installed facet="jst.ear" version="6.0"/> <installed facet="com.ibm.websphere.coexistence.ear" version="9.0"/> <installed facet="com.ibm.websphere.extended.ear" version="9.0"/> </faceted-project>
After “Refresh Gradle Project” this changes to
<?xml version="1.0" encoding="UTF-8"?> <faceted-project> <fixed facet="jst.ear"/> <installed facet="jst.ear" version="5.0"/> </faceted-project>
I’ve tryed quite a lot but propably I miss something essential.
apply plugin: 'ear' apply plugin: 'eclipse' //apply plugin: 'eclipse-wtp' ear { appDirName '/' // changed to match the eclipse-path (META-INF in project root) But have tryed to use 'src' and move META-INF in there as well deploymentDescriptor { // tryed to explicitly specify deploymentdescriptor and version as well as ommitting this fileName = "application.xml" version = "6.0" applicationName = "Test" } // with the following wtp-block I managed to get the correct runtime and the websphere facets. But still problems with the jst.ear version (comment below) /*wtp { facet { file { withXml { def node = it.asNode() node.appendNode('runtime', [name: 'was.base.v9']) } } //facet name: 'jst.ear', version: '6.0' // leads to a second entry, but the one with version 5.0 stays there :-( facet name: 'com.ibm.websphere.coexistence.ear', version: '9.0' facet name: 'com.ibm.websphere.extended.ear', version: '9.0' } }*/ }
Can anybody help me a little bit pointing me on what is the correct way to achive the desired result? I don’t believe I’m the first one who wants to set the ear-version so I propably miss something!?
Thanks for reading and trying to help