Please read my answer to a slightly different question:
http://stackoverflow.com/questions/14725197/reading-properties-file-from-pom-file-in-maven/14727072#14727072

The question is different, but if you understand the answer I wrote, you
will have the answer to your question.


On 7 February 2014 04:45, Shahim Essaid <[email protected]> wrote:

> Hi,
>
> Is it possible to activate a profile programmatically from a Mojo (or a
> plugin lifecycle extension) in Maven 3?  I am trying to understand whether
> or not I can add the "build.plugins" from an inherited (but inactive)
> profile to the currently executing project during the validate phase. I
> know I can do this with a custom ProfileActivator but I'd really like to do
> this in a plugin to simplify sharing this functionality. I don't mind if
> this involves using some internal APIs but I don't know where to start
> looking. Any tips are greatly appreciated.
>
> Best,
> Shahim
>

Reply via email to