Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
WTP Releng BREEs
To get a list of the current Bundle-RequiredExecutionEnvironments (BREEs) used in WTP, run find.sh in a folder where you have the webtools projects checked out from git.
find.sh . "*.MF" Bundle-RequiredExecutionEnvironment | grep Bundle-RequiredExecutionEnvironment | \ sed -e "s#[0-9]\+:Bundle-RequiredExecutionEnvironment: \(.\+\)#\1#" | \ sort > /tmp/BREEs.txt && dos2unix /tmp/BREEs.txt for n in 4 5 6 7 8 9 10; do echo -n $(cat /tmp/BREEs.txt | uniq | grep $n)" x "; cat /tmp/BREEs.txt | grep $n | wc -l done
As of 2018-05-27, these BREEs appear this many times:
J2SE-1.4 x 51 J2SE-1.5 x 169 JavaSE-1.6 x 43 JavaSE-1.7 x 12 JavaSE-1.8 x 123
Toolchains
In order for the above BREEs to be rigidly enforced at compile time, you can build WTP using toolchains:
mvn clean install --global-toolchains ${WORKSPACE}/.maven/repo/toolchains.xml -t ${WORKSPACE}/.maven/repo/toolchains.xml
Here's a sample toolchains.xml file:
<?xml version="1.0" encoding="UTF8"?> <toolchains> <toolchain> <type>jdk</type> <provides> <version>1.8</version> <vendor>openjdk</vendor> </provides> <configuration> <jdkHome>/usr/lib/jvm/java-1.8.0-openjdk/</jdkHome> </configuration> </toolchain> <toolchain> <type>jdk</type> <provides> <version>9</version> <vendor>openjdk</vendor> </provides> <configuration> <jdkHome>/usr/lib/jvm/java-9-openjdk/</jdkHome> </configuration> </toolchain> </toolchains>