Injecting parameters with default values in Mojo is failing

Mansour Al Akeel <[email protected]> Fri, 14 Nov 2025 11:25:28 -0500
Newsgroups gmane.comp.jakarta.turbine.maven.user
Message-ID <CAFvvX=YQQ+SLACOKpHWpWEV6CQmvq_v-9L8JoDhJM2+2VDFLdQ@mail.gmail.com>
I am trying to experiment with writing a custom plugin, and started toying
around with a sample project. The first brick wall is injecting parameters
with default values using PluginParameterExpressionEvaluator.

The issues I am having is with something like this:

@Parameter(property = "buildDirectory", defaultValue =
"${project.build.directory}", required = false)
private File outputDirectory;

@Parameter(property = "sourceDirectory", name = "sourceDirectory",
defaultValue = "${project.sourceDirectory}", required = true)
private File sourceDirectory;


These are always nulls. I have created a sample project to demonstrate the
issue:

https://github.com/malakeel/sample-maven-plugin/tree/main

The issue I am facing is generated when I run SQLProcessorMojoTest.java
from within eclipse.