private static Path wrapperJar()

in maven-wrapper/src/main/java/org/apache/maven/wrapper/MavenWrapperMain.java [105:121]


    private static Path wrapperJar() {
        URI location;
        try {
            location = MavenWrapperMain.class
                    .getProtectionDomain()
                    .getCodeSource()
                    .getLocation()
                    .toURI();
        } catch (URISyntaxException e) {
            throw new RuntimeException(e);
        }
        if (!"file".equals(location.getScheme())) {
            throw new RuntimeException(String.format(
                    Locale.ROOT, "Cannot determine classpath for wrapper Jar from codebase '%s'.", location));
        }
        return Paths.get(location);
    }