Le mar. 20 nov. 2018 22:24, J. Lewis Muir <jlm...@imca-cat.org> a écrit :

> On Tue, Nov 20, 2018 at 1:01 PM Romain Manni-Bucau
> <rmannibu...@gmail.com> wrote:
> > Le mar. 20 nov. 2018 19:23, J. Lewis Muir <jlm...@imca-cat.org> a écrit
> :
> > > 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.
> >
> > Even with mvnsh, maven opts or the -D?
>
> Well, it's for a project where I'm not a core developer, so I don't
> think there will be much support for anything that requires doing
> something extra.
>
> I doubt mvnsh would fly.
>

Hmm mvnwrapper works cause it downloads mvn and can use itself to use
dependency:copy to download lissing and add them in the -D if needed IMHO.


> MAVEN_OPTS would work, but it's external and not with the project
> source code, so it requires each developer to do some special setting
> up.  I doubt it would fly.
>
> The closest I can get would be -D in the project's .mvn/maven.config.
> This would require adding the two JARs
> (profile-activation-advanced-0.2.0.jar and mvel2-2.4.2.Final.jar) to
> the project's source code repo, though.  That right there is already
> undesirable.  And then, say the JARs were added under the project's
> root at lib-ext, the following would need to be added to the project's
> .mvn/maven.config:
>
>
> -Dmaven.ext.class.path=lib-ext/profile-activation-advanced-0.2.0.jar:lib-ext/mvel2-2.4.2.Final.jar
>
> That's the closest I could get, and it requires the paths in the
> maven.ext.class.path system property to be resolved relative to the
> project root (so that the relative paths to the JAR files will be
> correct), and I don't even know if that's guaranteed.
>
> So, it's a pretty tough sell at this point.
>
> > > 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.
>
> Hmm, how can I check it by debugging?  I tried without the Priority
> annotation with a breakpoint in AdvancedProfileActivator.isActive, and
> I looked at the caller DefaultProfileSelector.isActive frame, which is
> one frame down in the stack, and I see the AdvancedProfileActivator in
> the DefaultProfileSelector's activators list, and I don't see the
> default PropertyProfileActivator.  Attached is a screenshot.  Maybe
> I'm looking in the wrong place?
>

Hmm i had both. I used mvn 3.6.0 during my debugging - shouldnt change
since a few version but we never know.


> Thanks!
>
> Lewis
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
> For additional commands, e-mail: dev-h...@maven.apache.org

Reply via email to