private void createAntClassPath(final File platformDir) { classPaths = new ArrayList<>(); //brutal hack. Do not do this at home, kids! //we are hiding class in a classpath to confuse the classloader and pick our implementation final String entry = PathManager.getResourceRoot( HybrisIdeaAntLogger.class, "/" + HybrisIdeaAntLogger.class.getName().replace('.', '/') + ".class" ); classPaths.add(new SinglePathEntry(entry)); //end of hack final File platformLibDir = new File(platformDir, HybrisConstants.LIB_DIRECTORY); classPaths.add(new AllJarsUnderDirEntry(platformLibDir)); classPaths.addAll( extHybrisModuleDescriptorList .parallelStream() .map(e -> new AllJarsUnderDirEntry(new File(e.getRootDirectory(), HybrisConstants.LIB_DIRECTORY))) .collect(Collectors.toList()) ); final File libDir = new File(platformDir, HybrisConstants.ANT_LIB_DIR); classPaths.add(new AllJarsUnderDirEntry(libDir)); }