maven-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Romain Manni-Bucau <rmannibu...@gmail.com>
Subject Re: Extension does not work from .mvn/extensions.xml
Date Tue, 20 Nov 2018 19:01:16 GMT
Le mar. 20 nov. 2018 19:23, J. Lewis Muir <jlmuir@imca-cat.org> a écrit :

> On Tue, Nov 20, 2018 at 2:30 AM Romain Manni-Bucau
> <rmannibucau@gmail.com> wrote:
> > 1. you have to use lib/ext folder and not extensions.xml cause it is
> loaded
> > too late
>
> Unfortunately, that's a deal breaker.  Using Maven's lib/ext is the
> original situation I reported when I started this thread (i.e., it
> worked from Maven's lib/ext, but not from the project's
> .mvn/extensions.xml.)  There's no way I can get the developers of the
> software I'm planning to use this in to install the extension in
> Maven's lib/ext; it has to be able to work from the project's
> .mvn/extensions.xml.  I guess this is the end of the road, then.
> Bummer.
>

Even with mvnsh, maven opts or the -D?


> > 2. you have to override the property activator as you mentionned cause
> > otherwise your profile is added (through plexus) in the list of
> activator,
> > set the activation to true and then property one sets it to false
> >
> > To do 2 you just have to use sisu @Priority and ensure the hint is
> property:
>
> I tried adding the Priority annotation, and it works from Maven's
> lib/ext, but it also works *without* it, so I'm hesitant to add it
> unless I know it's really necessary.  The readme file in Maven's
> lib/ext says
>

Without it you dont deactivate default one - you can check it debugging it.


>   Use this directory to contribute 3rd-party extensions to the Maven
>   core. These extensions can either extend or override Maven's default
>   implementation.
>
> Do I really need the Priority annotation, or will my extension's
> AdvancedProfileActivator (annotated with '@Component(role =
> ProfileActivator.class, hint = "property")') always take precedence
> over the default by virtue of being in Maven's lib/ext?
>

This kind of order is fragile so better to be deterministic ans more robust
imho


> Thank you!
>
> Lewis
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message