Hi Baz,
my observations are that it is not possible to use a placeholder for the
<groupId>, <artifactId>, <version> of the parent pom for example. As you
said the CLI -D option is not taken into consideration.
Anyway, m2 take this option into consideration at some later stage, but not
when it identifies the effective-pom.
You can check the effective pom throughout the following. E.g.:

mvn help:effective-pom -DbuildType="-Debug"

if you want just to check the effective pom, or check and execute "clean
install" :

mvn help:effective-pom -DbuildType="-Debug" clean install

It is a little bit confusing are for me, but it seems m2 takes into
consideration the CLI -D option later in the life cycle, but not when the
effective pom is constructed.

 I am not an expert, so if someone has some more information, please provide
it to us.

Regards, Dobri

On Wed, May 21, 2008 at 5:17 AM, Wendy Smoak <[EMAIL PROTECTED]> wrote:

> On Tue, May 20, 2008 at 7:02 PM, Baz <[EMAIL PROTECTED]> wrote:
>
> > I am trying to define a variable that i can use on command line to rename
> > all artifacts (build type) during the build. Something like "mvn clean
> > install -DbuildType="-Debug"".
> > I made the change and it works if I build from the parent directory
> level.
> > However, it does not the sub directory level.
> ...
> > Is there any Maven statement that help me to achieve what I want to do?
>
> It's definitely a good idea to change the artifact filename if the
> contents change (regular vs. debug).
>
> You could use a profile, and in it, configure the jar or war plugin to
> append a classifier to the artifact.  I assume there is other
> configuration you need to activate in order to turn the jar into the
> debug flavor?
>
> --
> Wendy
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to