You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Tamás Cservenák <ta...@cservenak.net> on 2022/11/16 08:43:42 UTC

[DISCUSS] Notes For Maven Plugin Developers

Howdy,

Recently we had several queries about testing Maven Plugins, but in
general I think we should make plugin developers aware of incoming changes.
Hence, I assembled the following wiki page, that may become Maven Site page
as well, and (irrelevant is it becoming site page or not) probably should
be sent out to users ML as well, to get a broader audience.

https://cwiki.apache.org/confluence/display/MAVEN/Notes+For+Maven+Plugin+Developers

Consider the page as DRAFT, and let me know what you think and what you
think is missing from it.

Recently I started locally using 3.9.0-SNAPSHOT and found several plugins
we use affected, for example:

https://github.com/gaul/modernizer-maven-plugin/issues/152
https://github.com/revelc/impsort-maven-plugin/issues/64

Would be good if we ensure that our own builds will work with latest Maven,
but also to announce to plugin developers out there about upcoming changes.

Comments are welcome.

Goal is to make the content of that wiki page "complete" (that's what we
need to agree about), and then send it out to user ML.

T

PS: please let's discuss here on ML first round, so we can edit the wiki
page as discussed.

Re: [DISCUSS] Notes For Maven Plugin Developers

Posted by Slawomir Jaranowski <s....@gmail.com>.
So
 org.apache.maven.repository.RepositorySystem  - should be deprecated ...

śr., 23 lis 2022 o 14:53 Tamás Cservenák <ta...@cservenak.net> napisał(a):

> Howdy,
>
> Sorry for the late reply.
>
> Yes, original plan was to ditch maven-compat (for 4.0.0), but then it
> turned out that in "maven 3 universe", to do some stuff you had two
> options:
> - either rely on something in maven-compat
> - or reach directly for resolver (but it was not "popular" choice due
> 3.0/3.1 package change for resolver, see maven-artifact-transport etc)
>
> Now, many plugins still use compat components, so forcing them to use
> resolver "only" to later switch to API (forcing two changes in a short
> timeframe) is not something we want to do.
> Making it happen would be "very good", but still, there was some backlash.
> Hence, we decided that in the "transitioning period" (when maven 4 will
> still support maven 3 plugins) we should keep compat.
>
> One typical case of this "duality" is component
> org.apache.maven.repository.RepositorySystem that has an interface in
> maven-core (so is "like Maven3 stuff") but is implemented in maven-compat
> only....
>
> Given migration to M4 API will be a bigger effort (for plugin devs), we
> decided to opt for this, to lessen breaking changes.
>
> T
>
> On Wed, Nov 16, 2022 at 9:51 AM Christoph Läubrich <ma...@laeubi-soft.de>
> wrote:
>
> > One note about:
> >
> >  > Note: this dependency in test scope is "acceptable" and actually
> > required by some testing frameworks (see below).
> >
> > I think it is actually *not* acceptable and will cause confusions and
> > there are already some work going on not requiring it anymore, so
> > probably this can be updated to:
> >
> > 1) not require maven-compat
> > 2) support at laest JUnit 4
> >
> > I see two ways for this
> >   1) update plexustestcase for Junit 4 first
> >   2) do not depend on PlexusTestcase but just copy the code into
> > maven-plugin-testing
> >
> > I'm also confused about
> >
> >  > his module is not removed in 3.9.0, nor in first releases of 4.0.x
> >
> > as I though this was the goal of 3.9.x to get away with the compat
> > module to be prepared for 4.0 ...
> >
> > Am 16.11.22 um 09:43 schrieb Tamás Cservenák:
> > > Howdy,
> > >
> > > Recently we had several queries about testing Maven Plugins, but in
> > > general I think we should make plugin developers aware of incoming
> > changes.
> > > Hence, I assembled the following wiki page, that may become Maven Site
> > page
> > > as well, and (irrelevant is it becoming site page or not) probably
> should
> > > be sent out to users ML as well, to get a broader audience.
> > >
> > >
> >
> https://cwiki.apache.org/confluence/display/MAVEN/Notes+For+Maven+Plugin+Developers
> > >
> > > Consider the page as DRAFT, and let me know what you think and what you
> > > think is missing from it.
> > >
> > > Recently I started locally using 3.9.0-SNAPSHOT and found several
> plugins
> > > we use affected, for example:
> > >
> > > https://github.com/gaul/modernizer-maven-plugin/issues/152
> > > https://github.com/revelc/impsort-maven-plugin/issues/64
> > >
> > > Would be good if we ensure that our own builds will work with latest
> > Maven,
> > > but also to announce to plugin developers out there about upcoming
> > changes.
> > >
> > > Comments are welcome.
> > >
> > > Goal is to make the content of that wiki page "complete" (that's what
> we
> > > need to agree about), and then send it out to user ML.
> > >
> > > T
> > >
> > > PS: please let's discuss here on ML first round, so we can edit the
> wiki
> > > page as discussed.
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> > For additional commands, e-mail: dev-help@maven.apache.org
> >
> >
>


-- 
Sławomir Jaranowski

Re: [DISCUSS] Notes For Maven Plugin Developers

Posted by Tamás Cservenák <ta...@cservenak.net>.
Howdy,

Sorry for the late reply.

Yes, original plan was to ditch maven-compat (for 4.0.0), but then it
turned out that in "maven 3 universe", to do some stuff you had two options:
- either rely on something in maven-compat
- or reach directly for resolver (but it was not "popular" choice due
3.0/3.1 package change for resolver, see maven-artifact-transport etc)

Now, many plugins still use compat components, so forcing them to use
resolver "only" to later switch to API (forcing two changes in a short
timeframe) is not something we want to do.
Making it happen would be "very good", but still, there was some backlash.
Hence, we decided that in the "transitioning period" (when maven 4 will
still support maven 3 plugins) we should keep compat.

One typical case of this "duality" is component
org.apache.maven.repository.RepositorySystem that has an interface in
maven-core (so is "like Maven3 stuff") but is implemented in maven-compat
only....

Given migration to M4 API will be a bigger effort (for plugin devs), we
decided to opt for this, to lessen breaking changes.

T

On Wed, Nov 16, 2022 at 9:51 AM Christoph Läubrich <ma...@laeubi-soft.de>
wrote:

> One note about:
>
>  > Note: this dependency in test scope is "acceptable" and actually
> required by some testing frameworks (see below).
>
> I think it is actually *not* acceptable and will cause confusions and
> there are already some work going on not requiring it anymore, so
> probably this can be updated to:
>
> 1) not require maven-compat
> 2) support at laest JUnit 4
>
> I see two ways for this
>   1) update plexustestcase for Junit 4 first
>   2) do not depend on PlexusTestcase but just copy the code into
> maven-plugin-testing
>
> I'm also confused about
>
>  > his module is not removed in 3.9.0, nor in first releases of 4.0.x
>
> as I though this was the goal of 3.9.x to get away with the compat
> module to be prepared for 4.0 ...
>
> Am 16.11.22 um 09:43 schrieb Tamás Cservenák:
> > Howdy,
> >
> > Recently we had several queries about testing Maven Plugins, but in
> > general I think we should make plugin developers aware of incoming
> changes.
> > Hence, I assembled the following wiki page, that may become Maven Site
> page
> > as well, and (irrelevant is it becoming site page or not) probably should
> > be sent out to users ML as well, to get a broader audience.
> >
> >
> https://cwiki.apache.org/confluence/display/MAVEN/Notes+For+Maven+Plugin+Developers
> >
> > Consider the page as DRAFT, and let me know what you think and what you
> > think is missing from it.
> >
> > Recently I started locally using 3.9.0-SNAPSHOT and found several plugins
> > we use affected, for example:
> >
> > https://github.com/gaul/modernizer-maven-plugin/issues/152
> > https://github.com/revelc/impsort-maven-plugin/issues/64
> >
> > Would be good if we ensure that our own builds will work with latest
> Maven,
> > but also to announce to plugin developers out there about upcoming
> changes.
> >
> > Comments are welcome.
> >
> > Goal is to make the content of that wiki page "complete" (that's what we
> > need to agree about), and then send it out to user ML.
> >
> > T
> >
> > PS: please let's discuss here on ML first round, so we can edit the wiki
> > page as discussed.
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>

Re: [DISCUSS] Notes For Maven Plugin Developers

Posted by Christoph Läubrich <ma...@laeubi-soft.de>.
One note about:

 > Note: this dependency in test scope is "acceptable" and actually 
required by some testing frameworks (see below).

I think it is actually *not* acceptable and will cause confusions and 
there are already some work going on not requiring it anymore, so 
probably this can be updated to:

1) not require maven-compat
2) support at laest JUnit 4

I see two ways for this
  1) update plexustestcase for Junit 4 first
  2) do not depend on PlexusTestcase but just copy the code into 
maven-plugin-testing

I'm also confused about

 > his module is not removed in 3.9.0, nor in first releases of 4.0.x

as I though this was the goal of 3.9.x to get away with the compat 
module to be prepared for 4.0 ...

Am 16.11.22 um 09:43 schrieb Tamás Cservenák:
> Howdy,
> 
> Recently we had several queries about testing Maven Plugins, but in
> general I think we should make plugin developers aware of incoming changes.
> Hence, I assembled the following wiki page, that may become Maven Site page
> as well, and (irrelevant is it becoming site page or not) probably should
> be sent out to users ML as well, to get a broader audience.
> 
> https://cwiki.apache.org/confluence/display/MAVEN/Notes+For+Maven+Plugin+Developers
> 
> Consider the page as DRAFT, and let me know what you think and what you
> think is missing from it.
> 
> Recently I started locally using 3.9.0-SNAPSHOT and found several plugins
> we use affected, for example:
> 
> https://github.com/gaul/modernizer-maven-plugin/issues/152
> https://github.com/revelc/impsort-maven-plugin/issues/64
> 
> Would be good if we ensure that our own builds will work with latest Maven,
> but also to announce to plugin developers out there about upcoming changes.
> 
> Comments are welcome.
> 
> Goal is to make the content of that wiki page "complete" (that's what we
> need to agree about), and then send it out to user ML.
> 
> T
> 
> PS: please let's discuss here on ML first round, so we can edit the wiki
> page as discussed.
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org