Reputation: 187529
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
Upvotes: 1
Views: 710
Reputation: 570345
Is there a reference that lists all the available project properties (e.g. ${project.build.directory})?
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]
if dependencies
is a java.util.List
object or an array objectproject.dependenciesAsMap(dep1)
if dependenciesAsMap
is a java.util.Map
objectFor example, how do I get the value of the resources directory?
Why 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.resources
holds a List
of Resource
(so you might need ${project.build.resources[0].directory}
).
Upvotes: 1