Example usage for org.apache.maven.project MavenProject getModel

List of usage examples for org.apache.maven.project MavenProject getModel

Introduction

In this page you can find the example usage for org.apache.maven.project MavenProject getModel.

Prototype

public Model getModel() 

Source Link

Usage

From source file:org.xwiki.tool.extension.util.AbstractExtensionMojo.java

License:Open Source License

protected Extension toExtension(Artifact artifact) throws MojoExecutionException {
    MavenProject mavenProject = getMavenProject(artifact);

    return toExtension(mavenProject.getModel());
}

From source file:org.xwiki.tool.extension.util.AbstractExtensionMojo.java

License:Open Source License

protected void saveExtension(File path, Artifact artifact)
        throws MojoExecutionException, IOException, ParserConfigurationException, TransformerException {
    // Get MavenProject instance
    MavenProject mavenProject = getMavenProject(artifact);

    saveExtension(path, mavenProject.getModel());
}