I am developing a maven plugin.
When maven instantiates the mojo class, fields annotated as @Parameter will be "dependency injected" by maven, as childenodes are defined inside the project/build/plugins/plugin/executions/execution tag.
Like this:
@Parameter(defaultValue = "${basedir}/src", alias = "src")
private String sourcePath;
will be filled by
<configuration>
<src>${basedir}/whatever</src>
</configuration>
.
Is there a way to get the configuration via some java calls? I know that I can use
public Xpp3Dom org.apache.maven.plugin.MojoExecution.getConfiguration()
to retrieve that configuration, the problem is that properties are not resolved in this case, so I get "${basedir}/whatever" for sourcePath, ${} of properties are not resolved. I need them resolved, whatever property they are.
Is there a way to get the resolved values runtime?
Thanks