By re-reading your mail, I just figured I might have missed your point as
well :)

So yes,:
- declare resolver artifacts you need as "provided"
- stick with resolver api, spi, util (all provided)

and you are on the safe side, whatever Maven you use (naturally from
[3.1-3.999] range, as Maven 3.0 uses a different resolver package, the
org.sonatype).
The resolver change between Maven versions, just like different Maven
versions for your Mojo should not stir the things.


On Mon, May 22, 2023 at 12:30 AM Henning Schmiedehausen <
henn...@schmiedehausen.org> wrote:

> Thank you for the quick response. However, I am not sure that I got what I
> needed.
>
> Upgrading/changing maven etc. is a non-starter. This is a plugin (
> https://github.com/basepom/dependency-versions-check-maven-plugin/), which
> I maintain. It is supposed to be compatible with Maven 3.8.x (older
> versions at your own risk. :-) ) and beyond.
>
> Currently I use API 3.8.7 and resolver 1.6.3. I am fine to keep using this;
> it contains all I need. The question was, if I upgrade the dependency here
> to post-1.6, assuming that I keep using the 1.6. API footprint, will this
> cause problems with users' Maven 3.8.x installation?
>
> The plugin declares the API as "provided" as suggested, but uses the
> resolver-util jar as well which is a dependency of the plugin.
>
> I am aware of the "maven-3.8 with resolver 1.8 and 1.9 distributions" but
> most (all?) users will not have that.
>
> -h
>
>
>
> On Sat, May 20, 2023 at 1:14 AM Michael Osipov <micha...@apache.org>
> wrote:
>
> > Am 2023-05-20 um 00:35 schrieb Henning Schmiedehausen:
> > > Hi,
> > >
> > > The page on https://maven.apache.org/resolver/maven-3.8.x.html states
> > > that *"Since
> > > version 1.7.0, Maven Resolver requires Java 8 to run and a brand new
> > > default sync context factory has been implemented."*.
> > >
> > > Assuming for a moment that Java 8+ is a no-brainer, what does the
> second
> > > part of that sentence mean? If a plugin would require Java 8+ anyway
> (or
> > > even Java 11+), would it be possible for a plugin to move past 1.6.x
> and
> > > still be compatible with Maven 3.8.x or would using any version past
> > 1.6.3
> > > (we are on 1.9.x now) not work with Maven 3.8?
> > >
> > > I have a plugin that has resolver api in "provided" scope so it will be
> > > whatever maven will inject into the plugin and the implementation
> itself
> > is
> > > in compile scope (so it will be bundled with the plugin).
> >
> > Short version: yes.
> >
> > First of all, I provide signed artifacts of Maven 3.8.x:
> > *
> >
> https://dist.apache.org/repos/dist/dev/maven/maven-3/3.8.x-resolver-1.9.x/
> > *
> >
> https://dist.apache.org/repos/dist/dev/maven/maven-3/3.8.x-resolver-1.8.x/
> >
> > with just Maven Resolver updated. It just works with 3.8.x
> >
> > Long answer: As long as your plugin uses the API from 1.6.x it can run
> > with 3.8.x and above, but if there is any API change and you start to
> > use it, of course you need my modified version. You can enjoy all
> > benefits from 1.9.x with 3.8.x. Beware that settings done by Maven 3.9.x
> > directly to Resolver do not apply here, so the 3.8.x defaults apply,
> > e.g., transport and stuff.
> > I will try to produce updated artifacts with Resolver 1.9.10.
> >
> > I must admit that 3.9.x should have been 3.10.x and 3.8.x moved to 3.9.x
> > with just the Resolver and Java 8 upgrade, but that ship has sailed :-(
> >
> > M
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
> > For additional commands, e-mail: dev-h...@maven.apache.org
> >
> >
>

Reply via email to