Hi All,
I am using eclipse-wtp to generate the eclipse facets. Unfortunately the jst.web version is hardcoded to 2.4.
How do I set the version of the jst.web facet to 2.5 ? If I try this solution: http://jessitron.blogspot.nl/2011/11/lifting-blankets-of-gradle.html eclipse {
wtp {
facet {
file {
whenMerged { config ->
config.facets.each {
if (it.name == ‘jst.web’) {
it.version = 3.0
}
}
config.facets.unique()
}
}
}
}
}
I get this error:
Caused by: Assertion failed:
assert version == null
|
|
2.5
false
at org.gradle.plugins.ide.eclipse.model.Facet.(Facet.groovy:50)
at org.gradle.plugins.ide.eclipse.model.Facet.(Facet.groovy:35)
Fixed:
I fixed it by adding it.type.toString() == ‘installed’ to the condition.
eclipse {
wtp {
facet {
file {
whenMerged { config ->
config.facets.each {
if (it.type.toString() == ‘installed’ && it.name == ‘jst.web’) {
it.version = 2.5
}
}
config.facets.unique()
}
}
}
} }
Dan_Stine
(Dan Stine)
3
We’re using this:
eclipse {
wtp {
facet {
facet name: 'java', version: '1.7'
facet name: 'jst.web', version: '3.0'
}
}
}
which results in the following org.eclipse.wst.common.project.facet.core.xml:
<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
<installed facet="java" version="1.7"/>
<installed facet="jst.web" version="3.0"/>
</faceted-project>
1 Like