What about type=java-agent? Basically a new ArtifactHandler? See https://maven.apache.org/repositories/artifacts.html
T On Tue, Oct 17, 2023, 23:54 Benjamin Marwell <bmarw...@apache.org> wrote: > Hey all, > > In a mockito issue, JDK maintainers suggested to differentiate between > agents and normal dependencies. Starting with JDK 21 already, this makes a > lot of sense: dynamic loading of agents will be a no-go. > > One suggestion was: > > <dependencies> > <dependency> > ... > </dependency> > <agents> > <dependency> > ... > </dependency> > </agents> > </dependencies> > > Not sure if this is the best way, but this is something similar might be > needed. > Currently, the only way to handle agents is to add them manually to the > surefire argLine. To make things worse, a deoendency goal is needed until > Romains PR is merged: > https://github.com/apache/maven/pull/1281 > > Another issue is that a parent pom might not be able to easily define this > option. There were some concerns that part of the configuration needed to > be repeated in every module. > > So, I wrote Maven 5. > Maven 4 is the stepping stone to the build/consumer pom. But this is an > extension. Not really a breaking change in terms of parsing, but in terms > of building a project. Thus, it should go onto the roadmap. > > ... unless you want to keep the current status quo, which is also an > option. But before making an argument here, I'd recommend reading the > lengthy (sorry!) discussion on the mockito issue tracker. Since Karl Heinz > started the issue, I'd love to hear back from you, too. Link: > https://github.com/mockito/mockito/issues/3037 > > If no discussion is needed at this point, let's keep this as a reminder for > the next Apero and/or Maven 5 then. > > - Ben >