maven-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "J. Lewis Muir" <jlm...@imca-cat.org>
Subject Re: Extension does not work from .mvn/extensions.xml
Date Tue, 20 Nov 2018 04:55:58 GMT
On Mon, Nov 19, 2018 at 4:16 PM Romain Manni-Bucau
<rmannibucau@gmail.com> wrote:
> Time to push your code and an example on github to encourage help/people to
> run it ;)

OK, here's how to get the extension with the proof of concept code and
install it locally:

===
$ git clone https://github.com/imca-cat/profile-activation-advanced.git
$ cd profile-activation-advanced
$ git checkout lifecycle-participant-poc
$ mvn clean install
===

The proof of concept extension just changes the value of any profile
property activation with a name of "paa:mvel" to the string "!false".
It does not evaluate any MVEL expression at the moment; it's just a
proof of concept for changing the model.  Since the system property
"paa:mvel" is not defined, the altered property activation should
evaluate to true, but I don't know how to get Maven to re-evaluate the
property activations after I've changed them.

And here's how to get and run a small test that uses the locally
installed extension:

===
$ git clone https://github.com/jlmuir/profile-activation-advanced-test.git
$ cd profile-activation-advanced-test
$ mvn help:active-profiles validate
===

I'm expecting the "mvn help:active-profiles validate" command to show
that the foo_env-development profile is active with output like

===
The following profiles are active:

 - foo_env-development (source: org.example.foo:foo:1.0.0)
===

but it does not.  So, it seems the extension is not successfully
changing the model (i.e., not successfully activating the
foo_env-development profile).

Thank you!

Lewis

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


Mime
View raw message