String (String name, String version, File file) { String libraryFileName = getNameWithoutExtension(file); final String mavenLibraryFileName = name + "-" + version; if (!mavenLibraryFileName.equals(libraryFileName)) { Matcher matcher = Pattern.compile(name + "-" + version + "-(.*)").matcher(libraryFileName); if (matcher.matches()) { return matcher.group(1); } } return null; }