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?
Here is a short list of available properties. You may also want to look trough available Maven plugin tutorials.