private MavenProject getHelpPluginPom()

in src/main/java/org/apache/maven/plugins/help/EvaluateMojo.java [486:507]


    private MavenProject getHelpPluginPom() throws MojoExecutionException {
        String resource = "META-INF/maven/org.apache.maven.plugins/maven-help-plugin/pom.properties";

        InputStream resourceAsStream = EvaluateMojo.class.getClassLoader().getResourceAsStream(resource);
        if (resourceAsStream == null) {
            throw new MojoExecutionException("The help plugin artifact was not found.");
        }
        Properties properties = new Properties();
        try (InputStream is = resourceAsStream) {
            properties.load(is);
        } catch (IOException e) {
            if (getLog().isDebugEnabled()) {
                getLog().debug("IOException: " + e.getMessage(), e);
            }
        }

        String artifactString = properties.getProperty("groupId", "unknown") + ":"
                + properties.getProperty("artifactId", "unknown") + ":"
                + properties.getProperty("version", "unknown");

        return getMavenProject(artifactString);
    }