amaidment
amaidment

Reputation: 7298

Custom maven plugin - what are the default parameters?

I'm trying to write a custom maven plugin, and want to get some information about the project.

After some searching around, I found that I can set parameters to certain project related values (presumably from the POM?) - e.g.

/**
 * @goal myPlugin
 */
public class MyTestMojo extends AbstractMojo {

  /**
   * @parameter expression="${project}"
   * @required
   * @read-only
   */
  private Object project;

  @Override
  public void execute() throws MojoExecutionException, MojoFailureException {
    getLog().info(project.toString());
  }
}

However, I cannot find any documentation on what parameters are available in this format. At the moment, I'm proceeding with trial and error, but that's proving a bit frustrating.

Any ideas?

Upvotes: 2

Views: 569

Answers (2)

Eugene Kuleshov
Eugene Kuleshov

Reputation: 31795

Here is a short list of available properties. You may also want to look trough available Maven plugin tutorials.

Upvotes: 3

Related Questions