You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Michael Osipov <mi...@apache.org> on 2020/10/03 23:49:03 UTC
Classloader hierarchy with extensions
Folks,
hopefully someone of you is able to make me understand the following:
Maven 3 class loading [1] says that extensions are available to plugins.
E.g., Wagon FTP should be available to Maven Deploy Plugin oder Wagon
Maven Plugin. While working on MNG-6965 I came across this MNG-4381
which makes [1] with Wagon FTP possible. Going through I get to MNG-2749
and MNG-3281. The very spot making this happen is:
https://github.com/apache/maven/blob/9567da2bc889a94f5c3b692b4afb310ddbacd6e5/maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuildingHelper.java#L213-L221
I am really confused right now. One ticket says (MNG-4381) that Maven
2.x did not provide extensions to be visible to plugins yet MNG-2749
says the opposite. Moreover, MNG-3281 says that this is to be restored.
Looking at the provided snippet, this works as long as the extensions is
a single artifact w/o a dependency tree which is actually a hack for
backwards-compat to Maven 2.x.
So please tell me, since Wagon FTP is more than one artifact, how can
this be available to plugins?
Michael
[1]
https://cwiki.apache.org/confluence/display/MAVEN/Maven+3.x+Class+Loading
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: Classloader hierarchy with extensions
Posted by Robert Scholte <rf...@apache.org>.
I remember working with Stephen on this.
I think the related issues were MNG-6209, MNG-6275
Stephen wrote a small integration test to show which extensions were visible to who and in which order.
It showed there are some edge cases that didn't work as expected.
However, I can't find that project anymore.
I hope Stephen still has a link.
thanks,
Robert
[1] https://issues.apache.org/jira/browse/MNG-6209
[2] https://issues.apache.org/jira/browse/MNG-6275
On 4-10-2020 01:49:10, Michael Osipov <mi...@apache.org> wrote:
Folks,
hopefully someone of you is able to make me understand the following:
Maven 3 class loading [1] says that extensions are available to plugins.
E.g., Wagon FTP should be available to Maven Deploy Plugin oder Wagon
Maven Plugin. While working on MNG-6965 I came across this MNG-4381
which makes [1] with Wagon FTP possible. Going through I get to MNG-2749
and MNG-3281. The very spot making this happen is:
https://github.com/apache/maven/blob/9567da2bc889a94f5c3b692b4afb310ddbacd6e5/maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuildingHelper.java#L213-L221
I am really confused right now. One ticket says (MNG-4381) that Maven
2.x did not provide extensions to be visible to plugins yet MNG-2749
says the opposite. Moreover, MNG-3281 says that this is to be restored.
Looking at the provided snippet, this works as long as the extensions is
a single artifact w/o a dependency tree which is actually a hack for
backwards-compat to Maven 2.x.
So please tell me, since Wagon FTP is more than one artifact, how can
this be available to plugins?
Michael
[1]
https://cwiki.apache.org/confluence/display/MAVEN/Maven+3.x+Class+Loading
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: Classloader hierarchy with extensions
Posted by Igor Fedorenko <ig...@ifedorenko.com>.
Have you seen [1]? Not sure how much Maven 3.x changed since I wrote that page, but multi-artifact extensions needed META-INF/maven/extension.xml descriptor to defined what artifacts are part of the extension and what are exported to the plugins.
[1] http://takari.io/book/91-maven-classloading.html
--
Regards,
Igor
On Sat, Oct 3, 2020, at 19:49, Michael Osipov wrote:
> Folks,
>
> hopefully someone of you is able to make me understand the following:
>
> Maven 3 class loading [1] says that extensions are available to
> plugins.
> E.g., Wagon FTP should be available to Maven Deploy Plugin oder Wagon
> Maven Plugin. While working on MNG-6965 I came across this MNG-4381
> which makes [1] with Wagon FTP possible. Going through I get to
> MNG-2749
> and MNG-3281. The very spot making this happen is:
> https://github.com/apache/maven/blob/9567da2bc889a94f5c3b692b4afb310ddbacd6e5/maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuildingHelper.java#L213-L221
>
> I am really confused right now. One ticket says (MNG-4381) that Maven
> 2.x did not provide extensions to be visible to plugins yet MNG-2749
> says the opposite. Moreover, MNG-3281 says that this is to be restored.
> Looking at the provided snippet, this works as long as the extensions is
> a single artifact w/o a dependency tree which is actually a hack for
> backwards-compat to Maven 2.x.
>
> So please tell me, since Wagon FTP is more than one artifact, how can
> this be available to plugins?
>
> Michael
>
>
> [1]
> https://cwiki.apache.org/confluence/display/MAVEN/Maven+3.x+Class+Loading
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org