@ -27,13 +27,13 @@ if [ -z `which javac` ]; then
@@ -27,13 +27,13 @@ if [ -z `which javac` ]; then
apt-get -y update
# Try to share cache. See Vagrantfile for details
mkdir -p /var/cache/oracle-jdk7 -installer
if [ -e "/tmp/oracle-jdk7 -installer-cache/" ] ; then
find /tmp/oracle-jdk7-installer-cache/ -not -empty -exec cp '{}' /var/cache/oracle-jdk7 -installer/ \;
mkdir -p /var/cache/oracle-jdk8 -installer
if [ -e "/tmp/oracle-jdk8 -installer-cache/" ] ; then
find /tmp/oracle-jdk8-installer-cache/ -not -empty -exec cp '{}' /var/cache/oracle-jdk8 -installer/ \;
fi
if [ ! -e "/var/cache/oracle-jdk7-installer/jdk-7u80 -linux-x64.tar.gz" ] ; then
# Grab a copy of the JDK since it has moved and original downloader won't work
curl -s -L "https://s3-us-west-2.amazonaws.com/kafka-packages/jdk-7u80-linux-x64.tar.gz" -o /var/cache/oracle-jdk7-installer/jdk-7u80 -linux-x64.tar.gz
if [ ! -e "/var/cache/oracle-jdk8-installer/jdk-8u171 -linux-x64.tar.gz" ] ; then
# Grab a copy of the JDK since it has moved and original downloader won't work
curl -s -L "https://s3-us-west-2.amazonaws.com/kafka-packages/jdk-8u171-linux-x64.tar.gz" -o /var/cache/oracle-jdk8-installer/jdk-8u171 -linux-x64.tar.gz
fi
/bin/echo debconf shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections
@ -42,15 +42,15 @@ if [ -z `which javac` ]; then
@@ -42,15 +42,15 @@ if [ -z `which javac` ]; then
# as one line per dot in the build logs.
# To avoid this noise we redirect all output to a file that we only show if apt-get fails.
echo "Installing JDK..."
if ! apt-get -y install oracle-java7-installer oracle-java7 -set-default >/tmp/jdk_install.log 2>& 1 ; then
if ! apt-get -y install oracle-java8-installer oracle-java8 -set-default >/tmp/jdk_install.log 2>& 1 ; then
cat /tmp/jdk_install.log
echo "ERROR: JDK install failed"
exit 1
fi
echo " JDK installed: $( javac -version 2>& 1) "
if [ -e "/tmp/oracle-jdk7 -installer-cache/" ] ; then
cp -R /var/cache/oracle-jdk7-installer/* /tmp/oracle-jdk7 -installer-cache
if [ -e "/tmp/oracle-jdk8 -installer-cache/" ] ; then
cp -R /var/cache/oracle-jdk8-installer/* /tmp/oracle-jdk8 -installer-cache
fi
fi