diff --git a/cmake/toolchain/heptools-dev-base.cmake b/cmake/toolchain/heptools-dev-base.cmake
index 50b3434e174f6dbda50e6e9de4a9c9f843438c71..5b500da212018d3df2ea68231cb7c5629d2b776f 100644
--- a/cmake/toolchain/heptools-dev-base.cmake
+++ b/cmake/toolchain/heptools-dev-base.cmake
@@ -244,10 +244,11 @@ LCG_external_package(grpcio            1.21.1
 LCG_external_package(GSL               2.5                                      )
 LCG_external_package(gtest             1.10.0                                   )
 LCG_external_package(h5py              2.9.0                                    )
-if(NOT ${LCG_OS}${LCG_OSVERS} MATCHES ubuntu18|mac[0-9]+)
-  LCG_external_package(hadoop          2.7.5.1                                  )
-endif()
 if(NOT ${LCG_OS} STREQUAL ubuntu AND NOT ${LCG_OS}${LCG_OSVERS} MATCHES mac[0-9]+)
+  LCG_external_package(hadoop          2.7.5.1                                  )
+  LCG_external_package(hadoop_xrootd   1.0.4                                    )
+elseif(${LCG_OS}${LCG_OSVERS} MATCHES ubuntu18)
+  LCG_external_package(hadoop          3.2.1                                    )
   LCG_external_package(hadoop_xrootd   1.0.4                                    )
 endif()
 LCG_external_package(harfbuzz          1.9.0                                    )
@@ -491,7 +492,7 @@ LCG_external_package(snappy            1.1.7
 LCG_external_package(sollya            7.0                                      )
 #LCG_external_package(soqt              1.5.0                                    )
 LCG_external_package(sortedcontainers  2.1.0                                    )
-if(${LCG_OS} STREQUAL slc OR ${LCG_OS} STREQUAL centos)
+if(${LCG_OS} STREQUAL slc OR ${LCG_OS} STREQUAL centos OR ${LCG_OS}${LCG_OSVERS} MATCHES ubuntu18)
   LCG_external_package(spark           2.4.5-cern1                              )
 endif()
 LCG_external_package(spdlog            1.5.0                                    )