Hey,

Sure, let me give you more context. The parameter has a default value that
users can override. But if they don't set it and another condition is true
(some file exists in the project), then we want to use a different value, a
different default. Maybe the best is to remove the default value, and in
the Mojo's execute() if it's null (the user didn't set it) we can decide
what value to assign to it based on the mentioned condition.

András

On Thu, Apr 13, 2017, 02:41 Karl Heinz Marbaise <[email protected]> wrote:

> Hi,
>
> On 13/04/17 02:05, András Kerekes wrote:
> > Hi,
> >
> > I'm working on a Maven plugin and I'd like to check whether a parameter
> for
> > a Mojo has been explicitly set by the user (via POM), or it contains the
> > default value. Is there a way to do this?
>
> Maybe I misunderstand a thing but why do you need to distinguish between
> those two? Isn't that why defaultValue exist?
>
> Kind regards
> Karl Heinz Marbaise
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to