Hi Franz,
I have an abstract class which my other mojo inherit from (if that makes
a difference) which has the host parameter on it along with the
getter/setter combo.
/**
* Host.
* @parameter default-value="127.0.0.1"
*/
private String host;
Then in my POM which uses the plugin
<plugin>
<groupId>org.martingilday</groupId>
<artifactId>maven-dbmigrate-plugin</artifactId>
<configuration>
<host>A</host>
</configuration>
</plugin>
>From the CLI I try to overrdide this as -Dhost=B
But when I getLog.info host in my mojo it is always A. But if I take
host out of the POM then it is always B.
Thanks,
Martin.
----- Original message -----
From: "franz see" <[EMAIL PROTECTED]>
To: [email protected]
Date: Fri, 1 Dec 2006 19:28:50 -0800 (PST)
Subject: Re: Parameter priority
Good day to you, Martin,
How are you using specifying your "host" in the pom, and how are you
using
it in your mojo?
Thanks,
Franz
Martin Gilday wrote:
>
> I am writing a mojo that requires a parameter called "host". If I set
> this in my depdendant projects POM then it works. If I use the
> expression -Dhost=127.0.0.1 then it also works as expected. But if I
> have it set in the POM and then also set the expression then the one in
> the POM takes presedent. Is this correct? I would generally want to
> define a default host in my POM (I dont want to define the default in my
> mojo as it varies by project), and then occasionally override this via
> the CLI. I'd rather use the CLI than define multiple profiles, as there
> could be any number of hosts I might want to run against.
>
> Is the standard to use what is defined in the POM over everything else,
> or have I made a mistake in my plugin?
>
> Thanks,
> Martin.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
--
View this message in context:
http://www.nabble.com/Parameter-priority-tf2733806s177.html#a7650090
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]