When writing a Maven plugin, you can configure various parameters within the mojo class, e.g.
/**
* The path to the properties files.
*
* @parameter expression="${project.build.directory}"
*/
private File buildDir;
Is there a reference that lists all the available project properties (e.g. ${project.build.directory})? For example, how do I get the value of the resources directory?
Thanks,
Don
The already mentioned Maven Properties Guide is the place to go. Also be sure to check PLXUTILS-37 that introduced the following syntax:
project.dependencies[0]ifdependenciesis ajava.util.Listobject or an array objectproject.dependenciesAsMap(dep1)ifdependenciesAsMapis ajava.util.MapobjectWhy would you need this? Resources are typically copied to
${project.build.directory}and you should interact with them from there.But if you really want to go this way, don’t forget that
project.build.resourcesholds aListofResource(so you might need${project.build.resources[0].directory}).