byte-buddy icon indicating copy to clipboard operation
byte-buddy copied to clipboard

maven-plugin depends on byte-buddy

Open Gingerbreadz opened this issue 3 years ago • 3 comments

Hi,

I've got a bytebuddy plugin that I run off-line with the maven plugin. This plugin directly depends onbyte-buddy-dep ; since it uses ASM classes that are not shaded in byte-buddy. For some time, I've been excluding the byte-buddy dependency from the byte-buddy-maven-plugin plugin, otherwise, my ASM visitors would not be executed (my ASM wrappers do not override the proper method because they do not use the shaded ClassVisitor).

My question is the following: do you think byte-buddy-maven-plugin could safely depend on byte-buddy-dep instead of byte-buddy, without causing the same issue the other way around ? I mean, for plugins that implement ASM visitors from the shaded ASM in byte-buddy. If so, is there any other reason for byte-buddy-maven-plugin not to be able to depend on byte-buddy-dep instead of byte-buddy ?

Thank you for your great work on ByteBuddy !

Gingerbreadz avatar Jun 05 '22 15:06 Gingerbreadz

If a plugin refers to a user implementation that uses ASM directly, it would be an issue. As this would be a breaking change, that's not possible unfortunately.

raphw avatar Jun 05 '22 17:06 raphw

Ok, then it is normal for my plugin or any other that uses ASM directly to exclude & replace byte-buddy in the maven plugin with byte-buddy-dep. I can now document my own plugin accordingly. Thank you :) This issue may be closed.

Gingerbreadz avatar Jun 05 '22 17:06 Gingerbreadz

yes, you'd need to reshade ideally, or bridge it somehow.

raphw avatar Jun 05 '22 17:06 raphw