Skip to content

Instantly share code, notes, and snippets.

@danieldietrich
Last active December 23, 2015 13:49
Show Gist options
  • Select an option

  • Save danieldietrich/6645099 to your computer and use it in GitHub Desktop.

Select an option

Save danieldietrich/6645099 to your computer and use it in GitHub Desktop.
Build Eclipse Kepler with support for Java 8 - Eclipse platform branch R4_3_maintenance - JDT branch BETA_JAVA8
#!/bin/sh
#
# Compiling eclipse kepler with java 8 support (https://bugs.eclipse.org/bugs/show_bug.cgi?id=380190)
#
export MAVEN_OPTS=-Xmx2048m
BRANCH="R4_3_maintenance"
BRANCH_JAVA8="BETA_JAVA8"
TARGET="eclipse-current"
# cocoa.macosx.x86
# cocoa.macosx.x86_64
# gtk.linux.x86
# gtk.linux.x86_64
# win32.win32.x86
# win32.win32.x86_64
# win32.wce_ppc.arm
NATIVE="cocoa.macosx.x86_64"
rm -rf ${TARGET}
git clone -b ${BRANCH} --recursive git://git.eclipse.org/gitroot/platform/eclipse.platform.releng.aggregator.git ${TARGET}
cd ${TARGET}
MODULES="`ls -d1 *`"
for module in ${MODULES}
do
if [ -e ${module}/.git ]; then
cd ${module}
if [ `git branch -r | grep origin/${BRANCH_JAVA8} | wc -l` -eq 1 ]; then
echo ${module}
git fetch origin
git checkout -b ${BRANCH_JAVA8} origin/${BRANCH_JAVA8}
fi
cd ..
fi
done
mvn clean verify -P bree-libs -Dsource.skip=true -Dnative=${NATIVE}
# leave ${TARGET}
cd ..
echo You find the packaged SDK zip under ${TARGET}/org.eclipse.releng.tychoeclipsebuilder/sdk/target/products/
@danieldietrich

Copy link
Copy Markdown
Author

Read http://wiki.eclipse.org/Platform-releng/Platform_Build

On a Mac fix bug 384482: Apple JVM renamed rt.jar to classes.jar causing CBI Platform build issues

cd /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/lib
sudo ln -s ../../Classes/classes.jar rt.jar

Ensure using JDK 1.6

export PATH=/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin:${PATH}
export JAVA_HOME=/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home

Download JDK1.4 - JDK 1.7
http://www.oracle.com/technetwork/java/javase/archive-139210.html

Download and install BREE libs
https://bugs.eclipse.org/bugs/show_bug.cgi?id=386649

Place toolchains.xml in ~/.m2
http://wiki.eclipse.org/Platform-releng/toolchainsExample

FIX org.eclipse.jdt.annotation version to 0.0.0
https://github.com/eclipse/eclipse.jdt/commit/2a6c4e5686cd2108770f60376d0474f3bc8009be

edit eclipse.jdt/org.eclipse.jdt-feature/feature.xml

FIX org.eclipse.jdt.annotation;bundle-version to [2.0.0,3.0.0)
https://github.com/eclipse/eclipse.jdt.core/commit/74cb74226fe254108607eae80c548bb2b6719e32#commitcomment-4151591

edit eclipse.jdt.core/org.eclipse.jdt.core.tests.compiler/META-INF/MANIFEST.MF
edit eclipse.jdt.core/org.eclipse.jdt.core.tests.model/META-INF/MANIFEST.MF

Then restart eclipse platform build

mvn verify -Pbree-libs -Dmaven.test.skip=true -Dnative=cocoa.macosx.x86_64

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment