protected static void extractGendarmeBinaries(String tempFolder) throws GendarmeException { try { URL executableURL = GendarmeRunner.class.getResource("/gendarme-" + EMBEDDED_VERSION + "-bin"); ZipUtils.extractArchiveFolderIntoDirectory(StringUtils.substringBefore(executableURL.getFile(), "!").substring(5), "gendarme-" + EMBEDDED_VERSION + "-bin", tempFolder); } catch (IOException e) { throw new GendarmeException("Could not extract the embedded Gendarme executable: " + e.getMessage(), e); } }
protected static void extractNDepsBinaries(String tempFolder) throws NDepsException { try { URL executableURL = NDepsRunner.class.getResource("/NDeps-" + EMBEDDED_VERSION); ZipUtils.extractArchiveFolderIntoDirectory(StringUtils.substringBefore(executableURL.getFile(), "!").substring(5), "NDeps-" + EMBEDDED_VERSION, tempFolder); } catch (IOException e) { throw new SonarException("Could not extract the embedded NDeps executable", e); } }