Re: maven-surefire-plugin add artifact as additionalClasspathElement

2023-02-23 Thread Stephane Passignat
thanks, I gave a second try to extensions and it seems works now. stephane Le 2023-02-23 à 09:52, Alexander Kriegisch a écrit : Would you not rather write a Maven plugin or extension for something like that and hook it into the build process globally, so you can use it when specifying

Re: maven-surefire-plugin add artifact as additionalClasspathElement

2023-02-23 Thread Tamás Cservenák
Stephane, "I need to add a library to maven classpath" -> you declare it as a dependency, or I don't get quite the problem (looking at your last but also first mail) You can declare the artifact as project dependency (POM/dependencies) or as plugin dependency (surefire/dependency), which one is

Re: maven-surefire-plugin add artifact as additionalClasspathElement

2023-02-23 Thread Alexander Kriegisch
Would you not rather write a Maven plugin or extension for something like that and hook it into the build process globally, so you can use it when specifying `repository` or `pluginReporitory` entries in the POM needing it? This does not seem to be something limited to certain plugins, if I

Re: maven-surefire-plugin add artifact as additionalClasspathElement

2023-02-22 Thread Stephane Passignat
Hello, thank you everyone for these suggestions. Let's go back to my original issue. I need to add a library to maven classpath. The library I need is another RepositoryLayoutFactory, to download artifact located is a repository which is not yet supported by Maven. Actually it's a basic

Re: maven-surefire-plugin add artifact as additionalClasspathElement

2023-02-16 Thread Delany
Oh right, I thought he was going to fix something in surefire There's also https://maven.apache.org/guides/mini/guide-attached-tests.html - - org.apache.maven.plugins - maven-surefire-plugin - ${surefire.version} - - -

Re: maven-surefire-plugin add artifact as additionalClasspathElement

2023-02-16 Thread Mikael Åsberg
I agree that the current syntax for adding to stuff to test runtime is clunky and I wouldn't personally use it unless I needed to. On Thu, Feb 16, 2023 at 1:07 PM Alexander Kriegisch wrote: > > Which is exactly why I was asking. I want to learn about real-world use > cases which would require

Re: maven-surefire-plugin add artifact as additionalClasspathElement

2023-02-16 Thread Alexander Kriegisch
Which is exactly why I was asking. I want to learn about real-world use cases which would require such a thing, not be just nice to have. Over-engineering POMs does not make them more readable or maintainable. Alexander Kriegisch https://scrum-master.de Mikael Åsberg schrieb am 16.02.2023 um

Re: maven-surefire-plugin add artifact as additionalClasspathElement

2023-02-16 Thread Mikael Åsberg
I use runtime scope a lot, but personally can't recall having needed the equivalent of a test-runtime scope myself (or, more likely, I could get away with test compile scope even though the dependency was only needed at test runtime). But just because I haven't needed it doesn't mean there are no

Re: maven-surefire-plugin add artifact as additionalClasspathElement

2023-02-16 Thread Alexander Kriegisch
For a test, does it really matter to make the dependency test-scoped? Mikael Åsberg schrieb am 16.02.2023 um 12:35: > Because there exists runtime, but no test only runtime scope > > On Thu, Feb 16, 2023 at 12:22 PM Alexander Kriegisch > wrote: >> >> I would be more interested first in why this

Re: maven-surefire-plugin add artifact as additionalClasspathElement

2023-02-16 Thread Mikael Åsberg
Because there exists runtime, but no test only runtime scope On Thu, Feb 16, 2023 at 12:22 PM Alexander Kriegisch wrote: > > I would be more interested first in why this should be necessary at all. > What is the use case that would not be covered by declaring a regular > test-scoped dependency

Re: maven-surefire-plugin add artifact as additionalClasspathElement

2023-02-16 Thread Alexander Kriegisch
I would be more interested first in why this should be necessary at all. What is the use case that would not be covered by declaring a regular test-scoped dependency in the module? -- Alexander Kriegisch https://scrum-master.de Olivier Lamy schrieb am 16.02.2023 um 11:58: > On Thu, 16 Feb 2023

Re: maven-surefire-plugin add artifact as additionalClasspathElement

2023-02-16 Thread Olivier Lamy
On Thu, 16 Feb 2023 at 20:52, Olivier Lamy wrote: > > On Thu, 16 Feb 2023 at 20:07, Delany wrote: > > > > Hi Stephane, > > > > You can do like this > > > > > > maven-surefire-plugin > > 3.0.0-M9 > > > > > > org.apache.commons > >

Re: maven-surefire-plugin add artifact as additionalClasspathElement

2023-02-16 Thread Olivier Lamy
On Thu, 16 Feb 2023 at 20:07, Delany wrote: > > Hi Stephane, > > You can do like this > > > maven-surefire-plugin > 3.0.0-M9 > > > org.apache.commons > commons-email > 1.5 > > >

Re: maven-surefire-plugin add artifact as additionalClasspathElement

2023-02-16 Thread Delany
Hi Stephane, You can do like this maven-surefire-plugin 3.0.0-M9 org.apache.commons commons-email 1.5 On Thu, 16 Feb 2023 at 11:25, Stephane Passignat wrote: >

maven-surefire-plugin add artifact as additionalClasspathElement

2023-02-16 Thread Stephane Passignat
Hello, Is it possible to add a maven artifact as an additionalClasspathElement ? I tried this syntax, inspired by the exclusion mechanism, but it's not working. org.apache.maven.plugins maven-surefire-plugin 3.0.0-M9