Re: Where can find a working plugin test example

2022-06-28 Thread Thomas Broyer
TL;DR: it doesn't use the maven-plugin-testing-harness but maven-invoker-plugin, and that's what I've been using as well. Le mar. 28 juin 2022 à 07:59, Martin Höller a écrit : > Hi! Stephan! > > Some years ago I had a similar problem while developing > vdldoc-maven-plugin [1]. I found all the

Override Maven core default bindings

2022-06-28 Thread François Guillot
Hi, I need to override some default Maven bindings in my custom extension, for instance "org.apache.maven.plugin.MavenPluginManager" I'm doing this by providing a "META-INF/plexus/components.xml" in my extension's jar with << org.apache.maven.plugin.MavenPluginManager

Re: maven-shade-plugin not including dependencies

2022-06-28 Thread Alain Désilets
On Sun, Jun 26, 2022 at 9:49 AM Alexander Kriegisch < alexan...@kriegisch.name> wrote: > > Firstly, you are not crerating a test JAR but a regular JAR with > application classes, so of course test-scoped dependencies like JUnit > are not going to be contained in the uber JAR. > Oh, right.

Re: Override Maven core default bindings

2022-06-28 Thread Tamás Cservenák
In other words, why do you need to override MavenPluginManager in several different ways? (or we just theoretize, about some possible future binary breakage?) T On Tue, Jun 28, 2022 at 1:12 PM Tamás Cservenák wrote: > Ok, > > best would be to create then a reproducer, but have to note: > while

Re: Override Maven core default bindings

2022-06-28 Thread Tamás Cservenák
Ok, best would be to create then a reproducer, but have to note: while Maven can "protect" (warn) about duplicate/wrong plugin declarations, as "lower" we go (and extensions, especially when you throw things into lib/ext) are earlier and earlier on the bootstrap of Maven, and it cannot do much

Re: Override Maven core default bindings

2022-06-28 Thread Tamás Cservenák
Howdy, I am a bit uncertain if I correctly understand your problem: so you have several MavenPluginManager implementations in several extensions, and those extensions are not compatible with each other? Could we step back a little and could you explain what your extension is doing? Best if you

Re: Override Maven core default bindings

2022-06-28 Thread François Guillot
Hi Tamás, I have one extension (say 'MyExtension'), that declares a binding override for MavenPluginManager. MyExtension is not supposed to be applied several times per build, and I'm trying my best to keep only one of them 'active' if that happens. Given there are various ways to declare

Re: Override Maven core default bindings

2022-06-28 Thread François Guillot
Hi again I can't go into details because it's a proprietary extension, but we need to change the behaviour of - *DefaultMavenPluginManager*: we need to intercept calls to Mojo#execute so here we proxy the Mojo class that is created from the mojoInterface with some custom stuffs -

Re: Where can find a working plugin test example

2022-06-28 Thread Florent Biville
Hello, I recently published a simple Maven example with working tests and a modern site skin: https://github.com/learning-maven/simple-plugin. It uses the awesome integration test framework of Karl Heinz Marbaise. It requires a few dependencies and plugins but the usage is quite straightforward.