String (final File file) { WSLDistribution distribution = WslPath.getDistributionByWindowsUncPath(file.getPath()); File fileToRead = Optional.ofNullable(distribution) .map(it -> distribution.getWslPath(file.toPath())) .map(it -> distribution.resolveSymlink(it)) .map(it -> distribution.getWindowsPath(it)) .map(it -> new File(it)) .orElse(file); Properties props = loadProperties(fileToRead, "META-INF/maven/org.apache.maven/maven-core/pom.properties"); return props != null ? nullize(props.getProperty("version")) : nullize(getJarAttribute(file, java.util.jar.Attributes.Name.IMPLEMENTATION_VERSION)); }