You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Carlos Alonso <ca...@unkasoft.com> on 2008/08/20 14:53:58 UTC

Extra module activation from profile

Hi all.

My situation is the following. I have a multi-module project that
already has 4 different profiles, that determine which filter will be
used. Now, I have a new module for this project that is the
integration-tests module, and I only want to run this module when a
NEWLY created profile is activated. I.e:

executing mvn target -P local, just builds the artifacts and runs unit
tests.
executing mvn target -P local -P ci, should build the artifacts, run
unit tests and, perform the operations to run the integration tests.

Summarizing, I want to keep the behavior I was having and, when the ci
profile is enabled, the integration-tests module has to be added to the
project.
Any ideas?
Thanks in advance.
Carlos

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Extra module activation from profile

Posted by Geoffrey Wiseman <ge...@gmail.com>.
On Wed, Aug 20, 2008 at 8:53 AM, Carlos Alonso <ca...@unkasoft.com> wrote:

> My situation is the following. I have a multi-module project that
> already has 4 different profiles, that determine which filter will be
> used. Now, I have a new module for this project that is the
> integration-tests module, and I only want to run this module when a
> NEWLY created profile is activated. I.e:
>
> executing mvn target -P local, just builds the artifacts and runs unit
> tests.
> executing mvn target -P local -P ci, should build the artifacts, run
> unit tests and, perform the operations to run the integration tests.
>
> Summarizing, I want to keep the behavior I was having and, when the ci
> profile is enabled, the integration-tests module has to be added to the
> project.
> Any ideas?
>

Sounds reasonable -- are you having a problem with that?  I've got a profile
that adds a module:
        <profile>
            <id>distribution</id>
            <modules>
                <module>distribution</module>
            </modules>
        </profile>

This particular profile doesn't do anything else, but there's no reason why
it couldn't.

-- 
Geoffrey Wiseman